
/* Horror typography (aesthetic only): readable body + gothic/distorted display for titles. */
@import url("https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=UnifrakturCook:wght@700&display=swap");

:root {
  color-scheme: dark;
  --bg0: #050505;
  --bg1: #0a0a0a;
  --surface: rgba(10, 10, 10, 0.72);
  --surface2: rgba(18, 18, 18, 0.5);
  --border: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --red: #ff1a1a;
  --crimson: #c1121f;
  --glow: rgba(255, 26, 26, 0.35);
  --glow2: rgba(255, 26, 26, 0.18);
  --blood: #b00000;
  --ash: rgba(255, 255, 255, 0.14);
}

html {
  scroll-behavior: smooth;
}

/* Responsive safety: prevent accidental horizontal scrolling from fixed overlays. */
html,
body {
  overflow-x: hidden;
}

/* Responsive media defaults: keep canvases/cards from overflowing on small screens. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
svg,
canvas {
  max-width: 100%;
}

html,
body {
  height: 100%;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: radial-gradient(1200px 700px at 20% 20%, rgba(255, 26, 26, 0.11), transparent 60%),
    radial-gradient(1000px 700px at 80% 40%, rgba(255, 26, 26, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
}

/* Horror theme wrapper (aesthetic only): applied by adding `horror` to <body class="..."> */
body.horror {
  --bg1: #030303;
  --surface: rgba(15, 15, 15, 0.74);
  --surface2: rgba(10, 10, 10, 0.55);
  --border: rgba(255, 255, 255, 0.08);
  --glow: rgba(255, 26, 26, 0.45);
  --glow2: rgba(255, 26, 26, 0.22);
  background:
    radial-gradient(1100px 700px at 18% 18%, rgba(176, 0, 0, 0.12), transparent 62%),
    radial-gradient(1000px 700px at 86% 34%, rgba(255, 26, 26, 0.07), transparent 60%),
    linear-gradient(180deg, #050505, #020202);
}

.container {
  position: relative;
  z-index: 4;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 16% 22%, rgba(255, 26, 26, 0.2), transparent 55%),
    radial-gradient(1000px 650px at 90% 35%, rgba(255, 26, 26, 0.12), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0px, rgba(255, 255, 255, 0.025) 1px, transparent 1px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 42px);
  opacity: 1;
  pointer-events: none;
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0px, rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px);
  opacity: 0.08;
  mix-blend-mode: overlay;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(1200px 700px at 50% 20%, transparent 40%, rgba(0, 0, 0, 0.75) 78%, rgba(0, 0, 0, 0.9) 100%);
  opacity: 0.9;
}

/* Horror atmosphere layers (aesthetic only): slow fog + faint drifting embers */
.horror-fog {
  position: fixed;
  inset: -20% -20% -20% -20%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 20% 30%, rgba(255, 255, 255, 0.06), transparent 60%),
    radial-gradient(900px 600px at 80% 60%, rgba(255, 255, 255, 0.04), transparent 60%),
    radial-gradient(1200px 800px at 50% 80%, rgba(255, 26, 26, 0.04), transparent 65%);
  filter: blur(26px);
  opacity: 0.22;
  mix-blend-mode: screen;
  transform: translate3d(0, 0, 0);
  animation: fogDrift 18s ease-in-out infinite;
}

.horror-embers {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(2px 2px at 10% 70%, rgba(255, 26, 26, 0.22), transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 40%, rgba(255, 26, 26, 0.18), transparent 60%),
    radial-gradient(2px 2px at 55% 65%, rgba(255, 26, 26, 0.2), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 35%, rgba(255, 26, 26, 0.16), transparent 60%),
    radial-gradient(2px 2px at 88% 72%, rgba(255, 26, 26, 0.18), transparent 60%);
  opacity: 0.18;
  filter: blur(0.2px);
  animation: embersFloat 14s ease-in-out infinite;
}

@keyframes fogDrift {
  0% {
    transform: translate3d(-2.5%, -1.5%, 0) scale(1);
  }
  50% {
    transform: translate3d(2.5%, 1.5%, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-2.5%, -1.5%, 0) scale(1);
  }
}

@keyframes embersFloat {
  0% {
    transform: translate3d(0, 0, 0);
    opacity: 0.12;
  }
  50% {
    transform: translate3d(0, -10px, 0);
    opacity: 0.18;
  }
  100% {
    transform: translate3d(0, 0, 0);
    opacity: 0.12;
  }
}

/* Horror typography (aesthetic only): gothic titles with controlled readability. */
body.horror h1,
body.horror h2,
body.horror h3,
body.horror .landing-title {
  font-family: "Cinzel Decorative", ui-serif, Georgia, "Times New Roman", Times, serif;
}

body.horror .landing-title {
  text-shadow: 0 0 40px rgba(255, 26, 26, 0.16), 0 22px 70px rgba(0, 0, 0, 0.82);
  letter-spacing: -0.03em;
}

/* Menacing buttons (aesthetic only): heavier glow + slower pulse to increase urgency. */
body.horror .btn-primary {
  background: linear-gradient(90deg, rgba(255, 26, 26, 0.98), rgba(176, 0, 0, 0.82));
  box-shadow: 0 0 0 1px rgba(255, 26, 26, 0.22), 0 22px 90px rgba(176, 0, 0, 0.16);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.horror .btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(255, 26, 26, 0.28), 0 0 28px rgba(255, 26, 26, 0.28), 0 26px 110px rgba(176, 0, 0, 0.2);
}

body.horror .btn-primary:not(:disabled) {
  animation: dreadPulse 6.8s ease-in-out infinite;
}

@keyframes dreadPulse {
  0% {
    filter: brightness(1);
  }
  55% {
    filter: brightness(1.06);
  }
  100% {
    filter: brightness(1);
  }
}

/* Randomized micro-flicker (aesthetic only): driven by `body.horror-flicker` from JS. */
body.horror-flicker .neon-border,
body.horror-flicker .glow-text {
  filter: brightness(1.08) contrast(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .horror-fog,
  .horror-embers,
  body.horror .btn-primary:not(:disabled) {
    animation: none !important;
  }
}

/* Responsive full-screen countdown overlay (result page only). */
.death-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 44px);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(14px);
}

.death-overlay:not(.hidden) {
  animation: overlayIn 820ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.death-overlay.is-flicker {
  animation: overlayIn 820ms cubic-bezier(0.16, 1, 0.3, 1) both, overlayFlicker 420ms linear both;
}

.death-overlay__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 18% 22%, rgba(255, 26, 26, 0.16), transparent 62%),
    radial-gradient(900px 520px at 80% 44%, rgba(176, 0, 0, 0.12), transparent 65%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0px, rgba(255, 255, 255, 0.018) 1px, transparent 1px, transparent 5px);
  opacity: 0.9;
}

.death-overlay__bg::before {
  content: "";
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(680px 520px at 30% 40%, rgba(255, 26, 26, 0.08), transparent 62%),
    radial-gradient(860px 660px at 70% 55%, rgba(255, 255, 255, 0.04), transparent 66%),
    radial-gradient(900px 700px at 50% 50%, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.92));
  filter: blur(22px);
  opacity: 0.55;
  transform: translate3d(0, 0, 0);
  animation: bgDrift 9.6s ease-in-out infinite;
}

.death-overlay__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 26, 26, 0.10), transparent 42%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 26, 26, 0.10) 0px,
      rgba(255, 26, 26, 0.10) 1px,
      transparent 2px,
      transparent 14px
    );
  opacity: 0.12;
  mask-image: radial-gradient(closest-side, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 1));
  animation: dripScan 7.4s linear infinite;
}

.death-overlay__content {
  position: relative;
  width: min(720px, 100%);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.78), rgba(0, 0, 0, 0.66));
  box-shadow: 0 40px 160px rgba(0, 0, 0, 0.88);
  padding: clamp(18px, 3.2vw, 34px);
  overflow: hidden;
}

.death-overlay__content::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(420px 520px at 18% 90%, rgba(0, 0, 0, 0.98), transparent 68%),
    radial-gradient(420px 520px at 82% 86%, rgba(0, 0, 0, 0.98), transparent 70%),
    radial-gradient(520px 440px at 55% 92%, rgba(0, 0, 0, 0.96), transparent 74%);
  opacity: 0.65;
  filter: blur(2px);
  transform: translate3d(0, 0, 0);
  animation: silhouetteBreath 5.8s ease-in-out infinite;
}

.death-overlay__content::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(700px 420px at 60% 0%, rgba(255, 26, 26, 0.16), transparent 60%),
    radial-gradient(900px 560px at 30% 80%, rgba(255, 255, 255, 0.05), transparent 62%);
  opacity: 0.75;
}

.death-overlay__tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.death-overlay__title {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-family: "Cinzel Decorative", ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: clamp(18px, 2.6vw, 22px);
  color: rgba(255, 255, 255, 0.86);
  letter-spacing: 0.02em;
}

.death-overlay__number {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-family: "UnifrakturCook", "Cinzel Decorative", ui-serif, Georgia, "Times New Roman", Times, serif;
  font-size: clamp(64px, 10vw, 140px);
  line-height: 0.9;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 0 46px rgba(255, 26, 26, 0.22), 0 28px 90px rgba(0, 0, 0, 0.85);
  animation: numberPulse 4.2s ease-in-out infinite;
}

.death-overlay__number.is-jitter {
  animation: numberPulse 4.2s ease-in-out infinite, numberJitter 320ms ease-in-out 1;
}

.death-overlay__meta {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.death-overlay__actions {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.death-overlay__hint {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

@keyframes numberPulse {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
  42% {
    transform: translate3d(0, -2px, 0) scale(1.012);
    filter: brightness(1.09) contrast(1.02);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
}

@keyframes numberJitter {
  0% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(1px, -1px, 0);
  }
  55% {
    transform: translate3d(-1px, 1px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes overlayIn {
  0% {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    filter: saturate(1.1) contrast(1.08);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: saturate(1) contrast(1);
  }
}

@keyframes overlayFlicker {
  0% {
    opacity: 1;
  }
  12% {
    opacity: 0.84;
  }
  22% {
    opacity: 1;
  }
  36% {
    opacity: 0.78;
  }
  55% {
    opacity: 1;
  }
  72% {
    opacity: 0.86;
  }
  100% {
    opacity: 1;
  }
}

@keyframes bgDrift {
  0% {
    transform: translate3d(-2%, -1%, 0) scale(1.02);
  }
  55% {
    transform: translate3d(2%, 1%, 0) scale(1.03);
  }
  100% {
    transform: translate3d(-2%, -1%, 0) scale(1.02);
  }
}

@keyframes dripScan {
  0% {
    transform: translate3d(0, -10%, 0);
  }
  100% {
    transform: translate3d(0, 10%, 0);
  }
}

@keyframes silhouetteBreath {
  0% {
    opacity: 0.56;
    transform: translate3d(0, 0, 0) scale(1);
  }
  55% {
    opacity: 0.78;
    transform: translate3d(0, -2px, 0) scale(1.01);
  }
  100% {
    opacity: 0.56;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Responsive overlay: stack buttons full width on small screens. */
@media (max-width: 520px) {
  .death-overlay__actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .death-overlay__number,
  .death-overlay__number.is-jitter {
    animation: none !important;
  }

  .death-overlay__bg::before,
  .death-overlay__bg::after,
  .death-overlay__content::before,
  .death-overlay:not(.hidden),
  .death-overlay.is-flicker {
    animation: none !important;
  }
}

.ad-slot {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.6);
}

.ad-slot::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(520px 260px at 20% 30%, rgba(255, 26, 26, 0.10), transparent 60%),
    radial-gradient(520px 260px at 80% 70%, rgba(255, 26, 26, 0.06), transparent 62%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 34%);
  opacity: 0.9;
}

.ad-slot__label {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
}

.ad-slot__size {
  position: relative;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

.ad-slot--banner {
  min-height: clamp(86px, 10vw, 120px);
}

.ad-slot--rectangle {
  min-height: 250px;
}

.ad-slot--skyscraper {
  min-height: 600px;
}

@media (max-width: 640px) {
  .ad-slot--skyscraper {
    min-height: 280px;
  }
}

.glass {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18, 18, 18, 0.62), rgba(8, 8, 8, 0.68));
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
}

.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 26, 26, 0.12), transparent 35%, rgba(255, 255, 255, 0.06));
  opacity: 0.7;
  mix-blend-mode: screen;
}

.glass {
  position: relative;
}

.panel {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.75);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.55);
}

.panel-raise {
  transform: translateY(0);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.panel-raise:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 26, 26, 0.28);
  box-shadow: 0 26px 90px rgba(0, 0, 0, 0.65);
}

.shadow-neon {
  box-shadow: 0 0 30px var(--glow);
}

.neon-border {
  box-shadow: inset 0 0 0 1px rgba(255, 26, 26, 0.28), 0 0 22px rgba(255, 26, 26, 0.18);
}

.badge-red {
  border: 1px solid rgba(255, 26, 26, 0.35);
  background: rgba(255, 26, 26, 0.12);
}

.badge-gray {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.input {
  width: 100%;
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.6);
  padding: 12px 12px;
  font-size: 14px;
  outline: none;
  color: rgba(255, 255, 255, 0.92);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background-color 140ms ease;
}

.input:focus {
  border-color: rgba(255, 26, 26, 0.65);
  box-shadow: 0 0 0 3px rgba(255, 26, 26, 0.14);
  background: rgba(10, 10, 10, 0.72);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  background: linear-gradient(90deg, rgba(255, 26, 26, 0.98), rgba(193, 18, 31, 0.78));
  border: 1px solid rgba(255, 26, 26, 0.38);
  box-shadow: 0 0 0 1px rgba(255, 26, 26, 0.16), 0 18px 60px rgba(255, 26, 26, 0.14);
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 0 0 1px rgba(255, 26, 26, 0.22), 0 0 24px rgba(255, 26, 26, 0.22), 0 24px 80px rgba(255, 26, 26, 0.14);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 26, 26, 0.3);
  box-shadow: 0 0 18px rgba(255, 26, 26, 0.1);
}

.btn-secondary:disabled,
.btn-primary:disabled {
  opacity: 0.55;
  transform: none;
  cursor: not-allowed;
}

.link {
  color: rgba(255, 26, 26, 0.9);
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.toast-host {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 50;
  display: grid;
  gap: 10px;
}

.toast {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 10, 10, 0.78);
  backdrop-filter: blur(10px);
  padding: 10px 12px;
  font-size: 13px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.62);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 26, 26, 0.98), rgba(193, 18, 31, 0.72));
  width: 0%;
  transition: width 240ms ease;
  box-shadow: 0 0 18px rgba(255, 26, 26, 0.35);
}

.page-enter {
  opacity: 0;
  transform: translateY(8px);
  animation: pageEnter 520ms ease forwards;
}

@keyframes pageEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.glow-text {
  text-shadow: 0 0 22px rgba(255, 26, 26, 0.18);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: radial-gradient(900px 400px at 20% 20%, rgba(255, 26, 26, 0.18), transparent 65%),
    radial-gradient(800px 500px at 90% 30%, rgba(255, 26, 26, 0.08), transparent 68%),
    rgba(10, 10, 10, 0.75);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.75);
}

.hero-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.85));
  pointer-events: none;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.8) contrast(1.05) brightness(0.55);
  opacity: 0.55;
}

.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.72), rgba(5, 5, 5, 0));
}

.navbar--landing {
  background: rgba(15, 15, 15, 0.22);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.navbar {
  position: relative;
  z-index: 90;
  border-radius: 999px;
}

@media (max-width: 640px) {
  .navbar {
    border-radius: 18px;
  }
}

.profile-menu {
  z-index: 200;
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.85);
}

/* Responsive profile menu: always fits viewport width on mobile. */
@media (max-width: 640px) {
  .profile-menu {
    width: min(92vw, 340px);
  }
}

.landing-hero {
  position: relative;
  padding-top: 118px;
  padding-bottom: 72px;
}

/* Responsive hero spacing: reduce top padding on mobile while keeping navbar clear. */
@media (max-width: 640px) {
  .landing-hero {
    padding-top: 96px;
    padding-bottom: 56px;
  }
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 520px at 12% 22%, rgba(255, 26, 26, 0.18), transparent 62%),
    radial-gradient(900px 520px at 92% 28%, rgba(255, 26, 26, 0.08), transparent 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.75));
  opacity: 1;
  pointer-events: none;
}

.landing-hero::after {
  content: "";
  position: absolute;
  inset: -40% -40% -40% -40%;
  background: radial-gradient(closest-side, rgba(255, 26, 26, 0.18), transparent 70%);
  filter: blur(30px);
  opacity: 0.25;
  animation: ambientSweep 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes ambientSweep {
  0% {
    transform: translate3d(-4%, -2%, 0) rotate(0deg);
  }
  50% {
    transform: translate3d(4%, 2%, 0) rotate(6deg);
  }
  100% {
    transform: translate3d(-4%, -2%, 0) rotate(0deg);
  }
}

.landing-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 26px;
  align-items: center;
  min-height: calc(100vh - 190px);
}

@media (min-width: 1024px) {
  .landing-hero-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 32px;
  }
  .landing-hero-copy {
    grid-column: span 6 / span 6;
  }
  .landing-hero-media {
    grid-column: span 6 / span 6;
  }
}

.cinematic-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.landing-title {
  margin-top: 18px;
  font-size: clamp(44px, 6.6vw, 86px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 750;
  text-transform: uppercase;
  text-shadow: 0 0 44px rgba(255, 26, 26, 0.12), 0 22px 70px rgba(0, 0, 0, 0.75);
}

/* Responsive title tuning: avoid text clipping and improve readability on small screens. */
@media (max-width: 420px) {
  .landing-title {
    line-height: 0.98;
    letter-spacing: -0.02em;
  }
}

.landing-subtitle {
  margin-top: 16px;
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.btn-xl {
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
}

/* Touch targets: bigger hit areas on mobile/tablet without changing behavior. */
@media (max-width: 768px) {
  .btn-xl {
    padding: 14px 16px;
    font-size: 15px;
  }
  .btn-primary,
  .btn-secondary {
    min-height: 44px;
  }
}

.landing-poster {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: clamp(360px, 58vh, 560px);
  box-shadow: 0 40px 140px rgba(0, 0, 0, 0.82);
}

/* Responsive poster: keep the right column readable without huge vertical scroll. */
@media (max-width: 640px) {
  .landing-poster {
    border-radius: 20px;
  }
}

.landing-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 5, 0.92) 0%, rgba(5, 5, 5, 0.38) 55%, rgba(5, 5, 5, 0.16) 100%);
  pointer-events: none;
}

.landing-poster-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(850px 560px at 80% 20%, rgba(255, 26, 26, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.74));
  pointer-events: none;
}

.landing-poster-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

.landing-card-stack {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 12px;
  width: min(360px, 78%);
}

/* Responsive stack: pin inside poster with safe margins on mobile. */
@media (max-width: 640px) {
  .landing-card-stack {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    gap: 10px;
  }
  .stream-card {
    padding: 12px 12px;
  }
  .stream-card__title {
    font-size: 13px;
  }
}

.stream-card {
  position: relative;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 15, 15, 0.48);
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
}

.stream-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 17px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 26, 26, 0.18);
}

.stream-card--dim {
  opacity: 0.86;
  transform: translateX(10px);
}

.stream-card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.45);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
}

.stream-card__title {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.94);
}

.stream-card__meta {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.cinematic-reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: cinematicIn 740ms cubic-bezier(0.2, 0.9, 0.22, 1) forwards;
}

.cinematic-reveal--2 {
  animation-delay: 90ms;
}

.cinematic-reveal--3 {
  animation-delay: 160ms;
}

.cinematic-reveal--4 {
  animation-delay: 240ms;
}

.cinematic-reveal--5 {
  animation-delay: 320ms;
}

.cinematic-reveal--6 {
  animation-delay: 390ms;
}

@keyframes cinematicIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.meter {
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.62);
  overflow: hidden;
}

.meter > div {
  height: 100%;
  border-radius: 999px;
  width: 0%;
  background: linear-gradient(90deg, rgba(255, 26, 26, 0.95), rgba(193, 18, 31, 0.7));
  box-shadow: 0 0 20px rgba(255, 26, 26, 0.32);
  transition: width 420ms ease;
}

.chip {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
}

.chip:hover {
  border-color: rgba(255, 26, 26, 0.26);
  box-shadow: 0 0 18px rgba(255, 26, 26, 0.1);
}

.card-enter {
  animation: cardEnter 420ms ease;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.count-flash {
  animation: countFlash 520ms ease;
}

@keyframes countFlash {
  from {
    text-shadow: 0 0 0 rgba(255, 26, 26, 0);
  }
  to {
    text-shadow: 0 0 22px rgba(255, 26, 26, 0.28);
  }
}
