:root {
  --bg: #12141a;
  --surface: #1a1f2b;
  --surface2: #242b3a;
  --border: #334155;
  --text: #e8edf5;
  --muted: #94a3b8;
  --accent: #f59e0b;
  --accent2: #fbbf24;
  --green: #4ade80;
  --red: #f87171;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; background: var(--bg); color: var(--text); }
.page { max-width: 720px; margin: 0 auto; padding: 24px 16px 64px; }
.back { color: var(--accent2); text-decoration: none; font-size: 0.85rem; }
.brand { display: flex; gap: 14px; align-items: center; margin-top: 12px; }
.logo {
  width: 48px; height: 48px; border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1a1200; display: grid; place-items: center; font-weight: 800;
}
.brand h1 { margin: 0; font-size: 1.5rem; }
.brand p { margin: 0; color: var(--muted); font-size: 0.88rem; }
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; margin-top: 16px;
}
.panel h3 { margin: 0 0 10px; font-size: 0.95rem; }
label { display: block; font-size: 0.75rem; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.search-wrap { position: relative; }
input {
  width: 100%; padding: 12px 14px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); font: inherit;
}
input:focus { outline: none; border-color: var(--accent); }
.suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10;
  list-style: none; margin: 0; padding: 4px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px; max-height: 320px; overflow: auto;
}
.suggestions li {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 6px; cursor: pointer;
}
.suggestions li:hover, .suggestions li.active { background: rgba(245, 158, 11, 0.12); }
.suggestions img { width: 46px; height: 18px; object-fit: cover; border-radius: 2px; }
.s-name { flex: 1; font-size: 0.9rem; }
.hidden { display: none !important; }
.selected-game { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.selected-game img { width: 92px; height: 35px; object-fit: cover; border-radius: 4px; }
.selected-game h2 { margin: 0; font-size: 1.1rem; }
.muted { color: var(--muted); font-size: 0.82rem; }
.btn {
  padding: 12px 20px; border: none; border-radius: 8px; font: inherit; cursor: pointer;
  background: var(--accent); color: #1a1200; font-weight: 700;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }
.hint code { background: var(--surface2); padding: 1px 5px; border-radius: 4px; font-size: 0.78rem; }
.progress { text-align: center; padding: 32px 16px; margin-top: 16px; }
.spinner {
  width: 36px; height: 36px; margin: 0 auto 14px; border: 3px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.result {
  margin-top: 16px; padding: 16px; border-radius: var(--radius);
  background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.35);
}
.error {
  margin-top: 16px; padding: 16px; border-radius: var(--radius);
  background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.35); color: var(--red);
}
.structure pre {
  margin: 0; padding: 12px; background: var(--surface2); border-radius: 8px;
  font-size: 0.75rem; line-height: 1.5; overflow-x: auto; color: var(--muted);
}
