.qr-generator {
  display: flex;
  flex-direction: column;
  gap: 2em;
  margin-top: 2em;
}

.url-input {
  width: 100%;
  margin-bottom: 2em;
}

.qr-main-content {
  display: flex;
  gap: 2em;
}

.qr-preview-section {
  flex: 1;
  min-width: 300px;
}

.qr-style-section {
  flex: 1;
  min-width: 300px;
}

.qr-form {
  flex: 1;
  min-width: 300px;
}

.qr-preview {
  flex: 1;
  min-width: 300px;
}

.url-input input {
  width: 100%;
  padding: 0.75em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.075);
  border-radius: 4px;
  color: #fff;
}

.validation-message {
  color: #F64747;
  font-size: 0.9em;
  margin-top: 0.5em;
  display: block;
}

.style-options {
  background: rgba(255, 255, 255, 0.05);
  padding: 1.5em;
  border-radius: 4px;
}

.option-group {
  margin-bottom: 1.5em;
}

.option-group:last-child {
  margin-bottom: 0;
}

.option-group label {
  display: block;
  margin-bottom: 0.5em;
}

.size-control {
  display: flex;
  align-items: center;
  gap: 1em;
}

.size-control input[type="range"] {
  flex: 1;
}

.size-value {
  min-width: 80px;
  text-align: right;
}

.color-pickers {
  display: flex;
  gap: 1em;
}

.color-picker-wrapper {
  flex: 1;
}

.preview-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.preview-light, .preview-dark {
  display: none;
  background: white;
  padding: 1rem;
  border-radius: 4px;
}

.preview-dark {
  background: black;
}

.preview-light.active, .preview-dark.active {
  display: block;
}

#switch-bg {
  margin-top: 0.5rem;
}

.preview-controls {
  display: flex;
  flex-direction: column;
  gap: 1em;
  align-items: center;
  margin-top: 1em;
}

.preview-controls button {
  flex: 1;
  max-width: 200px;
  min-width: 150px;
  height: 40px;
  line-height: 40px;
  padding: 0 1.5em;
}

.format-buttons {
  display: flex;
  gap: 0.5em;
  justify-content: center;
}

.format-btn {
  opacity: 0.7;
  transition: all 0.2s ease;
}

.format-btn.active {
  opacity: 1;
  background-color: #f64747 !important;
}

.format-options {
  display: flex;
  gap: 1em;
  margin-top: 0.5em;
  justify-content: center;
}

.format-options label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 1em;
  background: rgba(255, 255, 255, 0.075);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-options label:hover {
  background: rgba(255, 255, 255, 0.1);
}

.format-options input[type="radio"] {
  margin: 0;
}

.format-options input[type="radio"]:checked + span {
  color: #f64747;
}

.format-options label.active {
  background: rgba(246, 71, 71, 0.2);
  border-color: #f64747;
}

.tooltip {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 0.5em;
}

/* Mobile Responsive */
@media screen and (max-width: 980px) {
  .qr-main-content {
    flex-direction: column;
  }

  .qr-preview-section {
    order: 1; /* Show preview first */
  }

  .qr-style-section {
    order: 2; /* Show style options second */
  }

  .qr-preview-section {
    flex-direction: column;
  }

  .color-pickers {
    flex-direction: column;
  }
}

/* Loading State */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2em;
  height: 2em;
  margin: -1em 0 0 -1em;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: #F64747;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000000; /* Very high z-index */
    pointer-events: auto;
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: fixed !important; /* Force fixed position */
}

.modal-content {
    background: #2b2b2b;
    padding: 2em;
    border-radius: 4px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    z-index: 10000001; /* Higher than modal background */
    margin: 2em;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Override any site-wide styles that might interfere */
body.modal-open {
    overflow: hidden;
}

#wrapper.modal-open {
    pointer-events: none;
}

.download-options {
    display: flex;
    gap: 1em;
    margin: 2em 0;
    justify-content: center;
}

.download-option {
    display: flex;
    flex-direction: column;
    padding: 1em;
    flex: 1;
    align-items: center;
    transition: transform 0.2s;
}

.download-option:hover {
    transform: translateY(-2px);
}

.format-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 0.5em;
}

.format-desc {
    font-size: 0.9em;
    opacity: 0.8;
}

.modal-close {
    margin-top: 1em;
}

@media screen and (max-width: 480px) {
    .download-options {
        flex-direction: column;
    }
}

/* Add some animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal.active .modal-content {
    animation: modalFadeIn 0.3s ease-out;
} 