:root {
  color-scheme: dark;
  --arcade-bg: #080c11;
  --arcade-panel: #101822;
  --arcade-panel-raised: #172330;
  --arcade-line: rgba(181, 207, 226, 0.18);
  --arcade-text: #f2f7fb;
  --arcade-muted: #9eacba;
  --arcade-cyan: #58e1ff;
  --arcade-violet: #9b7cff;
  --arcade-amber: #ffc65c;
  --arcade-danger: #ff647c;
  --arcade-green: #70e0b5;
  --arcade-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--arcade-text);
  background:
    radial-gradient(900px 600px at 88% -10%, rgba(88, 225, 255, 0.12), transparent 60%),
    radial-gradient(780px 620px at 0% 20%, rgba(155, 124, 255, 0.1), transparent 62%),
    var(--arcade-bg);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, rgba(226, 246, 255, 0.44) 0 1px, transparent 1.4px);
  background-size: 52px 52px;
  opacity: 0.08;
  content: "";
  pointer-events: none;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
.arcade-shell { width: min(1320px, calc(100% - 32px)); margin: 22px auto 30px; }
.global-topnav-wrap { width: min(1500px, calc(100% - 64px)); margin: 22px auto 18px; }
.global-topnav { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 24px; border: 1px solid var(--arcade-line); border-radius: 28px; background: linear-gradient(180deg, rgba(18,24,33,.92), rgba(9,13,19,.96)), radial-gradient(circle at top left, rgba(88,225,255,.08), transparent 42%); box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.global-topnav-brand { min-width: 0; display: flex; align-items: center; gap: 14px; text-decoration: none; }
.global-topnav-mark { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg,#2d7ee6,#66a9ff); box-shadow: inset 0 1px rgba(255,255,255,.25); font-size: 1.05rem; font-weight: 900; }
.global-topnav-copy { min-width: 0; display: grid; gap: 2px; }
.global-topnav-copy strong { color: var(--arcade-text); font-size: .96rem; letter-spacing: .08em; line-height: 1.05; }
.global-topnav-copy span { color: var(--arcade-muted); font-size: .9rem; line-height: 1.25; }
.global-topnav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.global-topnav-links a { padding: 10px 14px; border: 1px solid transparent; border-radius: 999px; color: var(--arcade-muted); text-decoration: none; white-space: nowrap; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease; }
.global-topnav-links a:hover,
.global-topnav-links a:focus-visible,
.global-topnav-links a[aria-current="page"] { border-color: var(--arcade-line); color: var(--arcade-text); background: rgba(255,255,255,.06); }
.global-topnav a:focus-visible { outline: 2px solid var(--arcade-cyan); outline-offset: 3px; }
.arcade-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 18px;
  border: 1px solid var(--arcade-line);
  border-radius: 22px;
  background: rgba(10, 15, 21, 0.88);
  box-shadow: 0 12px 36px rgba(0,0,0,.2);
  backdrop-filter: blur(16px);
}
.arcade-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.arcade-brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, #2d7ee6, #7a8cff);
  box-shadow: 0 0 28px rgba(88, 225, 255, .16);
  font-weight: 900;
}
.arcade-brand-copy { display: grid; gap: 2px; }
.arcade-brand-copy strong { letter-spacing: .08em; }
.arcade-brand-copy small { color: var(--arcade-muted); }
.arcade-topbar nav { display: flex; flex-wrap: wrap; gap: 6px; }
.arcade-topbar nav a { padding: 9px 13px; border-radius: 999px; color: var(--arcade-muted); text-decoration: none; }
.arcade-topbar nav a:hover,
.arcade-topbar nav a:focus-visible,
.arcade-topbar nav a[aria-current="page"] { color: var(--arcade-text); background: rgba(255,255,255,.07); }
.arcade-topbar a:focus-visible,
.arcade-button:focus-visible,
.game-card:focus-visible { outline: 2px solid var(--arcade-cyan); outline-offset: 3px; }

.arcade-hero {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, .65fr);
  align-items: center;
  gap: clamp(24px, 4vw, 58px);
  padding: clamp(30px, 4vw, 58px);
  border: 1px solid var(--arcade-line);
  border-radius: 28px;
  background:
    linear-gradient(125deg, rgba(17, 25, 35, .97), rgba(8, 13, 19, .92)),
    var(--arcade-panel);
  box-shadow: var(--arcade-shadow);
}
.arcade-hero::after {
  position: absolute;
  width: 420px;
  height: 420px;
  right: -170px;
  top: -180px;
  border: 1px solid rgba(88, 225, 255, .16);
  border-radius: 50%;
  box-shadow: 0 0 90px rgba(88, 225, 255, .09), inset 0 0 80px rgba(155, 124, 255, .05);
  content: "";
}
.arcade-kicker { margin: 0 0 14px; color: var(--arcade-cyan); font-size: .78rem; font-weight: 850; letter-spacing: .19em; text-transform: uppercase; }
.arcade-hero h1 { max-width: 680px; margin: 0; font-size: clamp(2.5rem, 5vw, 4.2rem); line-height: .92; letter-spacing: -.055em; text-wrap: balance; }
.arcade-hero h1 span { color: transparent; background: linear-gradient(90deg, var(--arcade-cyan), #c5b8ff); background-clip: text; -webkit-background-clip: text; }
.arcade-lead { max-width: 610px; margin: 18px 0 22px; color: #c4cfda; font-size: clamp(.95rem, 1.5vw, 1.08rem); line-height: 1.6; }
.arcade-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid rgba(88, 225, 255, .38);
  border-radius: 999px;
  color: #ebfcff;
  background: rgba(88, 225, 255, .08);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.arcade-button:hover { background: rgba(88, 225, 255, .15); }
.arcade-button.secondary { border-color: var(--arcade-line); color: var(--arcade-muted); background: rgba(255,255,255,.035); }
.arcade-button.danger { border-color: rgba(255,100,124,.35); color: #ffd7de; background: rgba(255,100,124,.07); }

.vector-preview { position: relative; min-height: 230px; filter: drop-shadow(0 0 12px rgba(88,225,255,.18)); }
.preview-orbit { position: absolute; border: 1px solid rgba(88,225,255,.2); border-radius: 50%; }
.preview-orbit.one { width: 220px; height: 220px; inset: 5px auto auto 50%; transform: translateX(-50%); }
.preview-orbit.two { width: 150px; height: 150px; inset: 40px auto auto 50%; border-color: rgba(155,124,255,.23); transform: translateX(-50%); }
.preview-rock { position: absolute; width: 50px; height: 46px; border: 2px solid #9ccbd8; clip-path: polygon(18% 3%, 70% 8%, 98% 37%, 78% 88%, 35% 100%, 2% 62%); opacity: .8; }
.preview-rock.a { top: 18px; left: 12%; transform: rotate(17deg); }
.preview-rock.b { right: 5%; bottom: 34px; width: 48px; height: 44px; transform: rotate(-23deg); border-color: #b6a7f8; }
.preview-rock.c { left: 18%; bottom: 8px; width: 30px; height: 28px; transform: rotate(41deg); }
.preview-ship { position: absolute; width: 58px; height: 70px; left: 50%; top: 50%; transform: translate(-50%, -48%) rotate(28deg); }
.preview-ship::before { position: absolute; inset: 0; clip-path: polygon(50% 0, 92% 95%, 50% 74%, 8% 95%); background: var(--arcade-cyan); content: ""; }
.preview-ship::after { position: absolute; inset: 3px; clip-path: polygon(50% 2%, 88% 89%, 50% 68%, 12% 89%); background: var(--arcade-panel); content: ""; }
.preview-flame { position: absolute; width: 20px; height: 42px; left: calc(50% - 10px); top: 64%; background: linear-gradient(var(--arcade-violet), transparent); clip-path: polygon(50% 100%, 0 0, 100% 0); transform: rotate(28deg); transform-origin: top; }

.games-section { padding: clamp(58px, 8vw, 100px) clamp(4px, 3vw, 34px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.section-heading p:last-child { max-width: 480px; margin: 0 0 7px; color: var(--arcade-muted); line-height: 1.55; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.game-card {
  position: relative;
  overflow: hidden;
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--arcade-line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(23,35,48,.96), rgba(11,17,24,.98));
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.game-card:hover { transform: translateY(-4px); border-color: rgba(88,225,255,.43); box-shadow: 0 22px 54px rgba(0,0,0,.28), 0 0 40px rgba(88,225,255,.05); }
.game-card.coming-soon { cursor: default; }
.game-card.coming-soon:hover { transform: none; border-color: var(--arcade-line); box-shadow: none; }
.game-card-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.game-status { padding: 6px 9px; border: 1px solid rgba(112,224,181,.3); border-radius: 999px; color: #a7f2d4; background: rgba(112,224,181,.07); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.game-status.soon { border-color: rgba(255,198,92,.28); color: #ffe0a3; background: rgba(255,198,92,.06); }
.game-card-number { color: rgba(158,172,186,.52); font-weight: 800; }
.game-card-copy { position: relative; z-index: 1; }
.game-card h3 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.045em; }
.game-card p { max-width: 580px; margin: 14px 0 21px; color: var(--arcade-muted); line-height: 1.6; }
.game-card-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.game-card-meta span { padding: 6px 9px; border-radius: 8px; color: #c8d2dc; background: rgba(255,255,255,.055); font-size: .76rem; }
.game-card-action { display: inline-flex; margin-top: 26px; align-items: center; gap: 9px; color: var(--arcade-cyan); font-weight: 850; }
.card-planet { position: absolute; width: 260px; height: 260px; right: -75px; top: -65px; border: 1px solid rgba(88,225,255,.15); border-radius: 50%; box-shadow: inset 22px -18px 60px rgba(155,124,255,.07); }
.card-planet::after { position: absolute; width: 350px; height: 70px; left: -45px; top: 95px; border: 2px solid rgba(155,124,255,.13); border-radius: 50%; transform: rotate(-18deg); content: ""; }
.arcade-footer { display: flex; justify-content: space-between; gap: 20px; padding: 22px 8px 10px; color: var(--arcade-muted); }
.arcade-footer p { margin: 0; }
.arcade-footer a { color: var(--arcade-cyan); }
.theme-toggle { position: fixed; z-index: 20; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--arcade-line); border-radius: 12px; color: var(--arcade-muted); background: rgba(10,15,21,.9); box-shadow: 0 10px 28px rgba(0,0,0,.24); font-size: .72rem; backdrop-filter: blur(12px); }
.theme-toggle select { border: 0; color: var(--arcade-text); background: transparent; font: inherit; font-weight: 750; }

html[data-theme="light"] body { color: #17202b; background: radial-gradient(900px 600px at 88% -10%, rgba(44,142,177,.13), transparent 60%), #edf3f7; }
html[data-theme="light"] .arcade-topbar,
html[data-theme="light"] .arcade-hero,
html[data-theme="light"] .game-card { border-color: rgba(19,54,78,.17); background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(240,247,251,.98)); box-shadow: 0 22px 55px rgba(35,70,94,.1); }
html[data-theme="light"] .arcade-brand-copy small,
html[data-theme="light"] .arcade-topbar nav a,
html[data-theme="light"] .section-heading p:last-child,
html[data-theme="light"] .game-card p,
html[data-theme="light"] .arcade-footer { color: #536273; }
html[data-theme="light"] .arcade-hero h1,
html[data-theme="light"] .section-heading h2,
html[data-theme="light"] .game-card h3 { color: #111d29; }
html[data-theme="light"] .arcade-lead { color: #425466; }
html[data-theme="light"] .preview-ship::after { background: #f3f8fb; }
html[data-theme="light"] .game-card-meta span { color: #435568; background: rgba(20,61,86,.07); }
html[data-theme="light"] .global-topnav { border-color: rgba(19,54,78,.17); background: linear-gradient(180deg,rgba(255,255,255,.96),rgba(247,250,252,.98)); box-shadow: 0 16px 38px rgba(31,50,73,.12); }
html[data-theme="light"] .global-topnav-copy strong { color: #17202b; }
html[data-theme="light"] .global-topnav-copy span,
html[data-theme="light"] .global-topnav-links a { color: #536273; }
html[data-theme="light"] .global-topnav-links a:hover,
html[data-theme="light"] .global-topnav-links a:focus-visible,
html[data-theme="light"] .global-topnav-links a[aria-current="page"] { color: #17202b; background: rgba(20,61,86,.07); }
html[data-theme="light"] .theme-toggle { border-color: rgba(19,54,78,.17); color: #536273; background: rgba(255,255,255,.94); }
html[data-theme="light"] .theme-toggle select { color: #17202b; }

/* Keep the arcade header aligned with the main command-centre navigation. */
.global-topnav { padding:0; border:0; border-radius:0; background:transparent; box-shadow:none; }
.global-topnav-mark { border:2px solid var(--arcade-cyan); border-radius:50%; color:var(--arcade-cyan); background:transparent; box-shadow:0 0 28px rgba(88,225,255,.13); }
.global-topnav-links { gap:0; }
.global-topnav-links a { padding:25px 13px 22px; border:0; border-radius:0; }
.global-topnav-links a[aria-current="page"] { position:relative; color:var(--arcade-cyan); background:transparent; }
.global-topnav-links a[aria-current="page"]::after { position:absolute; right:13px; bottom:12px; left:13px; height:2px; content:""; background:var(--arcade-cyan); }

@media (max-width: 850px) {
  .global-topnav { align-items: flex-start; flex-direction: column; }
  .global-topnav-links { justify-content: flex-start; }
  .arcade-hero { grid-template-columns: 1fr; }
  .vector-preview { min-height: 210px; }
  .game-grid { grid-template-columns: 1fr; }
}
@media (max-width: 650px) {
  .global-topnav-wrap { width: min(100% - 18px,1500px); margin-top: 9px; }
  .global-topnav { padding: 14px; border-radius: 18px; }
  .global-topnav-copy span { display: none; }
  .global-topnav-links { gap: 4px; }
  .global-topnav-links a { padding: 8px 9px; font-size: .84rem; }
  .arcade-shell { width: min(100% - 18px, 1320px); margin-top: 9px; }
  .arcade-topbar { align-items: flex-start; border-radius: 18px; }
  .arcade-brand-copy small { display: none; }
  .arcade-topbar nav a { padding: 8px 9px; }
  .arcade-hero { min-height: 0; padding: 34px 24px; border-radius: 20px; }
  .arcade-hero h1 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
  .vector-preview { transform: scale(.82); margin: -24px -30px; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .game-card { min-height: 340px; }
  .arcade-footer { flex-direction: column; }
}
@media (max-width: 470px) {
  .global-topnav-links { width: 100%; }
  .arcade-topbar { flex-direction: column; }
  .arcade-topbar nav { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .game-card { transition: none; }
}
