:root {
  color-scheme: light;
  --ink: #0d0d0d;
  --ink-soft: #383838;
  --paper: #f5f5f3;
  --paper-deep: #dededa;
  --red: #e52228;
  --red-dark: #b81218;
  --blue: #f2f2ef;
  --yellow: #ffffff;
  --green: #3fc78b;
  --white: #fffdf7;
  --border: 2px solid var(--ink);
  --shadow: 7px 7px 0 var(--ink);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }

.noise {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 32px;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.brand-play {
  display: grid;
  width: 39px;
  height: 27px;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--white);
  background: var(--red);
  font-size: 12px;
}

.brand i { margin-left: 8px; color: var(--red); font-size: 12px; font-style: normal; letter-spacing: 0.08em; }

.watch-link {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.watch-link span { transition: transform 180ms ease; }
.watch-link:hover span { transform: translate(3px, -3px); }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  gap: 40px;
  align-items: center;
  min-height: 680px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 70px 32px 110px;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.035;
  background-image: linear-gradient(115deg, transparent 45%, var(--ink) 45%, var(--ink) 46%, transparent 46%);
  background-size: 17px 17px;
  content: "";
}

.eyebrow {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 28px;
  height: 2px;
  background: currentColor;
}

.hero h1,
.game-heading h2,
.rules h2,
.modal h2,
.win-card h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 900;
}

.hero h1 {
  margin: 0;
  font-size: clamp(64px, 8vw, 116px);
  font-weight: 900;
  line-height: 0.83;
  letter-spacing: -0.065em;
}

.hero h1 em {
  display: inline-block;
  color: var(--red);
  font-style: normal;
  transform: rotate(-2deg);
  transform-origin: left center;
}

.intro {
  max-width: 590px;
  margin: 34px 0 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.hero-actions,
.under-card-actions,
.modal-actions {
  display: flex;
  gap: 22px;
  align-items: center;
  margin-top: 34px;
}

.primary-button,
.secondary-button,
.icon-button,
.text-button,
.close-button {
  cursor: pointer;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 22px;
  border: var(--border);
  color: var(--white);
  background: var(--red);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.primary-button:hover,
.secondary-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.primary-button:active,
.secondary-button:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

.text-button {
  padding: 8px 2px;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  font-weight: 700;
}

.hero-art {
  position: relative;
  display: grid;
  min-height: 470px;
  place-items: center;
}

.creator-banner {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1.5;
  border: 5px solid var(--ink);
  border-radius: 3px;
  background-color: var(--ink);
  background-image: radial-gradient(circle at 25% 20%, rgba(255,255,255,0.06) 0 1px, transparent 1px);
  background-size: 5px 5px;
  box-shadow: 15px 15px 0 var(--ink);
  transform: rotate(2deg);
}

.creator-banner::before {
  position: absolute;
  inset: 28% 8% auto;
  color: var(--white);
  content: "OMFG SLOTS";
  font-family: "Montserrat", sans-serif;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  white-space: nowrap;
}

.creator-banner::after {
  position: absolute;
  left: 50%;
  bottom: 25%;
  padding: 9px 20px;
  border-radius: 4px;
  color: var(--white);
  background: var(--red);
  content: "▶  SUBSCRIBE";
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.creator-avatar {
  position: absolute;
  left: -4px;
  bottom: 12px;
  width: 165px;
  height: 165px;
  border: 7px solid var(--paper);
  border-radius: 50%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.05);
}

.creator-stamp {
  position: absolute;
  right: -5px;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  padding: 13px 17px;
  color: var(--white);
  background: var(--red);
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  letter-spacing: 0.08em;
  transform: rotate(-2deg);
}

.creator-stamp strong { font-size: 18px; letter-spacing: -0.02em; }

.burst {
  position: absolute;
  top: -5px;
  right: -18px;
  display: grid;
  width: 122px;
  height: 122px;
  place-items: center;
  clip-path: polygon(50% 0, 61% 17%, 79% 6%, 83% 28%, 100% 30%, 90% 50%, 100% 67%, 78% 72%, 78% 94%, 59% 82%, 47% 100%, 38% 81%, 17% 91%, 18% 68%, 0 61%, 15% 45%, 3% 27%, 25% 24%, 29% 3%);
  color: var(--ink);
  background: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
  transform: rotate(8deg);
}

.burst strong { font-size: 18px; }
.game-section {
  position: relative;
  overflow: hidden;
  padding: 96px max(32px, calc((100% - 1060px) / 2)) 110px;
  color: var(--white);
  background: #0b0b0b;
}

.game-section::before {
  position: absolute;
  inset: -40px;
  opacity: 0.06;
  background-image: radial-gradient(circle, var(--white) 1.2px, transparent 1.2px);
  background-size: 8px 8px;
  content: "";
  transform: rotate(-3deg);
}

.game-section > * { position: relative; }
.eyebrow.light { color: var(--red); }

.game-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.game-heading h2,
.rules h2 {
  margin: 0;
  font-size: clamp(38px, 5vw, 66px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.daily-badge {
  display: inline-block;
  margin: 16px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.4);
  color: #bdbdbd;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.game-actions { display: flex; gap: 10px; }

.icon-button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 30px;
  color: var(--white);
  background: rgba(255,255,255,0.06);
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease;
}

.icon-button:hover { border-color: var(--blue); background: rgba(81,199,231,0.15); }

.status-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.progress-copy { display: flex; gap: 8px; align-items: baseline; }
.progress-copy strong { font-size: 17px; }
.progress-copy span, #status-message { color: #b9c2ce; font-size: 14px; }
.progress-track { overflow: hidden; height: 8px; border-radius: 9px; background: rgba(255,255,255,0.13); }
.progress-track span { display: block; width: 4%; height: 100%; border-radius: inherit; background: var(--red); transition: width 300ms ease; }
#status-message { margin: 0; text-align: right; }

.bingo-shell {
  padding: 18px 18px 22px;
  border: 3px solid var(--ink);
  background: var(--red);
  box-shadow: 10px 10px 0 var(--white);
}

.bingo-letters,
.bingo-card {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.bingo-letters { margin-bottom: 12px; }
.bingo-letters span { font-family: "Montserrat", sans-serif; font-size: clamp(30px, 5vw, 56px); font-weight: 900; line-height: 1; text-align: center; }
.bingo-card { gap: 6px; }

.square {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  padding: clamp(5px, 1.2vw, 14px);
  border: 0;
  border-radius: 2px;
  color: var(--ink);
  background: var(--white);
  font-size: clamp(10px, 1.55vw, 17px);
  font-weight: 700;
  line-height: 1.16;
  text-align: center;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: transform 120ms ease, background 160ms ease;
}

.square:not(.checked):not(.free):hover { z-index: 2; transform: scale(1.035) rotate(-1deg); background: #fff4c7; }
.square.checked { color: var(--white); background: var(--red); text-decoration: line-through 2px rgba(0,0,0,0.5); text-decoration-skip-ink: none; }
.square.checked::after {
  position: absolute;
  inset: 7%;
  border: 3px solid var(--ink);
  border-radius: 50%;
  content: "";
  transform: rotate(-8deg);
}
.square.free { color: var(--ink); background: var(--yellow); }
.square.free strong { display: block; font-family: "Montserrat", sans-serif; font-size: clamp(15px, 2.2vw, 28px); font-weight: 900; }
.square.winning { animation: win-pulse 850ms ease infinite alternate; }

@keyframes win-pulse { to { background: var(--yellow); color: var(--ink); transform: scale(0.96); } }

.under-card-actions { justify-content: center; }
.secondary-button { color: var(--ink); background: var(--white); }
.light-text { color: var(--white); }

.rules {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 120px 32px;
}

.rule-list { margin: 0; padding: 0; list-style: none; }
.rule-list li { display: grid; grid-template-columns: 54px 1fr; gap: 18px; padding: 24px 0; border-top: 2px solid var(--ink); }
.rule-list li:last-child { border-bottom: 2px solid var(--ink); }
.rule-list span { color: var(--red); font-family: "Montserrat", sans-serif; font-size: 18px; font-weight: 900; }
.rule-list p { margin: 0; font-size: 17px; line-height: 1.55; }
.rule-list strong { display: block; font-size: 20px; }

.responsible-note {
  display: flex;
  gap: 18px;
  align-items: center;
  max-width: 980px;
  margin: 0 auto 100px;
  padding: 25px 30px;
  border: var(--border);
  background: var(--yellow);
  box-shadow: var(--shadow);
  transform: rotate(-0.5deg);
}
.responsible-note span { font-size: 30px; }
.responsible-note p { margin: 0; line-height: 1.5; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px max(32px, calc((100% - 1180px) / 2));
  color: var(--paper);
  background: var(--red);
  font-size: 13px;
  font-weight: 700;
}
footer p { margin: 0; }

.modal {
  width: min(560px, calc(100% - 28px));
  max-height: 90vh;
  padding: 30px;
  border: 3px solid var(--ink);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink);
}
.modal::backdrop { background: rgba(23,40,65,0.78); backdrop-filter: blur(4px); }
.modal-topline { display: flex; align-items: center; justify-content: space-between; }
.modal-kicker { color: var(--red); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.close-button { display: grid; width: 42px; height: 42px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: transparent; font-size: 28px; line-height: 1; }
.modal h2 { margin: 22px 0 16px; font-size: 38px; font-weight: 400; line-height: 1; }
.modal p { line-height: 1.55; }
.dialog-action { margin-top: 12px; }
.edit-modal { width: min(680px, calc(100% - 28px)); }
.edit-modal label { display: block; margin: 22px 0 8px; font-weight: 800; }
.edit-modal textarea { width: 100%; padding: 14px; border: 2px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--white); line-height: 1.45; resize: vertical; }
.field-note { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }
.modal-actions { justify-content: space-between; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  padding: 14px 18px;
  border: 2px solid var(--ink);
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 800;
  transform: translateY(150%);
  transition: transform 220ms ease;
}
.toast.visible { transform: translateY(0); }

.win-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  visibility: hidden;
  background: rgba(23,40,65,0.9);
  opacity: 0;
  transition: opacity 200ms ease, visibility 200ms ease;
}
.win-overlay.visible { visibility: visible; opacity: 1; }
.win-card { z-index: 2; padding: 40px 55px; border: 4px solid var(--ink); background: var(--yellow); box-shadow: 12px 12px 0 var(--red); text-align: center; transform: rotate(-2deg) scale(0.8); transition: transform 350ms cubic-bezier(.2,.9,.2,1.4); }
.win-overlay.visible .win-card { transform: rotate(-2deg) scale(1); }
.win-card p { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.win-card h2 { margin: 6px 0 25px; color: var(--red); font-size: clamp(58px, 10vw, 100px); font-weight: 400; line-height: 1; }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 22px; background: var(--color); animation: confetti-fall var(--duration) linear var(--delay) infinite; transform: rotate(var(--rotation)); }
@keyframes confetti-fall { to { transform: translateY(110vh) rotate(720deg); } }

:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-top: 45px; }
  .hero-art { min-height: 410px; }
  .creator-banner { width: 390px; }
  .game-heading { align-items: start; flex-direction: column; }
  .rules { grid-template-columns: 1fr; gap: 45px; }
}

@media (max-width: 580px) {
  .site-header { padding: 16px 18px; }
  .watch-link { font-size: 13px; }
  .hero { min-height: auto; padding: 60px 20px 90px; }
  .hero h1 { font-size: clamp(55px, 18vw, 90px); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-art { min-height: 350px; margin-top: 8px; }
  .creator-banner { width: 285px; box-shadow: 10px 10px 0 var(--ink); }
  .creator-avatar { left: 0; bottom: 22px; width: 115px; height: 115px; border-width: 5px; }
  .creator-stamp { right: 0; bottom: 28px; padding: 10px 12px; }
  .creator-stamp strong { font-size: 14px; }
  .burst { top: -15px; right: -5px; bottom: auto; width: 95px; height: 95px; }
  .game-section { padding: 74px 12px 85px; }
  .game-heading, .status-row { padding-left: 8px; padding-right: 8px; }
  .game-actions { width: 100%; }
  .icon-button { flex: 1; justify-content: center; font-size: 13px; }
  .status-row { grid-template-columns: 1fr auto; }
  .progress-track { grid-column: 1 / -1; grid-row: 2; }
  #status-message { max-width: 150px; }
  .bingo-shell { padding: 10px 7px 12px; box-shadow: 6px 6px 0 var(--white); }
  .bingo-letters { margin-bottom: 7px; }
  .bingo-card { gap: 3px; }
  .square { padding: 3px; font-size: clamp(8px, 2.75vw, 13px); line-height: 1.08; }
  .square.checked::after { border-width: 2px; }
  .under-card-actions { flex-direction: column; }
  .rules { padding: 90px 22px; }
  .responsible-note { align-items: flex-start; margin: 0 22px 80px; padding: 22px; }
  footer { align-items: flex-start; flex-direction: column; padding: 24px 22px; }
  .modal { padding: 22px; }
  .modal-actions { align-items: stretch; flex-direction: column-reverse; }
  .win-card { padding: 32px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
