/* Oyun Şehri — sıfır bağımlılıklı, mobil öncelikli arayüz */
:root {
  color-scheme: dark;
  --bg: #070b16;
  --bg-soft: #0d1425;
  --panel: rgba(17, 26, 48, .86);
  --panel-solid: #111a30;
  --panel-2: #17213a;
  --text: #f5f7ff;
  --muted: #a9b3cb;
  --line: rgba(255,255,255,.105);
  --primary: #8b5cf6;
  --primary-2: #6d3de7;
  --cyan: #22d3ee;
  --lime: #a3e635;
  --gold: #fbbf24;
  --danger: #fb7185;
  --ok: #34d399;
  --shadow: 0 26px 80px rgba(0,0,0,.34);
  --shadow-sm: 0 12px 32px rgba(0,0,0,.24);
  --radius: 24px;
  --radius-sm: 15px;
  --max: 1180px;
  --header: 76px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7ff;
  --bg-soft: #e9eefc;
  --panel: rgba(255,255,255,.88);
  --panel-solid: #fff;
  --panel-2: #eef2ff;
  --text: #11162a;
  --muted: #59627a;
  --line: rgba(17,22,42,.12);
  --shadow: 0 26px 70px rgba(44,56,96,.16);
  --shadow-sm: 0 10px 30px rgba(44,56,96,.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -5%, rgba(139,92,246,.19), transparent 32rem),
    radial-gradient(circle at 96% 12%, rgba(34,211,238,.10), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
::selection { color: #fff; background: var(--primary); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 999;
  top: 10px;
  left: 10px;
  padding: 10px 15px;
  border-radius: 10px;
  color: #fff;
  background: #111827;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.container { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.muted { color: var(--muted); }
.accent-text {
  color: transparent;
  background: linear-gradient(110deg, #b69aff, var(--cyan));
  background-clip: text;
  -webkit-background-clip: text;
}

/* Header */
.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header);
  border-bottom: 1px solid transparent;
  background: rgba(7,11,22,.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: border-color .25s, box-shadow .25s;
}
html[data-theme="light"] .site-header { background: rgba(245,247,255,.78); }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 28px rgba(0,0,0,.12); }
.nav-wrap { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.1rem; font-weight: 900; letter-spacing: -.025em; white-space: nowrap; }
.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #a78bfa, #6d28d9 58%, #4c1d95);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.35), 0 8px 22px rgba(109,40,217,.35);
  transform: rotate(-4deg);
}
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 15px 0 0 var(--gold); }
.brand-mark::before { top: 10px; left: 9px; }
.brand-mark::after { right: 9px; bottom: 9px; box-shadow: -15px 0 0 #fff; }
.brand-name span { color: var(--cyan); }
.primary-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.primary-nav a { padding: 10px 13px; border-radius: 11px; color: var(--muted); font-weight: 700; font-size: .93rem; transition: color .2s, background .2s; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  transition: transform .2s var(--ease), border-color .2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: rgba(139,92,246,.55); }
.menu-btn { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s, background .2s;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #9b73ff, #6d3de7); box-shadow: 0 13px 28px rgba(109,61,231,.32), inset 0 1px rgba(255,255,255,.35); }
.btn-primary:hover { box-shadow: 0 17px 34px rgba(109,61,231,.42); }
.btn-secondary { border-color: var(--line); background: var(--panel); }
.btn-secondary:hover { border-color: rgba(139,92,246,.55); }
.btn-small { min-height: 39px; padding: 9px 14px; border-radius: 11px; font-size: .88rem; }

/* Home hero */
.hero { position: relative; padding: clamp(64px, 8vw, 112px) 0 76px; isolation: isolate; }
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% -20% auto;
  height: 480px;
  opacity: .32;
  background-image: linear-gradient(rgba(139,92,246,.17) 1px, transparent 1px), linear-gradient(90deg, rgba(139,92,246,.17) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  transform: perspective(600px) rotateX(65deg) translateY(130px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(390px, .97fr); align-items: center; gap: clamp(40px, 7vw, 90px); }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 19px; padding: 7px 12px; border: 1px solid rgba(163,230,53,.25); border-radius: 999px; color: #c8f875; background: rgba(163,230,53,.075); font-weight: 800; font-size: .82rem; letter-spacing: .02em; }
html[data-theme="light"] .eyebrow { color: #4d7c0f; }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(163,230,53,.12); }
.hero h1 { max-width: 750px; margin: 0; font-size: clamp(2.7rem, 6vw, 5.4rem); letter-spacing: -.062em; line-height: .98; }
.hero-lead { max-width: 610px; margin: 25px 0 0; color: var(--muted); font-size: clamp(1rem, 1.55vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 20px; margin: 29px 0 0; padding: 0; color: var(--muted); list-style: none; font-size: .89rem; font-weight: 700; }
.hero-proof li::before { content: "✓"; margin-right: 7px; color: var(--ok); font-weight: 900; }

.arcade-wrap { position: relative; min-height: 480px; perspective: 1100px; }
.arcade-glow { position: absolute; inset: 16% 3%; border-radius: 50%; background: rgba(139,92,246,.26); filter: blur(70px); }
.arcade-floor { position: absolute; right: 0; bottom: 8%; left: 0; height: 42%; border-radius: 50%; background: radial-gradient(ellipse, rgba(34,211,238,.19), transparent 66%); transform: rotateX(68deg); }
.arcade-cabinet {
  position: absolute;
  top: 25px;
  left: 50%;
  width: min(320px, 76%);
  height: 390px;
  padding: 26px 24px;
  border: 1px solid rgba(255,255,255,.23);
  border-radius: 33px 33px 46px 46px;
  color: #fff;
  background: linear-gradient(145deg, #31215e, #151d3e 55%, #0b1024);
  box-shadow: inset -18px -18px 32px rgba(0,0,0,.25), inset 8px 8px 18px rgba(255,255,255,.07), 30px 42px 64px rgba(0,0,0,.42);
  transform: translateX(-50%) rotateY(-9deg) rotateX(2deg);
  transform-style: preserve-3d;
}
.arcade-cabinet::before { content: "OYUN ŞEHRİ"; display: block; margin-bottom: 17px; color: #ded5ff; font-size: .82rem; font-weight: 900; letter-spacing: .2em; text-align: center; }
.arcade-screen { position: relative; display: grid; height: 205px; grid-template-columns: repeat(3,1fr); gap: 8px; padding: 17px; overflow: hidden; border: 8px solid #090d1a; border-radius: 18px; background: radial-gradient(circle at 40% 20%, #233e6e, #081323 65%); box-shadow: inset 0 0 40px rgba(34,211,238,.16); }
.screen-tile { display: grid; place-items: center; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(139,92,246,.12); font-size: 1.65rem; animation: floatTile 4s var(--ease) infinite; }
.screen-tile:nth-child(2n) { animation-delay: -1.4s; }
.screen-tile:nth-child(3n) { animation-delay: -2.4s; }
.arcade-controls { display: flex; align-items: center; justify-content: space-around; padding-top: 30px; }
.joystick { position: relative; width: 18px; height: 60px; border-radius: 9px; background: #15203b; transform: rotate(-10deg); box-shadow: inset 2px 0 rgba(255,255,255,.12); }
.joystick::before { content: ""; position: absolute; top: -13px; left: -9px; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(145deg, #fb7185, #be123c); box-shadow: inset 5px 5px 8px rgba(255,255,255,.16), 0 7px 10px rgba(0,0,0,.34); }
.joystick::after { content: ""; position: absolute; bottom: -5px; left: -19px; width: 56px; height: 16px; border-radius: 50%; background: #080d1d; }
.arcade-buttons { display: flex; gap: 15px; }
.arcade-buttons i { display: block; width: 35px; height: 35px; border-radius: 50%; background: linear-gradient(145deg, #22d3ee, #087b91); box-shadow: inset 5px 5px 8px rgba(255,255,255,.22), 0 7px 0 #054b5b; }
.arcade-buttons i:last-child { background: linear-gradient(145deg, #fbbf24, #b45309); box-shadow: inset 5px 5px 8px rgba(255,255,255,.22), 0 7px 0 #78350f; }
.float-card { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: var(--shadow-sm); backdrop-filter: blur(12px); font-weight: 800; font-size: .82rem; animation: floatBadge 5s var(--ease) infinite; }
.float-card b { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: #fff; background: var(--primary); }
.float-one { top: 70px; left: -8px; }
.float-two { right: -4px; bottom: 96px; animation-delay: -2.5s; }
@keyframes floatTile { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes floatBadge { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-12px) rotate(1deg); } }

/* Sections and cards */
.section { padding: 90px 0; }
.section-tight { padding-top: 54px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-kicker { margin: 0 0 7px; color: var(--cyan); font-size: .78rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.section h2, .content-page h1 { margin: 0; font-size: clamp(2rem, 4.4vw, 3.45rem); line-height: 1.08; letter-spacing: -.045em; }
.section-head p { max-width: 520px; margin: 0; color: var(--muted); }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.game-card {
  position: relative;
  display: flex;
  min-height: 365px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(255,255,255,.065), transparent 35%), var(--panel);
  box-shadow: var(--shadow-sm);
  transform-style: preserve-3d;
  transition: transform .32s var(--ease), border-color .25s, box-shadow .32s;
}
.game-card:hover { z-index: 2; border-color: rgba(139,92,246,.55); box-shadow: var(--shadow); transform: translateY(-9px) perspective(900px) rotateX(1.5deg); }
.game-art { position: relative; display: grid; height: 178px; place-items: center; overflow: hidden; background: linear-gradient(135deg, rgba(139,92,246,.22), rgba(34,211,238,.08)); isolation: isolate; }
.game-art::before { content: ""; position: absolute; z-index: -1; width: 135px; height: 135px; border-radius: 50%; background: var(--card-glow, rgba(139,92,246,.28)); filter: blur(25px); }
.game-art::after { content: ""; position: absolute; right: -22px; bottom: -42px; left: -22px; height: 80px; border-radius: 50%; background: rgba(0,0,0,.24); filter: blur(12px); transform: rotateX(72deg); }
.game-symbol { position: relative; z-index: 1; display: grid; width: 104px; height: 104px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 28px; color: #fff; background: linear-gradient(145deg, rgba(255,255,255,.20), rgba(255,255,255,.045)), #382170; box-shadow: inset 8px 8px 16px rgba(255,255,255,.10), inset -12px -12px 20px rgba(0,0,0,.2), 12px 22px 28px rgba(0,0,0,.28); font-size: 3.35rem; text-shadow: 0 5px 10px rgba(0,0,0,.3); transform: perspective(500px) rotateX(10deg) rotateY(-12deg) translateY(-4px); transition: transform .35s var(--ease); }
.game-card:hover .game-symbol { transform: perspective(500px) rotateX(0) rotateY(6deg) translateY(-10px) scale(1.04); }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 21px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.card-badge { padding: 4px 8px; border-radius: 999px; color: #d9ceff; background: rgba(139,92,246,.14); }
html[data-theme="light"] .card-badge { color: #5b21b6; }
.card-body h3 { margin: 0; font-size: 1.26rem; letter-spacing: -.02em; }
.card-body p { margin: 8px 0 17px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.card-link { display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: #c8b8ff; font-weight: 900; font-size: .88rem; }
html[data-theme="light"] .card-link { color: #6d28d9; }
.card-link i { font-style: normal; transition: transform .2s; }
.game-card:hover .card-link i { transform: translateX(5px); }

.feature-band { position: relative; overflow: hidden; border-block: 1px solid var(--line); background: rgba(139,92,246,.045); }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); }
.feature { min-height: 185px; padding: 30px; background: var(--bg); }
.feature-icon { display: grid; width: 44px; height: 44px; margin-bottom: 18px; place-items: center; border: 1px solid rgba(34,211,238,.2); border-radius: 13px; color: var(--cyan); background: rgba(34,211,238,.08); font-size: 1.25rem; }
.feature h3 { margin: 0 0 6px; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: .88rem; }

.split-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: start; }
.info-panel { padding: clamp(24px,4vw,44px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow-sm); }
.info-panel h2 { font-size: clamp(1.8rem,3.4vw,2.8rem); }
.info-panel p { color: var(--muted); }
.faq-list { display: grid; gap: 11px; }
.faq-list details { border: 1px solid var(--line); border-radius: 15px; background: var(--panel); }
.faq-list summary { position: relative; padding: 17px 48px 17px 19px; cursor: pointer; font-weight: 850; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; top: 15px; right: 18px; color: var(--cyan); font-size: 1.3rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 19px 18px; color: var(--muted); }

/* Game detail pages */
.page-top { padding: 34px 0 22px; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 21px; padding: 0; color: var(--muted); list-style: none; font-size: .84rem; font-weight: 700; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 8px; opacity: .45; }
.breadcrumb a:hover { color: var(--cyan); }
.game-heading { display: flex; align-items: center; gap: 19px; }
.game-heading-icon { display: grid; width: 74px; height: 74px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 21px; color: #fff; background: linear-gradient(145deg, #8b5cf6, #4338ca); box-shadow: inset 4px 4px 8px rgba(255,255,255,.18), 0 15px 28px rgba(76,29,149,.25); font-size: 2.3rem; }
.game-heading h1 { margin: 0; font-size: clamp(2rem,4vw,3.4rem); letter-spacing: -.045em; line-height: 1; }
.game-heading p { margin: 8px 0 0; color: var(--muted); }
.game-layout { display: grid; grid-template-columns: minmax(0,1fr) 285px; gap: 22px; padding-bottom: 52px; align-items: start; }
.game-frame { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-solid); box-shadow: var(--shadow); }
.game-topbar { display: flex; min-height: 59px; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 17px; border-bottom: 1px solid var(--line); background: var(--panel); }
.game-topbar strong { font-size: .93rem; }
.live-label { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.live-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52,211,153,.12); }
.game-root { position: relative; min-height: 570px; padding: clamp(14px,3vw,28px); background: radial-gradient(circle at 50% 0%, rgba(139,92,246,.09), transparent 45%), var(--bg-soft); touch-action: manipulation; }
.game-sidebar { display: grid; gap: 16px; }
.side-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.side-card h2, .side-card h3 { margin: 0 0 10px; font-size: 1rem; }
.side-card p, .side-card li { color: var(--muted); font-size: .86rem; }
.side-card ol, .side-card ul { margin: 0; padding-left: 20px; }
.side-card .btn { width: 100%; }
.game-copy { padding: 24px 0 84px; border-top: 1px solid var(--line); }
.prose { max-width: 820px; }
.prose h2 { margin: 42px 0 10px; font-size: clamp(1.55rem,3vw,2.2rem); letter-spacing: -.03em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 27px 0 8px; }
.prose p, .prose li { color: var(--muted); }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 11px; border: 1px solid var(--line); text-align: left; }

/* Shared game components */
.game-panel { width: 100%; max-width: 760px; margin-inline: auto; }
.game-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px; margin-bottom: 18px; }
.game-stat { min-width: 84px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: center; }
.game-stat span { display: block; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.game-stat strong { display: block; font-size: 1rem; font-variant-numeric: tabular-nums; }
.control-btn { min-height: 40px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); font-weight: 800; cursor: pointer; transition: transform .18s, border-color .18s, background .18s; }
.control-btn:hover:not(:disabled) { border-color: var(--primary); transform: translateY(-2px); }
.control-btn.primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, #8b5cf6, #6d3de7); }
.control-btn.danger { color: #fecdd3; background: rgba(251,113,133,.12); }
.control-btn:disabled { opacity: .45; cursor: not-allowed; }
.game-status { min-height: 28px; margin: 12px auto 0; color: var(--muted); font-size: .89rem; font-weight: 750; text-align: center; }
.game-status.success { color: var(--ok); }
.game-status.error { color: var(--danger); }
.game-overlay { position: absolute; z-index: 20; inset: 0; display: grid; padding: 20px; place-items: center; background: rgba(4,7,15,.75); backdrop-filter: blur(9px); }
.game-modal { width: min(100%,380px); padding: 30px; border: 1px solid rgba(255,255,255,.17); border-radius: 24px; background: var(--panel-solid); box-shadow: var(--shadow); text-align: center; }
.game-modal .modal-icon { font-size: 3.5rem; }
.game-modal h2 { margin: 7px 0; font-size: 1.7rem; }
.game-modal p { margin: 0 0 18px; color: var(--muted); }

/* XO */
.xo-board { display: grid; width: min(100%,450px); margin: 12px auto; grid-template-columns: repeat(3,1fr); gap: 11px; perspective: 900px; }
.xo-cell { position: relative; display: grid; aspect-ratio: 1; padding: 0; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; color: var(--text); background: linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.015)), var(--panel-solid); box-shadow: inset 3px 3px 6px rgba(255,255,255,.05), 0 9px 0 rgba(0,0,0,.18), 0 15px 25px rgba(0,0,0,.16); font-size: clamp(2.8rem,12vw,5.4rem); font-weight: 950; cursor: pointer; transition: transform .16s var(--ease), border-color .16s; }
.xo-cell:hover:empty { border-color: rgba(34,211,238,.5); transform: translateY(-4px); }
.xo-cell[data-value="X"] { color: var(--cyan); text-shadow: 0 0 24px rgba(34,211,238,.35); }
.xo-cell[data-value="O"] { color: #c4b5fd; text-shadow: 0 0 24px rgba(139,92,246,.4); }
.xo-cell.win { border-color: var(--lime); background: rgba(163,230,53,.12); animation: winPulse .7s ease alternate infinite; }
@keyframes winPulse { to { transform: translateY(-5px) scale(1.025); } }

/* Sudoku */
.sudoku-layout { display: grid; grid-template-columns: minmax(280px,510px) 155px; justify-content: center; gap: 20px; }
.sudoku-board { display: grid; overflow: hidden; grid-template-columns: repeat(9,1fr); border: 3px solid #4d5d83; border-radius: 10px; background: #4d5d83; box-shadow: 0 20px 42px rgba(0,0,0,.25); }
.sudoku-cell { display: grid; aspect-ratio: 1; padding: 0; place-items: center; border: 0; border-right: 1px solid rgba(100,116,139,.32); border-bottom: 1px solid rgba(100,116,139,.32); color: var(--text); background: var(--panel-solid); font-size: clamp(.85rem,3vw,1.35rem); font-weight: 800; cursor: pointer; }
.sudoku-cell:nth-child(3n) { border-right-width: 3px; border-right-color: #4d5d83; }
.sudoku-cell:nth-child(9n) { border-right: 0; }
.sudoku-cell:nth-child(n+19):nth-child(-n+27), .sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-bottom-width: 3px; border-bottom-color: #4d5d83; }
.sudoku-cell.given { color: #c4b5fd; background: rgba(139,92,246,.09); cursor: default; }
.sudoku-cell.peer { background: rgba(34,211,238,.055); }
.sudoku-cell.same { color: var(--cyan); background: rgba(34,211,238,.11); }
.sudoku-cell.selected { color: #fff; background: var(--primary); }
.sudoku-cell.error { color: #fff; background: #be123c; }
.number-pad { display: grid; align-content: start; grid-template-columns: repeat(3,1fr); gap: 8px; }
.number-pad button { display: grid; aspect-ratio: 1; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); font-weight: 900; cursor: pointer; }
.number-pad button:hover { border-color: var(--cyan); background: rgba(34,211,238,.08); }
.number-pad .wide { grid-column: span 3; aspect-ratio: auto; min-height: 40px; font-size: .8rem; }

/* 2048 */
.g2048-board { position: relative; display: grid; width: min(100%,500px); margin: 14px auto; padding: 11px; grid-template-columns: repeat(4,1fr); gap: 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 19px; background: #202941; box-shadow: inset 0 4px 10px rgba(0,0,0,.2), 0 20px 40px rgba(0,0,0,.22); touch-action: none; }
.g2048-cell { display: grid; aspect-ratio: 1; place-items: center; border-radius: 12px; color: #fff; background: rgba(255,255,255,.07); box-shadow: inset 0 2px rgba(255,255,255,.07); font-size: clamp(1.2rem,5.5vw,2.25rem); font-weight: 950; letter-spacing: -.04em; }
.g2048-cell[data-value="2"] { color: #30285a; background: #ddd6fe; }
.g2048-cell[data-value="4"] { color: #30285a; background: #c4b5fd; }
.g2048-cell[data-value="8"] { background: #a78bfa; }
.g2048-cell[data-value="16"] { background: #8b5cf6; }
.g2048-cell[data-value="32"] { background: #7c3aed; }
.g2048-cell[data-value="64"] { background: #6d28d9; }
.g2048-cell[data-value="128"] { color: #17210a; background: #bef264; box-shadow: 0 0 25px rgba(190,242,100,.22); }
.g2048-cell[data-value="256"] { color: #17210a; background: #a3e635; }
.g2048-cell[data-value="512"] { color: #2c1a02; background: #fbbf24; }
.g2048-cell[data-value="1024"] { background: #f97316; }
.g2048-cell[data-value="2048"] { background: linear-gradient(135deg,#22d3ee,#8b5cf6); box-shadow: 0 0 35px rgba(34,211,238,.35); }
.g2048-help { margin: 8px 0 0; color: var(--muted); font-size: .8rem; text-align: center; }

/* Connect four */
.connect-board { display: grid; width: min(100%,610px); margin: 16px auto; padding: 14px; grid-template-columns: repeat(7,1fr); gap: 8px; border: 1px solid #5571e6; border-radius: 22px; background: linear-gradient(145deg,#4361d1,#263c9d); box-shadow: inset 7px 7px 12px rgba(255,255,255,.1), 0 18px 0 #17245e, 0 30px 42px rgba(0,0,0,.25); }
.connect-cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: #10192d; box-shadow: inset 3px 5px 9px rgba(0,0,0,.65), 0 1px rgba(255,255,255,.13); cursor: pointer; }
.connect-cell::after { content: ""; position: absolute; inset: 9%; border-radius: inherit; transition: background .2s, transform .2s; }
.connect-cell.red::after { background: radial-gradient(circle at 36% 30%,#fb9baa,#e11d48 58%,#881337); box-shadow: inset 4px 4px 6px rgba(255,255,255,.23), 0 4px 8px rgba(0,0,0,.3); }
.connect-cell.yellow::after { background: radial-gradient(circle at 36% 30%,#fde68a,#f59e0b 58%,#92400e); box-shadow: inset 4px 4px 6px rgba(255,255,255,.28), 0 4px 8px rgba(0,0,0,.3); }
.connect-cell.win::after { animation: discWin .6s alternate infinite; box-shadow: 0 0 0 5px #fff, 0 0 25px var(--lime); }
@keyframes discWin { to { transform: scale(.84); } }

/* Memory */
.memory-board { display: grid; width: min(100%,610px); margin: 15px auto; grid-template-columns: repeat(4,1fr); gap: 11px; perspective: 1100px; }
.memory-card { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 16px; background: transparent; cursor: pointer; transform-style: preserve-3d; transition: transform .5s var(--ease); }
.memory-card.flipped, .memory-card.matched { transform: rotateY(180deg); }
.memory-face { position: absolute; inset: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.memory-back { color: rgba(255,255,255,.65); background: linear-gradient(145deg,#8b5cf6,#39217a); box-shadow: inset 5px 5px 8px rgba(255,255,255,.15), 0 8px 0 #25134f, 0 14px 20px rgba(0,0,0,.18); font-size: 1.5rem; font-weight: 950; }
.memory-front { background: var(--panel-solid); box-shadow: inset 0 0 25px rgba(34,211,238,.08); font-size: clamp(1.6rem,7vw,3.2rem); transform: rotateY(180deg); }
.memory-card.matched .memory-front { border-color: var(--ok); background: rgba(52,211,153,.09); }

/* Chess */
.chess-wrap { display: grid; grid-template-columns: minmax(300px,610px) 120px; align-items: start; justify-content: center; gap: 17px; }
.chess-board { display: grid; overflow: hidden; grid-template-columns: repeat(8,1fr); border: 8px solid #252c42; border-radius: 12px; background: #252c42; box-shadow: 0 24px 50px rgba(0,0,0,.35); }
.chess-square { position: relative; display: grid; aspect-ratio: 1; padding: 0; place-items: center; border: 0; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", serif; font-size: clamp(1.7rem,6.6vw,3.7rem); line-height: 1; cursor: pointer; }
.chess-square.light { background: #d8dcef; }
.chess-square.dark { background: #6673a8; }
.chess-square .white-piece { color: #fafcff; text-shadow: 0 2px 0 #27304f, 0 4px 5px rgba(0,0,0,.45); }
.chess-square .black-piece { color: #151a2b; text-shadow: 0 1px 0 rgba(255,255,255,.35), 0 3px 3px rgba(0,0,0,.25); }
.chess-square.selected { box-shadow: inset 0 0 0 5px var(--cyan); }
.chess-square.legal::after { content: ""; position: absolute; width: 25%; height: 25%; border-radius: 50%; background: rgba(16,185,129,.72); box-shadow: 0 0 0 4px rgba(16,185,129,.16); }
.chess-square.capture::after { width: 77%; height: 77%; border: 5px solid rgba(251,191,36,.88); background: transparent; }
.chess-square.last { box-shadow: inset 0 0 0 999px rgba(251,191,36,.18); }
.chess-ranks { display: grid; gap: 8px; }
.chess-log { max-height: 455px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.chess-log h3 { position: sticky; top: 0; margin: 0; padding: 10px; background: var(--panel-solid); font-size: .8rem; }
.chess-log ol { margin: 0; padding: 7px 7px 10px 32px; color: var(--muted); font-size: .73rem; }

/* Backgammon */
.tavla-panel { max-width: 850px; }
.tavla-board { position: relative; display: grid; width: 100%; aspect-ratio: 1.48; margin: 12px auto 24px; padding: 12px 42px; grid-template-columns: repeat(12,1fr); grid-template-rows: 1fr 1fr; gap: 4px; overflow: hidden; border: 9px solid #3d2115; border-radius: 15px; background: linear-gradient(90deg,#9a6338 49%,#4b2b1c 49%,#4b2b1c 51%,#9a6338 51%); box-shadow: inset 0 0 35px rgba(40,18,7,.65), 0 22px 45px rgba(0,0,0,.35); }
.tavla-point { position: relative; z-index: 1; display: flex; min-width: 0; align-items: center; padding: 1px; border: 0; background: transparent; cursor: pointer; }
.tavla-point.top { flex-direction: column; justify-content: flex-start; }
.tavla-point.bottom { flex-direction: column-reverse; justify-content: flex-start; }
.tavla-point::before { content: ""; position: absolute; z-index: -1; inset-inline: 3px; opacity: .9; }
.tavla-point.top::before { top: 0; border-top: min(18vw,210px) solid #2e5680; border-right: min(3.4vw,37px) solid transparent; border-left: min(3.4vw,37px) solid transparent; }
.tavla-point.bottom::before { bottom: 0; border-right: min(3.4vw,37px) solid transparent; border-bottom: min(18vw,210px) solid #2e5680; border-left: min(3.4vw,37px) solid transparent; }
.tavla-point:nth-child(even)::before { filter: hue-rotate(125deg) saturate(.7) brightness(1.15); }
.tavla-point.selected::after, .tavla-point.legal::after { content: ""; position: absolute; z-index: -1; inset: 3px; border: 3px solid var(--cyan); border-radius: 8px; background: rgba(34,211,238,.12); }
.tavla-point.legal::after { border-color: var(--lime); background: rgba(163,230,53,.13); }
.checker { position: relative; z-index: 2; display: grid; width: min(4.1vw,36px); aspect-ratio: 1; flex: 0 0 auto; place-items: center; border: 2px solid rgba(0,0,0,.35); border-radius: 50%; font-size: .66rem; font-weight: 900; line-height: 1; box-shadow: inset 4px 4px 7px rgba(255,255,255,.27), inset -4px -4px 7px rgba(0,0,0,.22), 0 3px 5px rgba(0,0,0,.34); }
.tavla-point.top .checker + .checker, .tavla-point.bottom .checker + .checker { margin-top: -2px; }
.checker.white { color: #334155; background: #f8fafc; }
.checker.black { color: #fff; background: #171b2d; border-color: rgba(255,255,255,.18); }
.tavla-bar { position: absolute; z-index: 4; top: 0; bottom: 0; left: 50%; display: flex; width: 28px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #fff; background: #40251a; transform: translateX(-50%); font-size: .68rem; font-weight: 900; }
.tavla-off { position: absolute; z-index: 4; right: 6px; display: grid; width: 30px; height: 42%; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 7px; background: rgba(0,0,0,.25); color: #fff; font-weight: 900; }
.tavla-off.black { top: 5%; }
.tavla-off.white { bottom: 5%; }
.dice-row { display: flex; justify-content: center; gap: 9px; }
.die { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 12px; color: #141827; background: #fff; box-shadow: inset 3px 3px 4px rgba(255,255,255,.8), 0 7px 0 #aab1c1, 0 11px 14px rgba(0,0,0,.25); font-size: 1.35rem; font-weight: 950; }
.die.used { opacity: .25; transform: translateY(5px); }

/* Okey */
.okey-table { padding: clamp(14px,3vw,25px); border: 8px solid #432416; border-radius: 90px 90px 24px 24px; background: radial-gradient(circle at 50% 15%,#16786a,#07584f 70%); box-shadow: inset 0 0 50px rgba(0,0,0,.38), 0 24px 45px rgba(0,0,0,.32); }
.okey-opponents { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 19px; }
.opponent { padding: 8px; border: 1px solid rgba(255,255,255,.14); border-radius: 11px; color: rgba(255,255,255,.8); background: rgba(0,0,0,.18); text-align: center; font-size: .76rem; font-weight: 800; }
.opponent span { display: block; font-size: .68rem; opacity: .7; }
.okey-center { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 98px; margin-bottom: 17px; color: #fff; }
.okey-pile { display: grid; width: 61px; height: 77px; place-items: center; border: 2px solid #eee9d8; border-radius: 7px; color: #e8e3d4; background: repeating-linear-gradient(45deg,#6443b5 0 5px,#513499 5px 10px); box-shadow: 3px 4px 0 #d5cfbd, 6px 8px 0 #9f998a, 0 12px 18px rgba(0,0,0,.3); font-weight: 900; cursor: pointer; }
.okey-indicator { text-align: center; font-size: .7rem; }
.okey-discard { min-width: 70px; text-align: center; font-size: .68rem; }
.okey-rack { padding: 13px 14px 17px; border: 4px solid #8a4e1f; border-radius: 12px 12px 22px 22px; background: linear-gradient(#d29a4f,#9b5a27); box-shadow: inset 0 7px 9px rgba(255,255,255,.21), 0 10px 0 #5a3019, 0 19px 25px rgba(0,0,0,.27); }
.okey-hand { display: grid; grid-template-columns: repeat(15,minmax(30px,1fr)); gap: 4px; min-height: 74px; align-items: end; }
.okey-tile { position: relative; display: grid; width: 100%; aspect-ratio: .69; max-height: 76px; min-height: 54px; padding: 2px; place-items: center; border: 1px solid #b8b09d; border-radius: 7px; color: #121827; background: linear-gradient(145deg,#fffdf4,#ddd8c8); box-shadow: inset 2px 2px rgba(255,255,255,.8), 0 4px 0 #948c7b, 0 6px 8px rgba(0,0,0,.25); font-size: clamp(.85rem,2.7vw,1.28rem); font-weight: 950; cursor: pointer; transition: transform .17s var(--ease), box-shadow .17s; }
.okey-tile::after { content: "●"; position: absolute; bottom: 2px; color: currentColor; font-size: .48em; }
.okey-tile.red { color: #dc2626; }
.okey-tile.blue { color: #2563eb; }
.okey-tile.black { color: #111827; }
.okey-tile.yellow { color: #ca8a04; }
.okey-tile.fake { color: #7c3aed; font-size: 1.15rem; }
.okey-tile.joker { box-shadow: inset 0 0 0 3px var(--gold), 0 4px 0 #948c7b, 0 0 18px rgba(251,191,36,.4); }
.okey-tile.selected { z-index: 3; transform: translateY(-13px); box-shadow: inset 0 0 0 3px var(--cyan), 0 10px 0 #948c7b, 0 15px 18px rgba(0,0,0,.25); }
.okey-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }

/* Content, footer, 404 */
.content-page { padding: 62px 0 95px; }
.content-card { max-width: 860px; padding: clamp(24px,5vw,54px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.content-card h1 { margin-bottom: 12px; }
.content-card h2 { margin-top: 35px; }
.content-card p, .content-card li { color: var(--muted); }
.not-found { display: grid; min-height: calc(100vh - var(--header)); place-items: center; padding: 50px 0; text-align: center; }
.not-found-code { color: transparent; background: linear-gradient(135deg,var(--cyan),var(--primary)); background-clip: text; -webkit-background-clip: text; font-size: clamp(6rem,20vw,13rem); font-weight: 950; line-height: .8; letter-spacing: -.08em; }
.not-found h1 { margin: 25px 0 7px; }
.not-found p { margin: 0 0 25px; color: var(--muted); }
.site-footer { padding: 55px 0 24px; border-top: 1px solid var(--line); background: rgba(0,0,0,.10); }
.footer-grid { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: 42px; }
.footer-about p { max-width: 440px; color: var(--muted); font-size: .9rem; }
.footer-col h2 { margin: 0 0 12px; font-size: .9rem; }
.footer-links { display: grid; gap: 8px; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); font-size: .87rem; }
.footer-links a:hover { color: var(--cyan); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

@media (max-width: 1020px) {
  .game-grid { grid-template-columns: repeat(2,1fr); }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .game-layout { grid-template-columns: 1fr; }
  .game-sidebar { grid-template-columns: repeat(3,1fr); }
  .hero-grid { grid-template-columns: 1fr 390px; gap: 35px; }
  .primary-nav a { padding-inline: 9px; }
  .tavla-board { padding-inline: 34px; }
}

@media (max-width: 820px) {
  :root { --header: 68px; }
  .primary-nav { position: fixed; top: var(--header); right: 16px; left: 16px; display: grid; gap: 4px; padding: 13px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-solid); box-shadow: var(--shadow); transform: translateY(-18px) scale(.98); opacity: 0; visibility: hidden; transition: .22s var(--ease); }
  .primary-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .primary-nav a { padding: 12px; }
  .menu-btn { display: grid; }
  .hero { padding-top: 55px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero h1, .hero-lead { margin-inline: auto; }
  .hero-actions, .hero-proof { justify-content: center; }
  .arcade-wrap { width: min(100%,500px); margin-inline: auto; }
  .split-panel { grid-template-columns: 1fr; }
  .sudoku-layout { grid-template-columns: minmax(280px,510px); }
  .number-pad { grid-template-columns: repeat(10,1fr); }
  .number-pad button { aspect-ratio: auto; min-height: 42px; }
  .number-pad .wide { grid-column: span 1; }
  .chess-wrap { grid-template-columns: minmax(280px,610px); }
  .chess-ranks { grid-template-columns: 1fr; }
  .chess-log { display: none; }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 22px), var(--max)); }
  .brand-name { font-size: 1rem; }
  .nav-wrap { gap: 9px; }
  .nav-actions { margin-left: auto; }
  .game-grid { grid-template-columns: 1fr; }
  .game-card { min-height: 330px; }
  .game-art { height: 155px; }
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding: 68px 0; }
  .section-head { align-items: start; flex-direction: column; margin-bottom: 26px; }
  .arcade-wrap { min-height: 420px; }
  .arcade-cabinet { height: 355px; }
  .arcade-screen { height: 180px; }
  .float-one { left: 0; top: 52px; }
  .float-two { right: 0; bottom: 47px; }
  .game-heading { align-items: flex-start; }
  .game-heading-icon { width: 59px; height: 59px; border-radius: 17px; font-size: 1.8rem; }
  .game-root { min-height: 510px; padding: 13px 9px 19px; }
  .game-sidebar { grid-template-columns: 1fr; }
  .side-card:not(:first-child) { display: none; }
  .game-topbar { min-height: 52px; }
  .sudoku-layout { gap: 13px; }
  .number-pad { gap: 4px; }
  .number-pad button { min-height: 37px; padding: 0; font-size: .8rem; }
  .connect-board { gap: 4px; padding: 8px; border-radius: 14px; box-shadow: 0 10px 0 #17245e,0 18px 25px rgba(0,0,0,.23); }
  .memory-board { gap: 7px; }
  .memory-face { border-radius: 11px; }
  .okey-table { border-width: 5px; border-radius: 38px 38px 17px 17px; }
  .okey-hand { grid-template-columns: repeat(8,1fr); row-gap: 9px; }
  .okey-tile { min-height: 48px; max-height: 63px; }
  .tavla-board { aspect-ratio: 1.18; padding: 8px 28px; gap: 1px; border-width: 6px; }
  .tavla-point.top::before { border-top-width: 42vw; border-right-width: 3.4vw; border-left-width: 3.4vw; }
  .tavla-point.bottom::before { border-right-width: 3.4vw; border-bottom-width: 42vw; border-left-width: 3.4vw; }
  .checker { width: min(5.4vw,30px); font-size: .5rem; }
  .tavla-bar { width: 20px; }
  .tavla-off { right: 2px; width: 23px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1/-1; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 390px) {
  .brand-mark { width: 37px; height: 37px; }
  .theme-btn { display: none; }
  .hero h1 { font-size: 2.55rem; }
  .hero-proof { gap: 8px 14px; }
  .float-card { font-size: .72rem; }
  .game-stat { min-width: 72px; padding-inline: 8px; }
  .control-btn { padding-inline: 10px; font-size: .83rem; }
  .okey-tile { font-size: .8rem; }
}

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