:root { color-scheme: light; --page-bg:#f5f5f7; --surface:#fff; --surface-muted:#f0f0f3; --field-bg:#fff; --ink:#141417; --muted:#6d6d73; --line:#dedee3; --blue:#0071e3; --blue-dark:#0066cc; --nav-bg:rgba(255,255,255,.82); --accent-soft:#e8f2ff; --success-bg:#edf9f1; --success-text:#1d6a3f; --error-bg:#fff2f2; --error-text:#a52f2f; --shadow:0 12px 32px rgba(20,20,23,.06); }
:root[data-theme="dark"] { color-scheme: dark; --page-bg:#0D1117; --surface:#161B22; --surface-muted:#21262D; --field-bg:#0D1117; --ink:#F0F6FC; --muted:#8B949E; --line:#30363D; --blue:#2F81F7; --blue-dark:#58A6FF; --nav-bg:rgba(13,17,23,.86); --accent-soft:#1B2D49; --success-bg:#12261B; --success-text:#7EE787; --error-bg:#321B22; --error-text:#FF7B72; --shadow:none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme:dark; --page-bg:#0D1117; --surface:#161B22; --surface-muted:#21262D; --field-bg:#0D1117; --ink:#F0F6FC; --muted:#8B949E; --line:#30363D; --blue:#2F81F7; --blue-dark:#58A6FF; --nav-bg:rgba(13,17,23,.86); --accent-soft:#1B2D49; --success-bg:#12261B; --success-text:#7EE787; --error-bg:#321B22; --error-text:#FF7B72; --shadow:none; } }
html { background:var(--page-bg); }
body, body.game-shell { background:var(--page-bg); color:var(--ink); transition:background-color .16s ease,color .16s ease; }
.game-nav { background:var(--nav-bg); border-color:var(--line); }
.game-nav nav, .nav-login, .account-state, .nav-quiet-button { color:var(--muted); }
.game-nav nav a:hover, .nav-login:hover, .nav-quiet-button:hover { color:var(--ink); }
.brand-mark { background:var(--surface-muted); color:var(--ink); border:1px solid var(--line); }
.nav-end { display:flex; align-items:center; gap:14px; }
.theme-control { position:relative; flex:0 0 auto; }
.theme-toggle { width:32px; height:32px; display:grid; place-items:center; padding:0; border:1px solid var(--line); border-radius:50%; background:var(--surface); color:var(--muted); cursor:pointer; }
.theme-toggle:hover { border-color:var(--blue); color:var(--blue); }
.theme-menu { position:absolute; top:calc(100% + 8px); right:0; z-index:30; width:142px; padding:6px; border:1px solid var(--line); border-radius:10px; background:var(--surface); box-shadow:0 12px 30px rgba(0,0,0,.14); }
.theme-menu[hidden] { display:none; }
.theme-menu button { width:100%; display:flex; align-items:center; gap:8px; padding:8px 9px; border:0; border-radius:6px; background:transparent; color:var(--muted); cursor:pointer; font:inherit; font-size:12px; text-align:left; }
.theme-menu button:hover, .theme-menu button[aria-checked="true"] { background:var(--accent-soft); color:var(--ink); }
.theme-menu button i { width:14px; color:var(--blue); text-align:center; }
.library-hero { background:radial-gradient(circle at 50% 28%,var(--surface) 0,var(--page-bg) 54%,transparent 73%); }
.primary-link, .form-submit, .dialog-primary, .primary { background:var(--blue); }
.primary-link:hover, .form-submit:hover { background:var(--blue-dark); }
.secondary-link, .nav-action, .app-card-open, .content-card-link, .content-download, .game-content-empty a { color:var(--blue); }
.account-panel, .auth-card, .membership-card, .membership-tier, .content-card, .content-detail, .game-content-empty, .catalog-loading, .catalog-empty, .install-card { background:var(--surface); border-color:var(--line); box-shadow:var(--shadow); }
.account-panel p:not(.overline), .auth-card-heading p:not(.overline), .card-heading p:not(.overline), .membership-hero p:not(.overline), .content-hero>p:last-child, .content-card p, .content-detail-summary, .content-body, .version, .lead, .hint { color:var(--muted); }
.account-panel-actions .secondary-link, .secondary-button, .dialog-secondary, .secondary { background:var(--surface); border-color:var(--line); color:var(--blue); }
.form-field, .form-field input, .form-field input::placeholder { color:var(--ink); }
.form-field input, .content-search, .library-search { border-color:var(--line); background:var(--field-bg); }
.form-field input:focus { border-color:var(--blue); box-shadow:0 0 0 4px rgba(47,129,247,.2); }
.password-input button { color:var(--blue); }
.membership-tier.is-vip { border-color:#2f6b46; background:var(--success-bg); }
.membership-tier.is-vip .tier-dot { background:#3fb950; }
.member-help, .status.ready { background:var(--success-bg); color:var(--success-text); }
.member-help p { color:var(--muted); }
.status.waiting { background:var(--accent-soft); color:var(--blue-dark); }
.status.error { background:var(--error-bg); color:var(--error-text); }
.support-strip, .support-strip a, .library-section, .membership-hero, .content-hero, .footer-note { border-color:var(--line); }
.support-strip a:hover { background:var(--surface); }
.support-icon, .content-card-icon { background:var(--accent-soft); color:var(--blue); }
.app-card, .app-dialog, .dialog-meta span { background:var(--surface); border-color:var(--line); box-shadow:none; }
.app-card:hover { box-shadow:0 12px 28px rgba(0,0,0,.16); }
.app-icon, .dialog-icon { background:var(--surface-muted); color:var(--muted); box-shadow:none; }
.type-chip { background:var(--surface-muted); color:var(--muted); }
.dialog-close { background:var(--surface-muted); color:var(--ink); }
.app-dialog::backdrop { background:rgba(0,0,0,.58); }
.catalog-empty, .catalog-loading, .content-search-empty { background:var(--surface); color:var(--muted); }
.content-card, .content-search, .content-search button, .content-search input { color:var(--ink); }
.content-search button:hover { background:var(--surface-muted); color:var(--ink); }
.content-detail-cover { border-color:var(--line); }
footer { color:var(--muted); }
.game-install-shell { background:var(--page-bg); color:var(--ink); }
.game-install-shell .brand, .game-install-shell .secondary { color:var(--ink); }
.game-install-shell .brand span { background:var(--blue); }
.game-install-shell .back-link { color:var(--blue); }
.game-install-shell .secondary { background:var(--surface); border-color:var(--line); }
.game-install-shell .footer-note { color:var(--muted); }
@media (max-width:760px) { .nav-end { gap:8px; } .theme-toggle { width:30px; height:30px; } .theme-menu { right:-3px; } .game-nav .nav-action { background:var(--accent-soft); color:var(--blue); } .app-card:hover { box-shadow:none; } }
