:root {
  --bg: #05060a;
  --gold: #c9a75a;
  --gold-bright: #f2d98b;
  --text: #e8e6e0;
  --muted: #9a958a;
  --danger: #e07a5f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Hero */
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem;
  color: var(--gold-bright);
  text-align: center;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Cuenta atrás */
.countdown-section { text-align: center; }

.countdown {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
}

.countdown-unit span {
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-variant-numeric: tabular-nums;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}

.countdown-unit small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 0.35rem;
}

.countdown-sep {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  color: var(--muted);
  line-height: 1;
  padding-top: 0.2rem;
}

.countdown-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* Hora local del visitante */
.local-time {
  color: var(--gold);
  font-size: 0.9rem;
  margin-top: 0.5rem;
  font-variant-numeric: tabular-nums;
}

/* Hora en España */
.spain-time {
  color: var(--gold-bright);
  font-size: 0.95rem;
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}

/* Botones */
.actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold-bright);
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.btn:hover:not(:disabled) {
  background: var(--gold);
  color: var(--bg);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
  background: var(--gold-bright);
}

.btn-secondary {
  border-color: var(--muted);
  color: var(--text);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* Estado */
.status {
  text-align: center;
  min-height: 1.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.status.error { color: var(--danger); }
.status.ok { color: var(--gold-bright); }

/* Visualización Morse */
.morse-display {
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.letter {
  font-size: 4rem;
  font-weight: 300;
  color: var(--gold-bright);
  line-height: 1;
  transition: opacity 0.15s;
}

.pattern {
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  color: var(--gold);
}

/* Overlay de parpadeo de pantalla */
.screen-flash {
  position: fixed;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.05s;
}

.screen-flash.on {
  opacity: 1;
}

/* Compartir */
.share-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  border: 1px solid rgba(201, 167, 90, 0.25);
  border-radius: 16px;
  background: rgba(201, 167, 90, 0.04);
}

.share-title {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--gold-bright);
  margin: 0;
}

.share-text {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  max-width: 420px;
}

.share-qr {
  display: flex;
  justify-content: center;
  width: 100%;
}

.share-qr img {
  display: block;
  width: 220px;
  height: 220px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-sizing: content-box;
}

.share-status {
  color: var(--gold);
  font-size: 0.85rem;
  min-height: 1.2rem;
  margin: 0;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-title {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--gold-bright);
  text-align: center;
  margin: 0 0 0.5rem;
}

.faq-item {
  border: 1px solid rgba(201, 167, 90, 0.25);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  background: rgba(201, 167, 90, 0.04);
}

.faq-item summary {
  cursor: pointer;
  color: var(--gold-bright);
  font-size: 0.95rem;
  font-weight: 500;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.faq-item code {
  color: var(--gold);
  font-family: ui-monospace, monospace;
  font-size: 0.85em;
}

/* Pasos de la FAQ */
.faq-steps {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.faq-steps li {
  margin-bottom: 0.35rem;
}

.faq-steps strong {
  color: var(--gold-bright);
}

/* Footer */
.footer {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

.footer a { color: var(--gold); }

/* Banner de cookies */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0a0c12;
  border-top: 1px solid var(--gold);
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 10000;
  font-size: 0.85rem;
  color: var(--text);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-text {
  margin: 0;
  flex: 1 1 300px;
  max-width: 500px;
  text-align: center;
}

.cookie-text a {
  color: var(--gold);
}

.cookie-actions {
  display: flex;
  gap: 0.5rem;
}

/* Accesibilidad: reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  .screen-flash { transition: none; }
  .cookie-banner { transition: none; }
}