/* ============================================
   NEON ARCADE — dark neon arcade theme
   ============================================ */

:root {
  --bg: #07070f;
  --bg-2: #0c0c18;
  --panel: rgba(255, 255, 255, 0.03);
  --panel-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --txt: #e9eaf7;
  --muted: #8b8ea8;

  --cyan: #22e6ff;
  --magenta: #ff2fd0;
  --lime: #39ff14;
  --amber: #ffc93c;
  --violet: #8b5cff;
  --red: #ff3b5c;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --font-display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --font-body: "Rajdhani", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- animated grid backdrop ------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(34, 230, 255, 0.14), transparent 60%),
    radial-gradient(900px 560px at 92% 8%, rgba(255, 47, 208, 0.13), transparent 60%),
    radial-gradient(800px 700px at 50% 108%, rgba(139, 92, 255, 0.12), transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 75% 60% at 50% 32%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 32%, #000 35%, transparent 100%);
}

.wrap {
  width: min(1120px, 100% - 40px);
  margin-inline: auto;
}

/* --- scanline overlay ------------------------------------- */
body.scanlines::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.16) 3px,
    rgba(0, 0, 0, 0.16) 4px
  );
  opacity: 0.5;
}

/* --- header ---------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--txt);
  text-transform: uppercase;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 1.05rem;
  background: linear-gradient(135deg, var(--cyan), var(--violet) 55%, var(--magenta));
  box-shadow: 0 0 18px rgba(34, 230, 255, 0.5);
}

.logo em {
  font-style: normal;
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(34, 230, 255, 0.65);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}

.site-nav a:hover {
  color: var(--txt);
  background: var(--panel-2);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--txt);
  font-size: 1.1rem;
  cursor: pointer;
}

/* --- buttons --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 24px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: #05060c;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 26px rgba(34, 230, 255, 0.3);
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.22s, filter 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 12px 34px rgba(34, 230, 255, 0.45);
}

.btn:active {
  transform: translateY(0);
}

.btn.ghost {
  background: transparent;
  color: var(--txt);
  box-shadow:  inset 0 0 0 1px var(--line);
}

.btn.ghost:hover {
  background: var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn.sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* --- hero ------------------------------------------------- */
.hero {
  padding: 82px 0 54px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero h1 .neon {
  background: linear-gradient(120deg, var(--cyan), var(--magenta) 50%, var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(255, 47, 208, 0.4));
}

.hero p {
  max-width: 620px;
  margin: 0 auto 34px;
  font-size: 1.16rem;
  color: var(--muted);
}

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

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

.stat {
  min-width: 148px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}

.stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(34, 230, 255, 0.5);
}

.stat-label {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- section headings ------------------------------------ */
.section {
  padding: 54px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-head p {
  color: var(--muted);
  font-size: 1.02rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.filter:hover {
  color: var(--txt);
  border-color: rgba(255, 255, 255, 0.24);
}

.filter.active {
  color: #05060c;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(34, 230, 255, 0.45);
}

/* --- game grid ------------------------------------------- */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 20px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s, border-color 0.22s, box-shadow 0.28s;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(420px 180px at 50% 0%, var(--card-glow, rgba(34, 230, 255, 0.22)), transparent 70%);
  transition: opacity 0.28s;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-accent, var(--cyan));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.5), 0 0 34px -8px var(--card-accent, var(--cyan));
}

.game-card:hover::before {
  opacity: 1;
}

.game-card > * {
  position: relative;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 1.7rem;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  transition: box-shadow 0.28s, transform 0.28s;
}

.game-card:hover .card-icon {
  transform: scale(1.06) rotate(-4deg);
  box-shadow: 0 0 26px -4px var(--card-accent, var(--cyan));
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-top h3 {
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-tag {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-accent, var(--cyan));
  white-space: nowrap;
}

.card-desc {
  margin: 9px 0 18px;
  font-size: 0.98rem;
  color: var(--muted);
  flex-grow: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.card-foot .best b {
  color: var(--card-accent, var(--cyan));
  font-family: var(--font-display);
}

.card-play {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--txt);
}

.game-card:hover .card-play {
  color: var(--card-accent, var(--cyan));
}

/* --- feature strip --------------------------------------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 7px;
}

.feature p {
  font-size: 0.95rem;
  color: var(--muted);
}

/* --- footer ---------------------------------------------- */
.site-footer {
  padding: 40px 0;
  margin-top: 40px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer .keys {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 18px;
}

kbd {
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--panel-2);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--txt);
}

/* ============================================
   GAME PAGE
   ============================================ */

.play-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 66px);
}

.game-top {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.game-top .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.game-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.game-title .icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 1.3rem;
  background: var(--panel);
}

.game-title h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.game-title p {
  font-size: 0.88rem;
  color: var(--muted);
}

/* --- HUD -------------------------------------------------- */
.hud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hud-item {
  min-width: 92px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  text-align: center;
}

.hud-item .k {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.hud-item .v {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}

.hud-item.score .v {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(34, 230, 255, 0.5);
}

.hud-item.best .v {
  color: var(--amber);
  text-shadow: 0 0 14px rgba(255, 201, 60, 0.45);
}

/* --- stage ------------------------------------------------ */
.stage {
  display: flex;
  flex-grow: 1;
  align-items: center;
  justify-content: center;
  padding: 30px 0 40px;
}

.game-shell {
  width: 100%;
  max-width: 640px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  box-shadow: var(--shadow);
  position: relative;
}

.game-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

canvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  touch-action: none;
  background: rgba(0, 0, 0, 0.35);
}

.controls-hint {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.game-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

/* --- overlay ---------------------------------------------- */
.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 18px;
  background: rgba(6, 6, 14, 0.86);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  z-index: 10;
  animation: fadeIn 0.28s ease;
}

.overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.overlay-card {
  width: 100%;
  max-width: 360px;
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  text-align: center;
  box-shadow: var(--shadow);
}

.overlay-emoji {
  font-size: 2.6rem;
  margin-bottom: 10px;
}

.overlay-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.overlay-card .final {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(34, 230, 255, 0.55);
  line-height: 1.1;
  margin-bottom: 6px;
}

.overlay-card p {
  color: var(--muted);
  margin-bottom: 8px;
}

.overlay-card .newbest {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1200;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.overlay-card .hint {
  font-size: 0.86rem;
  margin-top: 4px;
}

.overlay-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* --- shared game widgets ---------------------------------- */
.ttt-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(330px, 84vw);
}

.ttt-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  font-weight: 800;
  color: var(--txt);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.ttt-cell:hover:not(:disabled) {
  background: var(--panel-2);
  border-color: var(--cyan);
  transform: scale(1.04);
}

.ttt-cell:disabled {
  cursor: default;
}

.ttt-cell.win {
  background: rgba(57, 255, 20, 0.14);
  border-color: var(--lime);
  box-shadow: 0 0 22px -4px var(--lime);
  color: var(--lime);
}

.ttt-cell.x {
  color: var(--cyan);
  text-shadow: 0 0 16px rgba(34, 230, 255, 0.6);
}

.ttt-cell.o {
  color: var(--magenta);
  text-shadow: 0 0 16px rgba(255, 47, 208, 0.6);
}

/* 2048 */
.g2048 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  width: min(340px, 86vw);
  padding: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.g2048-tile {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.05rem, 4.4vw, 1.7rem);
  background: var(--panel);
  color: var(--muted);
  transition: background 0.14s ease;
}

.g2048-tile[data-v="2"]    { background: #1c2333; color: #c9d4ea; }
.g2048-tile[data-v="4"]    { background: #22314d; color: #dbe6fb; }
.g2048-tile[data-v="8"]    { background: #2f5fd0; color: #fff; box-shadow: 0 0 16px -4px #2f5fd0; }
.g2048-tile[data-v="16"]   { background: #2f8fd0; color: #fff; box-shadow: 0 0 18px -3px #2f8fd0; }
.g2048-tile[data-v="32"]   { background: #22b0a8; color: #04211f; }
.g2048-tile[data-v="64"]   { background: #39d14a; color: #05240a; box-shadow: 0 0 20px -3px #39d14a; }
.g2048-tile[data-v="128"]  { background: #d8d02f; color: #2a2604; font-size: clamp(0.95rem, 4vw, 1.5rem); }
.g2048-tile[data-v="256"]  { background: #ffa32f; color: #2c1702; font-size: clamp(0.95rem, 4vw, 1.5rem); }
.g2048-tile[data-v="512"]  { background: #ff6b2f; color: #2c0e02; font-size: clamp(0.95rem, 4vw, 1.5rem); }
.g2048-tile[data-v="1024"] { background: #ff2fd0; color: #fff; font-size: clamp(0.8rem, 3.4vw, 1.3rem); box-shadow: 0 0 24px -3px #ff2fd0; }
.g2048-tile[data-v="2048"] { background: var(--lime); color: #05240a; font-size: clamp(0.8rem, 3.4vw, 1.3rem); box-shadow: 0 0 30px -3px var(--lime); animation: pop 0.32s ease; }
.g2048-tile.win {
  background: linear-gradient(135deg, var(--amber), var(--magenta));
  color: #fff;
  animation: pop 0.4s ease;
  box-shadow: 0 0 32px -4px var(--amber);
}

@keyframes pop {
  0% { transform: scale(0.72); }
  55% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* memory */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  width: min(360px, 88vw);
  perspective: 800px;
}

.mem-card {
  aspect-ratio: 3 / 4;
  border: 0;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.36s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.mem-card.flipped,
.mem-card.matched {
  transform: rotateY(180deg);
}

.mem-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid var(--line);
}

.mem-back {
  background: linear-gradient(135deg, rgba(139, 92, 255, 0.28), rgba(34, 230, 255, 0.16));
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.4);
}

.mem-front {
  background: rgba(255, 255, 255, 0.07);
  font-size: clamp(1.4rem, 6vw, 2rem);
  transform: rotateY(180deg);
}

.mem-card.matched .mem-front {
  background: rgba(57, 255, 20, 0.16);
  border-color: var(--lime);
  box-shadow: 0 0 22px -6px var(--lime);
}

.mem-card.matched {
  animation: matchPulse 0.5s ease;
}

@keyframes matchPulse {
  50% { transform: rotateY(180deg) scale(1.09); }
}

.mem-card:disabled {
  cursor: default;
}

/* toasts */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  padding: 11px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 12, 24, 0.95);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--txt);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 500;
  box-shadow: var(--shadow);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.empty-note {
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* --- responsive ------------------------------------------- */
@media (max-width: 720px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 18px;
    background: rgba(7, 7, 15, 0.97);
    border-bottom: 1px solid var(--line);
  }

  .site-nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 54px 0 36px;
  }

  .hero-stats {
    margin-top: 34px;
  }

  .stat {
    flex: 1 1 44%;
    min-width: 0;
    padding: 14px 10px;
  }

  .game-shell {
    padding: 14px;
  }

  .hud {
    width: 100%;
  }

  .hud-item {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
  }
}

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