:root {
  color-scheme: dark;
  --bg: #0a0e16;
  --panel: #111927;
  --panel-raised: #172233;
  --stroke: #263449;
  --text: #f3f5f7;
  --muted: #9ba8ba;
  --accent: #9be15d;
  --accent-ink: #13200c;
  --error: #ff9b93;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 78% 8%, #14253b 0, transparent 34rem), var(--bg); }
button, input, select { font: inherit; }
button { color: inherit; }
.shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ffffff12; }
.wordmark { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 17px; letter-spacing: 0; }
.connection-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #798394; box-shadow: 0 0 0 4px #79839422; }
.connection-state.is-connected { color: #c2f2a0; }
.connection-state.is-connected .pulse { background: var(--accent); box-shadow: 0 0 0 4px #9be15d22; }
.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 48px; align-items: end; padding: 66px 0 64px; border-bottom: 1px solid #ffffff12; }
.eyebrow { margin: 0 0 15px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(44px, 6vw, 76px); line-height: .98; letter-spacing: -.065em; }
h1 em { color: var(--accent); font-style: normal; }
.lede { max-width: 480px; margin: 21px 0 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.connect-card { padding: 21px; border: 1px solid var(--stroke); border-radius: 16px; background: linear-gradient(145deg, #172335, #111927 80%); box-shadow: 0 24px 60px #0003; }
.connect-card label { display: block; margin: 0 0 11px; color: #d7deea; font-size: 12px; font-weight: 700; }
.token-row { display: flex; gap: 9px; }
input, select { min-width: 0; border: 1px solid var(--stroke); border-radius: 9px; background: #0c1320; color: var(--text); outline: none; }
input:focus, select:focus, button:focus-visible { border-color: var(--accent); outline: 2px solid #9be15d55; outline-offset: 2px; }
#server-token { flex: 1; width: 100%; padding: 12px 13px; font-size: 13px; }
.button { border: 0; border-radius: 9px; padding: 0 16px; font-weight: 800; cursor: pointer; }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: #b2ee83; }
.helper { margin: 10px 0 0; color: #8794a6; font-size: 11px; }
.text-button { padding: 8px 0 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.library { padding: 49px 0 58px; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
h2 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.result-count { margin: 0 0 3px; color: var(--muted); font-size: 12px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 26px 0 17px; }
.tabs { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--stroke); border-radius: 11px; background: #0c1320; }
.tab { min-height: 36px; padding: 0 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; cursor: pointer; }
.tab span { margin-left: 5px; color: #7f8ba0; }
.tab.is-active { background: #202d3d; color: var(--text); }
.filters { display: flex; gap: 9px; }
.search-box { min-width: min(270px, 30vw); display: flex; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid var(--stroke); border-radius: 9px; background: #0c1320; color: var(--muted); }
.search-box input { width: 100%; padding: 10px 0; border: 0; background: transparent; font-size: 12px; }
.search-box input:focus { outline: 0; }
#platform-select { min-width: 145px; padding: 0 30px 0 12px; font-size: 12px; }
.notice { min-height: 42px; margin: 0; padding: 12px 14px; border: 1px solid #263449; border-radius: 10px; background: #111927aa; color: #b9c4d3; font-size: 12px; }
.notice:empty { display: none; }
.notice[data-kind="error"] { border-color: #6e383a; color: var(--error); background: #331b20; }
.notice[data-kind="empty"] { color: var(--muted); }
.title-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.title-card { overflow: hidden; border: 1px solid var(--stroke); border-radius: 13px; background: var(--panel); transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.title-card:hover { transform: translateY(-3px); border-color: #526743; background: #142031; }
.cover-art { height: 150px; display: flex; align-items: end; padding: 13px; background: linear-gradient(135deg, #31495a, #1d2d42 47%, #263246); }
.title-card:nth-child(3n + 2) .cover-art { background: linear-gradient(135deg, #574657, #2d2942 52%, #252e40); }
.title-card:nth-child(3n) .cover-art { background: linear-gradient(135deg, #516046, #273b38 52%, #1d3040); }
.cover-art span { padding: 5px 8px; border: 1px solid #ffffff30; border-radius: 5px; background: #080c14a8; color: #e1e8ef; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.card-body { padding: 14px; }
.card-platform { margin: 0 0 7px; color: var(--accent); font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.card-body h3 { overflow: hidden; margin: 0; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.card-description { min-height: 36px; margin: 8px 0 13px; color: var(--muted); font-size: 11px; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid #ffffff0d; }
.like-button, .refresh-button { padding: 7px 9px; border: 1px solid var(--stroke); border-radius: 7px; background: #111927; color: #d1d8e2; font-size: 11px; cursor: pointer; }
.refresh-button:hover { border-color: #526743; color: var(--accent); }
.like-button[aria-pressed="true"] { border-color: #70505a; color: #ff9bb0; }
.like-button:disabled, .refresh-button:disabled { opacity: .5; cursor: wait; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 19px 0 28px; border-top: 1px solid #ffffff12; color: #728096; font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 900px) { .title-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hero { gap: 25px; } }
@media (max-width: 680px) { .shell { width: min(100% - 28px, 540px); } .hero { grid-template-columns: 1fr; padding: 43px 0; } .connect-card { max-width: none; } .toolbar { align-items: stretch; flex-direction: column; } .filters { width: 100%; } .search-box { flex: 1; min-width: 0; } #platform-select { min-width: 120px; } .title-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .cover-art { height: 118px; } .section-head { align-items: start; flex-direction: column; gap: 8px; } .footer { flex-direction: column; } }
@media (max-width: 380px) { .token-row { flex-direction: column; } .button-primary { min-height: 42px; } .title-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; } }
