:root {
  --navy: #0e1834;
  --navy-2: #16234a;
  --ink: #eef1f9;
  --muted: #a9b4d2;
  --cyan: #02d3e9;
  --line: #26355f;
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Vídeo-fonte da textura: precisa existir no DOM, mas não aparece na tela */
#meuVideo {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  left: -10px;
  top: -10px;
}

.hidden { display: none !important; }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  background: rgba(8, 14, 32, 0.92);
  color: var(--ink);
  text-align: center;
}

.card {
  max-width: 340px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.mark { width: 64px; height: 64px; margin-bottom: 6px; }

.kicker { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan); }

.card h1 { margin: 0; font-size: 1.35rem; line-height: 1.25; font-weight: 700; }
.card p { margin: 0; color: var(--muted); line-height: 1.5; font-size: 0.98rem; }

.btn {
  margin-top: 8px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 16px 20px;
  font: 600 1rem/1 inherit;
  font-family: inherit;
  background: var(--ink);
  color: var(--navy);
  cursor: pointer;
}
.btn:active { background: var(--cyan); }

.link {
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 0.92rem/1.4 inherit;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 8px;
  cursor: pointer;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hint, .sound {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  background: rgba(14, 24, 52, 0.85);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.95rem;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hint { bottom: calc(28px + env(safe-area-inset-bottom)); animation: pulse 2s ease-in-out infinite; }
.sound { top: calc(20px + env(safe-area-inset-top)); font-family: inherit; font-weight: 600; cursor: pointer; }
@keyframes pulse { 50% { opacity: 0.6; } }

.player { background: #000; padding: 0; }
.player video { width: 100%; height: 100%; object-fit: contain; }
.close {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top));
  right: calc(14px + env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(14, 24, 52, 0.85);
  color: var(--ink);
  font-size: 1.1rem;
  cursor: pointer;
}

.brand {
  position: fixed;
  z-index: 80;
  top: calc(16px + env(safe-area-inset-top));
  left: calc(16px + env(safe-area-inset-left));
  color: rgba(238, 241, 249, 0.7);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .hint, .spinner { animation: none; }
}
