:root { --bg: #0b0d12; --panel: #141821; --panel2: #1c2130; --text: #e8eaf0; --muted: #8b93a7; --accent: #e5484d; --accent2: #7c5cff; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: #9db4ff; }
.hidden { display: none !important; }
.small { font-size: 13px; }
.gm-muted { color: var(--muted); }
.gm-grow { flex: 1; }
.gm-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 12px 24px;
  background: linear-gradient(180deg, rgba(11,13,18,.98), rgba(11,13,18,.85)); border-bottom: 1px solid #1f2533; }
.gm-logo { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; letter-spacing: -.5px; }
.gm-logo span { color: var(--accent); } .gm-logo em { font-style: normal; color: var(--muted); font-weight: 600; }
.gm-logo b { margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: linear-gradient(90deg, var(--accent2), var(--accent)); font-size: 14px; color: #fff; }
.gm-search { flex: 1; max-width: 420px; }
.gm-search input { width: 100%; }
.gm-user { margin-left: auto; display: flex; gap: 10px; align-items: center; }
input, select { background: var(--panel2); color: var(--text); border: 1px solid #2c3345; border-radius: 8px; padding: 9px 12px; font: inherit; }
.gm-btn { display: inline-block; background: var(--panel2); color: var(--text); border: 1px solid #2c3345; border-radius: 8px; padding: 8px 14px;
  font: inherit; cursor: pointer; text-decoration: none; }
.gm-btn:hover, .gm-btn:focus-visible { border-color: var(--accent2); outline: none; }
.gm-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; width: 100%; margin-top: 8px; }
#gm-main { padding: 20px 24px 60px; max-width: 1500px; margin: 0 auto; }
.gm-card { max-width: 440px; margin: 8vh auto; background: var(--panel); border-radius: 14px; padding: 28px; text-align: center; }
.gm-card form { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.gm-card label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.gm-error { color: #ff6b6b; min-height: 1.2em; margin: 0; }
.gm-soon { font-size: 64px; }
.gm-banner { background: #2a2210; border: 1px solid #5c4813; color: #f5d90a; padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.gm-systems { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.gm-systems button { background: var(--panel); color: var(--text); border: 1px solid #2c3345; border-radius: 20px; padding: 6px 14px; cursor: pointer; font: inherit; font-size: 14px; }
.gm-systems button.on { background: var(--accent); border-color: var(--accent); }
.gm-systems button span { color: var(--muted); margin-left: 4px; } .gm-systems button.on span { color: #ffd; }
.gm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.gm-game { background: var(--panel); border: 2px solid transparent; border-radius: 12px; overflow: hidden; cursor: pointer; text-align: left; padding: 0; color: var(--text); font: inherit; }
.gm-game:hover, .gm-game:focus-visible { border-color: var(--accent2); outline: none; transform: translateY(-2px); transition: transform .15s; }
.gm-cover { aspect-ratio: 3 / 4; background: linear-gradient(135deg, #232a3d, #151a26); display: flex; align-items: center; justify-content: center; font-size: 44px; }
.gm-cover img { width: 100%; height: 100%; object-fit: cover; }
.gm-game .gm-info { padding: 8px 10px 10px; }
.gm-game .gm-title { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gm-game .gm-sys { color: var(--muted); font-size: 12px; }
.gm-empty { text-align: center; margin-top: 40px; }
.gm-play-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
#gm-stage { width: 100%; aspect-ratio: 4 / 3; max-height: calc(100vh - 170px); background: #000; border-radius: 12px; overflow: hidden; margin: 0 auto; }
#gm-stage.html5 { aspect-ratio: 16 / 9; }
#game, #gm-stage iframe { width: 100%; height: 100%; border: 0; }
.gm-keys { text-align: center; }
.gm-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #222838; border: 1px solid #39415a; padding: 10px 18px; border-radius: 10px; z-index: 50; }
@media (max-width: 700px) {
  .gm-top { padding: 10px 12px; flex-wrap: wrap; } .gm-search { order: 3; max-width: none; flex-basis: 100%; }
  #gm-main { padding: 12px; } .gm-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
  .gm-keys { display: none; }
}

.gm-tools { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.gm-pc { margin-top: 36px; }
.gm-pc h2 { font-size: 18px; margin: 0 0 6px; }
.gm-pc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 12px; }
.gm-pc-item { background: var(--panel2); border: 1px solid #2c3345; border-radius: 10px; padding: 12px 14px; }
.gm-pc-item b { display: block; margin-bottom: 4px; }
.gm-pc-item .gm-tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: #ffffff14; margin: 4px 4px 0 0; }
