:root {
  --bg0: #e8f2ef;
  --bg1: #d4e8e2;
  --ink: #10211c;
  --muted: #4a655c;
  --accent: #0d7a5f;
  --accent-deep: #065240;
  --danger: #c23b22;
  --like: #0d7a5f;
  --surface: rgba(255, 255, 255, 0.55);
  --line: rgba(16, 33, 28, 0.12);
  --font-display: "Syne", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 12% -10%, #f7fff8 0%, transparent 55%),
    radial-gradient(900px 600px at 110% 10%, #bfe3d8 0%, transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 55%, #c9ddd6);
  overflow-x: hidden;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 0;
}

.glow {
  display: none;
}

.stage {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
}

.screen {
  width: min(560px, 100%);
  text-align: center;
  animation: rise 0.7s var(--ease) both;
}

.screen[hidden] {
  display: none !important;
}

.brand {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3.4rem, 12vw, 5.6rem);
  letter-spacing: -0.06em;
  line-height: 0.9;
  color: var(--ink);
}

.brand-sm {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  margin: 0;
}

.hero-line {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 4.5vw, 2.15rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero-sub,
.wait-sub,
.result-sub,
.hint,
.muted {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.cta-row {
  margin-top: 1.75rem;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--ink);
  color: #f3faf7;
  padding: 0.95rem 1.7rem;
  border-radius: 4px;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-accent {
  background: var(--accent);
  color: #f3faf7;
}

.btn-ghost {
  border-color: var(--line);
  background: var(--surface);
  backdrop-filter: blur(8px);
}

.btn-round {
  width: 5.1rem;
  height: 5.1rem;
  border-radius: 50%;
  font-size: 1.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  line-height: 1;
}

.btn-ico {
  font-size: 1.35rem;
}

.btn-cap {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.btn-sm {
  padding: 0.45rem 0.8rem;
  font-size: 0.88rem;
  border-radius: 4px;
}

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.progress {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--muted);
}

.deck {
  perspective: 900px;
  min-height: min(58vh, 420px);
  display: grid;
  place-items: center;
}

.card {
  position: relative;
  width: 100%;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  will-change: transform;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 18px 40px rgba(16, 33, 28, 0.12);
}

.card-media {
  aspect-ratio: 16 / 10;
  background: #0b1a16;
}

.card-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.yt-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #0b1a16 center / cover no-repeat;
}

.yt-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 68px;
  height: 48px;
  margin: -24px 0 0 -34px;
  border-radius: 10px;
  background: #f00;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.yt-play::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 14px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
}

.yt-fallback {
  margin: 0;
  padding: 0.55rem 1rem 0;
  text-align: center;
}

.yt-fallback a {
  color: var(--accent-deep);
  font-weight: 600;
  font-size: 0.92rem;
}

.card-grip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.card-grip::before,
.card-grip::after {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: rgba(16, 33, 28, 0.22);
}

.stamp {
  position: absolute;
  top: 1.1rem;
  padding: 0.35rem 0.7rem;
  border: 3px solid;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: rotate(-12deg) scale(0.9);
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.stamp-like {
  left: 1rem;
  color: var(--like);
  border-color: var(--like);
}

.stamp-nope {
  right: 1rem;
  color: var(--danger);
  border-color: var(--danger);
  transform: rotate(12deg) scale(0.9);
}

.controls {
  margin-top: 1.35rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.hint {
  margin-top: 0.9rem;
  font-size: 0.92rem;
}

.wait-pulse {
  width: 72px;
  height: 72px;
  margin: 1.5rem auto 1.25rem;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: pulse 1.6s var(--ease) infinite;
}

.wait-title,
.result-title {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.result-title-xl {
  font-size: clamp(2.4rem, 9vw, 4.2rem);
}

.result-govno {
  min-height: 70dvh;
  display: grid;
  place-content: center;
  gap: 0.5rem;
}

.poop {
  margin: 0;
  font-size: clamp(7rem, 28vw, 12rem);
  line-height: 1;
  animation: pop 0.65s var(--ease) both;
}

.result-ok {
  animation: rise 0.7s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes pop {
  0% {
    transform: scale(0.4);
    opacity: 0;
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .card-media {
    aspect-ratio: 16 / 11;
  }
  .btn-round {
    width: 4.6rem;
    height: 4.6rem;
  }
  .btn-cap {
    font-size: 0.6rem;
  }
}
