/* ───────── Font ───────── */

@font-face {
  font-family: 'Trajan Pro 3';
  src: url('TrajanPro3-Semibold.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}

/* ───────── Reset & Base ───────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-bg: #87ceeb;
  --color-surface: rgba(35, 87, 125, 0.92);
  --color-surface-border: rgba(29, 183, 235, 0.3);
  --color-primary: #1db7eb;
  --color-primary-hover: #17a3d3;
  --color-primary-glow: rgba(29, 183, 235, 0.35);
  --color-dark: #23577d;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.75);
  --color-text-dark: #23577d;
  --color-success: #34d399;
  --color-success-bg: rgba(52, 211, 153, 0.15);
  --color-error: #ff6b6b;
  --color-error-bg: rgba(255, 107, 107, 0.15);
  --color-input-bg: rgba(255, 255, 255, 0.9);
  --color-input-border: rgba(255, 255, 255, 0.5);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.2s ease;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
}

/* ───────── Background Image ───────── */

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('bg-desktop.webp') center/cover no-repeat;
}

@media (max-width: 768px) {
  .bg-overlay {
    background-image: url('bg-mobile.webp');
  }
}

/* ───────── Layout ───────── */

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  padding: 16px 24px;
}

.card {
  border: none;
  border-radius: 0;
  padding: 50px 72px;
  position: relative;
  overflow: visible;
  background: radial-gradient(ellipse at center, rgba(10, 50, 80, 0.0) 30%, rgba(20, 90, 130, 0.25) 70%, rgba(29, 183, 235, 0.12) 100%);
}

.card::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: url('recuadro-desktop.png') center/100% 100% no-repeat;
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 560px) {
  .card {
    padding: 60px 40px;
  }
  .card::before {
    background-image: url('recuadro-mobile.png');
  }
}

/* ───────── Language Switch ───────── */

.lang-switch {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  gap: 6px;
}

.lang-btn {
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 30, 50, 0.6);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}

.lang-btn:hover {
  background: rgba(0, 30, 50, 0.8);
  color: #fff;
}

.lang-btn.active {
  background: rgba(0, 30, 50, 0.85);
  color: #fff;
}

/* ───────── Hero Header ───────── */

.hero-header {
  text-align: center;
  margin-bottom: 12px;
}

.logo-moana {
  max-width: 500px;
  width: 80%;
  margin-bottom: 8px;
}

.hero-tagline {
  font-family: 'Trajan Pro 3', 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #ffffff;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-family: 'Trajan Pro 3', 'Times New Roman', serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-dark);
  letter-spacing: 0.04em;
  padding: 0 4px;
}

/* ───────── Email Field ───────── */

.email-field {
  margin-bottom: 14px;
}

.email-field input {
  width: 100%;
  padding: 14px 20px;
  background: var(--color-input-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text-dark);
  font-family: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}

.email-field input::placeholder {
  color: #8aa;
}

.email-field input:focus {
  border-color: var(--color-primary);
}

.email-field input.invalid {
  border-color: var(--color-error);
}

/* ───────── Buttons ───────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 24px;
  cursor: pointer;
  transition: background var(--transition), transform 0.1s ease, box-shadow var(--transition);
}

.btn:active {
  transform: scale(0.98);
}

.btn-file-select {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-text-dark);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px 24px;
  margin-bottom: 10px;
}

.btn-file-select:hover {
  background: var(--color-primary-hover);
  box-shadow: 0 0 24px var(--color-primary-glow);
}

.btn-submit {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-text-dark);
  font-size: 1.2rem;
  font-weight: 700;
  padding: 20px 24px;
  margin-top: 16px;
}

.btn-submit:hover:not(:disabled) {
  background: var(--color-primary-hover);
  box-shadow: 0 0 24px var(--color-primary-glow);
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-reset {
  width: 100%;
  background: transparent;
  color: var(--color-text);
  font-size: 1rem;
  padding: 14px 24px;
  margin-top: 12px;
  border: 2px solid var(--color-primary);
}

.btn-reset:hover {
  background: rgba(0, 212, 255, 0.1);
}

/* ───────── File Info ───────── */

.file-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
}

.file-details {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  min-width: 0;
}

.file-details div {
  min-width: 0;
}

.file-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.btn-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition), background var(--transition);
  flex-shrink: 0;
}

.btn-remove:hover {
  color: var(--color-error);
  background: var(--color-error-bg);
}

.drop-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 18px;
}

/* ───────── Checkboxes ───────── */

.checkbox-group {
  margin-bottom: 12px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 5px;
  margin-top: 1px;
  transition: all var(--transition);
  position: relative;
  background: rgba(255, 255, 255, 0.1);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--color-text-dark);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  flex: 1;
}

.checkbox-text a {
  color: var(--color-primary);
  text-decoration: underline;
  cursor: pointer;
}

.checkbox-text a:hover {
  color: #fff;
}

.checkbox-group:last-of-type .checkbox-text {
  font-size: 0.85rem;
}

/* ───────── Progress Bar ───────── */

.progress-container {
  margin-top: 16px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), #00ffcc);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* ───────── Status Messages ───────── */

.status {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

.status.status-info {
  background: rgba(0, 212, 255, 0.12);
  color: var(--color-primary);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.status.status-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.status.status-error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid rgba(255, 107, 107, 0.25);
}

/* ───────── Modal (Terms & Conditions) ───────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #0d2a3f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.modal-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color var(--transition);
}

.modal-close:hover {
  color: var(--color-text);
}

.modal-body-scroll {
  overflow-y: auto;
  max-height: 40vh;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) rgba(255, 255, 255, 0.08);
}

.modal-body-scroll::-webkit-scrollbar {
  width: 6px;
}

.modal-body-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

.modal-body-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-hover);
}

.modal-body {
  padding: 16px 24px;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.modal-body h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 18px;
  margin-bottom: 6px;
}

.modal-body h3:first-child {
  margin-top: 0;
}

.modal-body p {
  margin-bottom: 10px;
}

.modal-body ul {
  margin: 8px 0 12px 20px;
  padding: 0;
}

.modal-body li {
  margin-bottom: 6px;
}

.modal-body a {
  color: var(--color-primary);
  text-decoration: underline;
}

.modal-footer {
  padding: 12px 24px 20px;
}

.scroll-hint {
  font-size: 0.75rem;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 10px;
  font-style: italic;
  transition: opacity 0.3s ease;
}

.scroll-hint.hidden {
  opacity: 0;
}

.btn-modal-accept {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-text-dark);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  cursor: pointer;
  transition: background var(--transition);
}

.btn-modal-accept:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-modal-accept:hover:not(:disabled) {
  background: var(--color-primary-hover);
}

/* ───────── Geo Block ───────── */

.geo-block-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #0a1628 0%, #0d3a5c 100%);
  padding: 24px;
}

.geo-block-overlay.hidden {
  display: none;
}

.geo-block-content {
  text-align: center;
  max-width: 400px;
}

.geo-block-content .logo-moana {
  width: 200px;
  margin-bottom: 32px;
}

.geo-block-message {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ───────── Age Gate Overlay ───────── */

.age-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #0a1628 0%, #0d3a5c 100%);
  padding: 24px;
}

.age-gate-overlay.hidden {
  display: none;
}

.age-gate-card {
  text-align: center;
  max-width: 360px;
  width: 100%;
}

.age-gate-card .logo-moana {
  width: 200px;
  margin-bottom: 28px;
}

.age-gate-title {
  font-size: 1rem;
  color: var(--color-text);
  margin-bottom: 16px;
}

.age-gate-selects {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.age-gate-select {
  flex: 1;
  padding: 10px 14px;
  background: var(--color-input-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text-dark);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%238aa' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.age-gate-select:focus {
  border-color: var(--color-primary);
}

.age-gate-select.invalid {
  border-color: var(--color-error);
}

.btn-age-gate {
  width: 100%;
  background: var(--color-primary);
  color: var(--color-text-dark);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 24px;
  margin-bottom: 12px;
}

.btn-age-gate:hover:not(:disabled) {
  background: var(--color-primary-hover);
  box-shadow: 0 0 24px var(--color-primary-glow);
}

.btn-age-gate:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.age-gate-error {
  font-size: 0.9rem;
  color: var(--color-error);
  margin-top: 4px;
}

.age-gate-error.hidden {
  display: none;
}

/* ───────── Footer ───────── */

.footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.legal-links a {
  color: #1a9fd4;
  text-decoration: none;
  transition: color 0.2s;
}

.legal-links a:hover {
  color: #5cc8f0;
  text-decoration: underline;
}

.legal-footer {
  position: fixed;
  bottom: 16px;
  left: 0;
  right: 0;
  z-index: 2500;
}

/* ───────── Utilities ───────── */

.hidden {
  display: none !important;
}

/* ───────── Animations ───────── */

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.uploading .btn-file-select {
  pointer-events: none;
  opacity: 0.5;
}

/* ───────── Responsive ───────── */

@media (max-width: 560px) {
  .container {
    padding: 16px;
  }

  .card {
    padding: 40px 24px;
  }

  .hero-tagline {
    font-size: 0.95rem;
  }

  .hero-subtitle {
    font-size: 1.6rem;
  }

  .logo-moana {
    max-width: 400px;
  }

  .btn-file-select,
  .btn-submit {
    font-size: 0.95rem;
    padding: 14px 20px;
  }
}
