:root {
  --bg: #fff8ef;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: #ffffff;
  --text: #1f2340;
  --muted: #66708f;
  --primary: #6c63ff;
  --primary-dark: #5146e5;
  --accent: #ffb84d;
  --accent-2: #32c7a3;
  --danger: #ff6f7d;
  --line: rgba(89, 95, 152, 0.14);
  --shadow: 0 20px 60px rgba(80, 69, 168, 0.16);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 192, 103, 0.28), transparent 26%),
    radial-gradient(circle at top right, rgba(108, 99, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #fffaf4 0%, #fff1de 100%);
  min-height: 100vh;
  position: relative;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.page-glow {
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  z-index: -1;
}

.page-glow--left {
  left: -100px;
  top: 100px;
  background: rgba(255, 184, 77, 0.55);
}

.page-glow--right {
  right: -80px;
  top: 180px;
  background: rgba(108, 99, 255, 0.4);
}

.hero,
.section {
  padding: 36px 0;
}

.hero {
  padding-top: 40px;
  padding-bottom: 18px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.eyebrow,
.section__label {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(108, 99, 255, 0.12);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.hero__lead {
  font-size: 1.1rem;
  max-width: 640px;
  margin-bottom: 24px;
}

.hero__actions,
.controls {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-weight: 700;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: linear-gradient(135deg, var(--primary), #8d7dff);
  color: #fff;
  box-shadow: 0 16px 30px rgba(108, 99, 255, 0.28);
}

.button--primary:hover {
  box-shadow: 0 20px 36px rgba(108, 99, 255, 0.34);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(108, 99, 255, 0.16);
  color: var(--text);
}

.button--large {
  min-width: 200px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}

.hero__facts li {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 600;
}

.hero__card,
.rule-card,
.game-panel,
.board-card,
.status-card,
.dice-visual {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: var(--shadow);
}

.hero__card,
.game-panel,
.board-card {
  border-radius: var(--radius-xl);
}

.hero__card {
  padding: 22px;
}

.hero__card-copy {
  margin-bottom: 0;
  margin-top: 18px;
}

.mini-board {
  position: relative;
  aspect-ratio: 1;
  border-radius: 24px;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff, #fff6ea);
  border: 1px solid rgba(89, 95, 152, 0.1);
  overflow: hidden;
}

.mini-board__cells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  position: relative;
  z-index: 2;
}

.mini-board__cells span {
  min-height: 60px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: rgba(31, 35, 64, 0.72);
  background: linear-gradient(180deg, #fff4df, #fffdfa);
  border: 1px solid rgba(89, 95, 152, 0.08);
}

.mini-board__path,
.mini-board__token {
  position: absolute;
  z-index: 1;
}

.mini-board__path--ladder {
  width: 14px;
  height: 170px;
  left: 34%;
  top: 16%;
  background: linear-gradient(180deg, #32c7a3, #5ee0c0);
  border-radius: 999px;
  transform: rotate(-24deg);
  box-shadow: 0 0 0 6px rgba(50, 199, 163, 0.14);
}

.mini-board__path--snake {
  width: 18px;
  height: 180px;
  right: 26%;
  top: 12%;
  background: linear-gradient(180deg, #ff7c89, #ff586d);
  border-radius: 999px;
  transform: rotate(28deg);
  box-shadow: 0 0 0 7px rgba(255, 111, 125, 0.12);
}

.mini-board__token {
  font-size: 1.5rem;
  color: var(--primary);
  bottom: 24px;
  left: 20px;
}

.intro {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: center;
}

.section__head {
  margin-bottom: 22px;
}

.section__head--tight {
  margin-bottom: 18px;
}

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

.rule-card {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.rule-card__icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff4dd, #fff);
  margin-bottom: 14px;
}

.game-layout {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.game-panel,
.board-card {
  padding: 24px;
}

.status-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 18px;
}

.status-card__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.status-card strong {
  font-size: 1.15rem;
}

.dice-visual {
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 18px;
}

.dice-visual__cube {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f5f1ff);
  margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px rgba(89, 95, 152, 0.08);
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  font-size: 0.95rem;
  color: var(--muted);
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.legend__dot--player { background: var(--primary); }
.legend__dot--ladder { background: var(--accent-2); }
.legend__dot--snake { background: var(--danger); }

.board-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.board-card__top p {
  margin-bottom: 0;
}

.board-wrapper {
  overflow: auto;
}

.board {
  position: relative;
  min-width: 640px;
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: repeat(10, 1fr);
  gap: 6px;
  padding: 10px;
  border-radius: 26px;
  background: linear-gradient(180deg, #fff, #fff6ea);
  border: 1px solid rgba(89, 95, 152, 0.12);
}

.cell {
  position: relative;
  min-height: 54px;
  border-radius: 14px;
  padding: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: rgba(31, 35, 64, 0.75);
  background: #fffdf9;
  border: 1px solid rgba(89, 95, 152, 0.08);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cell:nth-child(4n + 1) {
  background: #fff9f0;
}

.cell--ladder {
  background: linear-gradient(180deg, rgba(50, 199, 163, 0.2), rgba(255, 255, 255, 0.96));
}

.cell--snake {
  background: linear-gradient(180deg, rgba(255, 111, 125, 0.18), rgba(255, 255, 255, 0.96));
}

.cell--player {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(108, 99, 255, 0.18);
  border-color: rgba(108, 99, 255, 0.38);
}

.cell__badge {
  font-size: 0.7rem;
  padding: 4px 7px;
  border-radius: 999px;
  color: #fff;
}

.cell__badge--ladder {
  background: var(--accent-2);
}

.cell__badge--snake {
  background: var(--danger);
}

.token {
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, var(--primary), #8f84ff);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 8px 16px rgba(108, 99, 255, 0.28);
}

.cell--highlight {
  animation: pulse 0.7s ease;
}

@keyframes pulse {
  0% { transform: scale(0.96); }
  55% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.footer {
  padding: 10px 0 34px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.footer__inner p {
  margin-bottom: 0;
}

@media (max-width: 1040px) {
  .hero__grid,
  .intro,
  .game-layout,
  .rules-grid {
    grid-template-columns: 1fr 1fr;
  }

  .game-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .hero__grid,
  .intro,
  .rules-grid,
  .status-card {
    grid-template-columns: 1fr;
  }

  .hero,
  .section {
    padding: 26px 0;
  }

  .game-panel,
  .board-card,
  .hero__card {
    padding: 18px;
  }

  .board {
    min-width: 560px;
  }

  h1 {
    font-size: 2.8rem;
  }
}

@media (max-width: 540px) {
  .container {
    width: min(calc(100% - 20px), var(--container));
  }

  .button,
  .button--large {
    width: 100%;
  }

  .board {
    min-width: 500px;
    gap: 4px;
    padding: 8px;
  }

  .cell {
    min-height: 48px;
    border-radius: 12px;
    font-size: 0.74rem;
  }
}