:root {
  --ink: #14161f;
  --muted: #5b6172;
  --line: #e7e9f0;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --brand: #5b5bf6;
  --brand-2: #ff5ca8;
  --radius: 16px;
  --maxw: 1080px;
  --shadow: 0 10px 30px rgba(20, 22, 31, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

section { padding: 72px 24px; max-width: var(--maxw); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; }
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.brand-mark.small { width: 28px; height: 28px; border-radius: 8px; font-size: 14px; }

.brand-name { font-size: 20px; letter-spacing: -0.02em; }

.nav { display: flex; gap: 22px; }
.nav a { color: var(--muted); font-weight: 600; }
.nav a:hover { color: var(--ink); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: 96px; padding-bottom: 64px; }

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(40px, 7vw, 72px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions { margin-top: 32px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: #4a4af0; }

.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-disabled {
  background: var(--bg-soft);
  color: var(--muted);
  cursor: default;
}
.btn-disabled:hover { transform: none; }

/* ---------- Games ---------- */
.games h2, .about h2, .contact h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.12s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-live { border-color: transparent; box-shadow: var(--shadow); }

.thumb {
  height: 168px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.thumb-stack { background: linear-gradient(160deg, #0b1020, #1a2545); }
.thumb-reflex { background: linear-gradient(160deg, #2a1040, #4a1d6b); }
.thumb-merge { background: linear-gradient(160deg, #0f2a2a, #14463f); }

/* Stack thumbnail blocks */
.thumb-stack .block { position: absolute; height: 26px; border-radius: 4px; }
.thumb-stack .b1 { width: 120px; bottom: 40px; background: linear-gradient(#7fd0ff, #4aa8e0); }
.thumb-stack .b2 { width: 104px; bottom: 70px; background: linear-gradient(#9b8bff, #6c5ce0); transform: translateX(-12px); }
.thumb-stack .b3 { width: 88px; bottom: 100px; background: linear-gradient(#ff9bd0, #e05ca0); transform: translateX(10px); }

/* Reflex thumbnail */
.thumb-reflex .ring {
  width: 90px; height: 90px; border-radius: 50%;
  border: 10px solid;
  border-color: #ff5ca8 #ffd35c #5cffb0 #5cb8ff;
}
.thumb-reflex .dot { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; transform: translateY(-45px); }

/* Merge thumbnail */
.thumb-merge { gap: 8px; grid-auto-flow: column; }
.thumb-merge .tile {
  width: 40px; height: 40px; border-radius: 8px;
  display: grid; place-items: center;
  font-weight: 800; color: #06382f;
  background: #d8f3ec;
}
.thumb-merge .tile:nth-child(2) { background: #aee9da; }
.thumb-merge .tile:nth-child(3) { background: #7ddcc4; }
.thumb-merge .tile:nth-child(4) { background: #46cda8; color: #fff; }

.card-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-body h3 { font-size: 20px; font-weight: 800; }
.card-body p { margin: 0; color: var(--muted); font-size: 15px; flex: 1; }
.card-body .btn { align-self: flex-start; margin-top: 4px; }

.tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  white-space: nowrap;
}
.tag-live { background: rgba(91, 91, 246, 0.12); color: var(--brand); }

/* ---------- About / Contact ---------- */
.about, .contact { border-top: 1px solid var(--line); }
.about p { max-width: 680px; font-size: 18px; }
.about .muted, .muted { color: var(--muted); }
.contact p { font-size: 18px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}
.site-footer p { margin: 0; }

@media (max-width: 560px) {
  .nav { gap: 14px; }
  section { padding: 56px 20px; }
}
