:root {
  --paper: #f1eee6;
  --ink: #151715;
  --muted: #73766e;
  --line: #c9c5bb;
  --dark: #0c0f0d;
  --panel: #151a16;
  --acid: #d8ff3e;
  --orange: #ff6032;
  --cyan: #68dfff;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, a { -webkit-tap-highlight-color: transparent; }
.grain { position: fixed; inset: 0; z-index: 20; opacity: .035; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

header { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(22px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font: 600 12px/1 var(--mono); letter-spacing: .13em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--paper); background: var(--ink); font-size: 10px; letter-spacing: 0; }
.header-meta { display: flex; align-items: center; gap: 16px; color: var(--muted); font: 500 9px/1 var(--mono); letter-spacing: .1em; }
.header-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }

main { min-height: calc(100svh - 78px); display: grid; grid-template-columns: minmax(280px, .7fr) minmax(500px, 1.3fr); gap: clamp(40px, 7vw, 110px); align-items: center; padding: clamp(54px, 7vw, 100px) clamp(22px, 6vw, 92px); }
.intro { min-width: 0; }
.eyebrow, .micro { color: var(--muted); font: 500 9px/1.5 var(--mono); letter-spacing: .13em; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(255,96,50,.13); }
h1 { margin: 28px 0 24px; font-size: clamp(72px, 8vw, 122px); line-height: .79; font-weight: 900; letter-spacing: -.085em; }
h1 em { position: relative; z-index: 1; font-style: normal; }
h1 em::after { content: ""; position: absolute; z-index: -1; left: -5%; right: -7%; bottom: 5%; height: 31%; background: var(--acid); transform: rotate(-2deg); }
.tagline { max-width: 470px; margin: 0; color: #5f625c; font-size: 15px; line-height: 1.9; }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 34px; border: 1px solid var(--line); background: var(--line); }
.legend > div { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 13px 12px; background: var(--paper); }
.legend p { margin: 0; color: var(--muted); white-space: nowrap; font: 500 9px/1 var(--mono); }
.legend b { color: var(--ink); }
.gem { width: 12px; height: 12px; flex: 0 0 auto; transform: rotate(45deg); }
.gem.green { background: var(--acid); }.gem.blue { background: var(--cyan); }.gem.red { background: var(--orange); }
.controls { margin: 20px 0 0; color: var(--muted); font: 500 9px/1.4 var(--mono); }
.controls span { display: inline-block; margin-right: 10px; padding: 5px 8px; color: var(--paper); background: var(--ink); }

.game-shell { position: relative; min-width: 0; border: 1px solid var(--ink); background: var(--dark); box-shadow: 14px 14px 0 var(--orange); transform: rotate(.4deg); }
.game-topbar { height: 66px; display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: center; border-bottom: 1px solid #343a35; background: var(--panel); color: white; }
.game-topbar > div { height: 100%; display: flex; flex-direction: column; justify-content: center; padding-left: 17px; border-right: 1px solid #343a35; }
.game-topbar small, .final-score small { margin-bottom: 5px; color: #7e857d; font: 500 8px/1 var(--mono); letter-spacing: .12em; }
.game-topbar strong { color: var(--acid); font: 500 16px/1 var(--mono); }
.game-topbar .energy span { color: var(--orange); font: 500 11px/1 var(--mono); letter-spacing: 2px; }
.icon-button { height: 100%; padding: 0 14px; border: 0; color: #8c928a; background: transparent; cursor: pointer; font: 500 8px/1 var(--mono); }
.icon-button:hover { color: var(--acid); }
.canvas-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10; min-height: 360px; overflow: hidden; background: #080a09; cursor: crosshair; touch-action: none; }
#game { display: block; width: 100%; height: 100%; }
.scanlines { position: absolute; inset: 0; pointer-events: none; opacity: .09; background: repeating-linear-gradient(to bottom, transparent 0, transparent 3px, #fff 4px); }
.overlay { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; text-align: center; color: white; background: radial-gradient(circle at center, rgba(19,25,20,.87), rgba(7,9,8,.96)); backdrop-filter: blur(4px); }
.overlay[hidden] { display: none; }
.orbit-logo { position: relative; width: 54px; height: 54px; margin-bottom: 18px; border: 1px solid #596057; border-radius: 50%; animation: spin 7s linear infinite; }
.orbit-logo::before, .orbit-logo::after { content: ""; position: absolute; border: 1px solid #596057; border-radius: 50%; }
.orbit-logo::before { inset: 8px -8px; transform: rotate(45deg); }.orbit-logo::after { inset: -8px 8px; transform: rotate(-45deg); }
.orbit-logo span { position: absolute; top: 3px; left: 23px; width: 7px; height: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 12px var(--acid); }
.orbit-logo i { position: absolute; inset: 19px; border-radius: 50%; background: var(--orange); }
.overlay .micro { margin: 0 0 12px; color: var(--acid); }
.overlay h2 { margin: 0; font-size: clamp(38px, 4vw, 60px); line-height: 1.02; letter-spacing: -.06em; }
.overlay > p:not(.micro) { margin: 18px 0 24px; color: #9ca39a; font-size: 12px; line-height: 1.8; }
.start-button { min-width: 174px; height: 48px; display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; padding: 0 18px; border: 0; color: var(--ink); background: var(--acid); cursor: pointer; font: 600 10px/1 var(--mono); transition: transform .2s, box-shadow .2s; }
.start-button:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--orange); }
.final-score { margin: 26px 0 0; }
.final-score small { display: block; }.final-score strong { color: var(--acid); font: 500 38px/1 var(--mono); }
.combo { position: absolute; z-index: 4; top: 24px; left: 50%; transform: translate(-50%,-10px); padding: 8px 12px; color: var(--ink); background: var(--acid); opacity: 0; pointer-events: none; font: 600 10px/1 var(--mono); transition: opacity .16s, transform .16s; }
.combo.show { opacity: 1; transform: translate(-50%,0); }
.game-footer { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; color: #697069; background: var(--panel); border-top: 1px solid #343a35; font: 500 7px/1 var(--mono); letter-spacing: .08em; }
.live { display: flex; align-items: center; gap: 7px; }.live i { width: 5px; height: 5px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 7px var(--acid); }

footer { min-height: 110px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 30px clamp(22px, 5vw, 72px); color: #8b9088; background: var(--ink); font: 500 8px/1.5 var(--mono); letter-spacing: .08em; }
footer p { margin: 0; text-align: center; } footer a { justify-self: end; color: var(--acid); text-decoration: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
  main { grid-template-columns: 1fr; padding-block: 64px 84px; }
  .intro { max-width: 650px; }
  h1 { font-size: clamp(70px, 15vw, 110px); }
  .game-shell { width: 100%; max-width: 850px; }
}
@media (max-width: 600px) {
  header { height: 68px; }.header-meta span:first-child, .header-meta i { display: none; }
  main { gap: 48px; padding: 48px 16px 72px; }
  .intro { padding: 0 8px; }
  h1 { font-size: clamp(68px, 23vw, 94px); }
  .tagline { font-size: 14px; }
  .legend { grid-template-columns: 1fr; }.legend > div { padding: 10px 12px; }
  .game-shell { box-shadow: 7px 7px 0 var(--orange); transform: none; }
  .game-topbar { height: 58px; grid-template-columns: repeat(4, 1fr); }
  .game-topbar > div { padding-left: 9px; }.game-topbar strong { font-size: 13px; }.game-topbar .energy span { font-size: 9px; }
  .icon-button { display: none; }
  .canvas-wrap { min-height: 430px; aspect-ratio: 4 / 5; }
  .overlay h2 { font-size: 40px; }.overlay > p:not(.micro) { font-size: 11px; }
  footer { grid-template-columns: 1fr; text-align: center; } footer a { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
