* {
  box-sizing: border-box;
}

:root {
  --teaser-text: #f8f7ff;
  --teaser-muted: rgba(248, 247, 255, 0.62);
  --teaser-stroke: rgba(255, 255, 255, 0.16);
  --teaser-panel: rgba(5, 4, 15, 0.68);
  --teaser-pulse: rgba(169, 24, 255, 0.34);
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  color: var(--teaser-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, rgba(2, 1, 8, 0.22), rgba(2, 1, 8, 0.94)),
    url("assets/zagadki-bg.jpg") center / cover fixed no-repeat;
}

.teaser-page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px;
  isolation: isolate;
}

.teaser-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(circle at 50% 34%, rgba(122, 20, 255, 0.22), transparent 32%),
    radial-gradient(circle at 72% 18%, rgba(239, 42, 168, 0.16), transparent 26%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.76), rgba(6, 2, 24, 0.62));
}

.teaser-noise,
.teaser-scan {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.teaser-noise {
  z-index: -2;
  opacity: 0.18;
  background-image:
    linear-gradient(90deg, transparent 0 48%, rgba(255, 255, 255, 0.14) 49% 51%, transparent 52% 100%),
    linear-gradient(0deg, transparent 0 48%, rgba(255, 255, 255, 0.1) 49% 51%, transparent 52% 100%);
  background-size: 76px 76px, 54px 54px;
  mix-blend-mode: overlay;
}

.teaser-scan {
  z-index: -1;
  opacity: 0.28;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 9px,
    rgba(255, 255, 255, 0.08) 10px,
    transparent 11px
  );
  animation: scanMove 9s linear infinite;
}

.teaser-panel {
  width: min(760px, 100%);
  padding: clamp(26px, 5vw, 52px);
  border-radius: 18px;
  background: var(--teaser-panel);
  border: 1px solid var(--teaser-stroke);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.56),
    0 0 80px rgba(75, 20, 180, 0.24);
  backdrop-filter: blur(20px);
  text-align: center;
  transform: translateY(-2vh);
}

.sound-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.2), transparent 36%),
    linear-gradient(135deg, rgba(106, 22, 255, 0.94), rgba(221, 31, 179, 0.92));
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(169, 24, 255, 0.3);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.sound-icon {
  width: 29px;
  height: 29px;
  overflow: visible;
}

.sound-icon path:first-child {
  fill: #fff;
}

.sound-icon path:not(:first-child) {
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.42;
}

.sound-toggle[aria-pressed="true"] {
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.38),
    0 0 42px rgba(44, 212, 255, 0.44);
}

.sound-toggle[aria-pressed="true"] .sound-icon path:not(:first-child) {
  opacity: 1;
}

.sound-toggle:hover {
  transform: translateY(-2px);
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.countdown-cell {
  min-width: 0;
  padding: 18px 12px 16px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.045)),
    rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.035);
}

.countdown-cell strong {
  display: block;
  font-size: clamp(34px, 7vw, 68px);
  line-height: 0.92;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 28px var(--teaser-pulse);
}

.countdown-cell span {
  display: block;
  margin-top: 9px;
  color: var(--teaser-muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@keyframes scanMove {
  from {
    transform: translateY(-42px);
  }

  to {
    transform: translateY(42px);
  }
}

@media (max-width: 640px) {
  html,
  body {
    min-height: 100%;
    background-color: #080018;
  }

  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .teaser-page {
    min-height: 100svh;
    padding:
      max(18px, env(safe-area-inset-top))
      18px
      max(92px, env(safe-area-inset-bottom));
    place-items: center;
  }

  .teaser-panel {
    width: min(100%, 390px);
    padding: 18px;
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
      rgba(5, 4, 15, 0.78);
    transform: translateY(-4vh);
    box-shadow:
      0 22px 70px rgba(0, 0, 0, 0.52),
      0 0 52px rgba(75, 20, 180, 0.2);
  }

  .sound-toggle {
    right: 14px;
    top: max(14px, env(safe-area-inset-top));
    bottom: auto;
    width: 44px;
    height: 44px;
    opacity: 0.86;
  }

  .sound-icon {
    width: 25px;
    height: 25px;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .countdown-cell {
    min-height: 78px;
    display: grid;
    align-content: center;
    padding: 10px 6px 9px;
    border-radius: 12px;
    background:
      radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.12), transparent 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.028)),
      rgba(0, 0, 0, 0.2);
  }

  .countdown-cell strong {
    font-size: clamp(26px, 9vw, 42px);
    letter-spacing: 0;
  }

  .countdown-cell span {
    margin-top: 7px;
    font-size: 8px;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 380px) {
  .teaser-page {
    padding-right: 14px;
    padding-left: 14px;
  }

  .teaser-panel {
    padding: 12px;
  }

  .countdown-cell {
    min-height: 70px;
  }

  .countdown-cell strong {
    font-size: 25px;
  }

  .countdown-cell span {
    font-size: 7px;
    letter-spacing: 0.13em;
  }
}
