:root {
  --ink: #172333;
  --muted: #718096;
  --line: #e4e9f1;
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --coral: #ee6b5c;
  --coral-soft: #fff0ed;
  --teal: #128b81;
  --teal-soft: #e4f6f3;
  --blue: #4969bc;
  --blue-soft: #eaf0ff;
  --gold: #c38a1b;
  --gold-soft: #fff7df;
  --radius: 8px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.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; }

.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .88); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.brand-text { font-size: 14px; font-weight: 700; letter-spacing: .15em; }
.brand-text b { color: var(--coral); font-weight: 800; }
.topbar-meta { display: flex; align-items: center; gap: 15px; font-size: 12px; color: var(--muted); }
.connection-status { display: inline-flex; align-items: center; gap: 7px; }
.connection-status i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #e5a52d; box-shadow: 0 0 0 3px #fff2d3; }
.connection-status.is-connected i { background: #26a58e; box-shadow: 0 0 0 3px #d8f2ed; }
.connection-status.is-error i { background: var(--coral); box-shadow: 0 0 0 3px var(--coral-soft); }
.topbar-divider { width: 1px; height: 17px; background: var(--line); }
.workspace-label { color: #98a3b2; }
.admin-entry { color: var(--ink); font-size: 12px; font-weight: 700; text-decoration: none; }
.admin-entry:hover { color: var(--coral); }

.shell { width: min(1440px, 100%); margin: 0 auto; padding: 46px clamp(20px, 4vw, 64px) 70px; }
.page-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.intro-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow, .section-kicker { margin: 0 0 9px; color: var(--coral); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 10px; font-size: clamp(31px, 3.5vw, 46px); line-height: 1.08; letter-spacing: -.03em; }
.intro-copy { max-width: 520px; margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 6px; font-size: 13px; font-weight: 700; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, .filter-button:focus-visible, .icon-button:focus-visible { outline: 3px solid rgba(73, 105, 188, .22); outline-offset: 2px; }
.button-icon { display: inline-block; font-size: 17px; line-height: 1; }
.button-quiet { border-color: var(--line); color: var(--ink); background: var(--surface); box-shadow: 0 2px 5px rgba(31, 44, 63, .04); }
.button-quiet:hover { border-color: #cbd3df; background: #fbfcfe; }
.button-primary { width: 100%; min-height: 48px; color: #fff; background: var(--ink); box-shadow: 0 7px 16px rgba(23, 35, 51, .14); }
.admin-action { width: auto; color: #fff; text-decoration: none; }
.button-primary:hover { background: #26384e; box-shadow: 0 9px 20px rgba(23, 35, 51, .2); }
.button-primary[disabled] { cursor: wait; opacity: .65; transform: none; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 25px; }
.metric { position: relative; min-height: 125px; padding: 19px 20px 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric::after { position: absolute; right: -17px; bottom: -30px; width: 86px; height: 86px; border-radius: 50%; content: ""; opacity: .55; }
.metric-coral::after { background: var(--coral-soft); }
.metric-teal::after { background: var(--teal-soft); }
.metric-blue::after { background: var(--blue-soft); }
.metric-gold::after { background: var(--gold-soft); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.metric-value { margin-top: 7px; font-size: 31px; font-weight: 750; letter-spacing: -.04em; }
.metric-value-date { font-size: 25px; }
.metric-note { margin-top: 5px; color: #9aa4b2; font-size: 11px; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(350px, .8fr); align-items: start; gap: 20px; }
.user-workspace { grid-template-columns: 1fr; }
.catalog-section, .publisher-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.catalog-section { min-height: 570px; padding: 27px 27px 31px; }
.publisher-section { position: sticky; top: 20px; padding: 27px 27px 24px; }
.section-heading, .publisher-heading { display: flex; align-items: start; justify-content: space-between; }
.section-heading { margin-bottom: 22px; }
.section-heading h2, .publisher-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.result-count { margin-top: 6px; color: var(--muted); font-size: 12px; }
.publisher-heading { margin-bottom: 23px; }
.publish-dot { width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); }

.catalog-toolbar { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto auto; gap: 9px; margin-bottom: 21px; }
.search-box { display: flex; align-items: center; gap: 7px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.search-box:focus-within { border-color: #aab9d9; background: #fff; }
.search-icon { color: #8794a5; font-size: 24px; line-height: 0; transform: rotate(-20deg); }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.search-box input::placeholder, input::placeholder, textarea::placeholder { color: #aab3c0; }
.filter-group { position: relative; display: flex; align-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; isolation: isolate; }
.filter-group::before { position: absolute; top: 3px; left: 0; z-index: 0; width: var(--filter-pill-w, 44px); height: 32px; border-radius: 4px; content: ""; background: linear-gradient(120deg, #837de2, #948be8); box-shadow: 0 6px 15px rgba(83, 72, 177, .3), inset 0 1px rgba(255, 255, 255, .25); transform: translateX(var(--filter-pill-x, 3px)); transition: width .38s cubic-bezier(.2, .8, .2, 1), transform .44s cubic-bezier(.2, .8, .2, 1); }
.filter-button { position: relative; z-index: 1; height: 32px; padding: 0 12px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 650; transition: color .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1); }
.filter-button:hover { color: var(--ink); transform: translateY(-1px); }
.filter-button.is-active { color: #fff; background: transparent; box-shadow: none; }
.sort-select select, .form-field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #8a95a4 50%), linear-gradient(135deg, #8a95a4 50%, transparent 50%); background-position: calc(100% - 15px) 17px, calc(100% - 11px) 17px; background-repeat: no-repeat; background-size: 4px 4px, 4px 4px; }
.sort-select select { min-width: 110px; height: 40px; padding: 0 31px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); background-color: #fbfcfe; font-size: 12px; text-align: center; text-align-last: center; }
.sort-select select option { text-align: center; }

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.game-card { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 14px; min-height: 183px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.game-card.has-download-menu-open { z-index: 20; }
.game-card:hover { border-color: #c8d1df; box-shadow: 0 9px 25px rgba(34, 50, 70, .07); transform: translateY(-2px); }
.game-icon { display: grid; place-items: center; width: 70px; height: 70px; overflow: hidden; border-radius: 16px; background: linear-gradient(145deg, rgba(130, 124, 225, .58), rgba(212, 113, 153, .43)); }
.game-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-card-main { min-width: 0; }
.game-card-head { display: flex; align-items: start; justify-content: space-between; gap: 8px; }
.game-card h3 { overflow: hidden; margin: 1px 0 3px; font-size: 16px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.game-meta { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.version-tag { flex: 0 0 auto; padding: 4px 6px; border-radius: 4px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 750; }
.game-description { display: -webkit-box; overflow: hidden; min-height: 35px; margin: 11px 0 12px; color: #69778a; font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.game-bottom { display: flex; align-items: end; justify-content: space-between; gap: 8px; }
.platforms { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.platform-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.platform-chip.android { color: #147d6e; background: var(--teal-soft); }
.platform-chip.apple { color: #59657a; background: #edf0f5; }
.platform-chip i { font-style: normal; font-size: 10px; }
.download-actions { display: flex; align-items: end; gap: 5px; }
.download-menu { position: relative; z-index: 2; }
.download-menu-trigger { cursor: pointer; }
.download-menu-chevron { width: 6px; height: 6px; margin-left: 2px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .22s ease; }
.download-menu.is-open .download-menu-chevron { transform: rotate(225deg) translateY(-1px); }
.download-menu-options { position: absolute; top: calc(100% + 8px); left: 0; display: grid; width: max-content; min-width: 174px; max-width: min(280px, calc(100vw - 24px)); padding: 5px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255, 255, 255, .96); box-shadow: 0 16px 35px rgba(28, 36, 53, .18); opacity: 0; transform: translateY(-6px) scale(.96); transform-origin: top left; transition: opacity .2s ease, transform .24s cubic-bezier(.2, .8, .2, 1); }
.download-menu.is-open .download-menu-options { opacity: 1; transform: translateY(0) scale(1); }
.download-menu-option { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 32px; padding: 0 8px; border-radius: 7px; color: var(--ink); font-size: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: color .18s ease, background .18s ease, transform .18s ease; }
.download-menu-option > span:nth-child(2) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.download-menu-option:hover { color: var(--teal); background: var(--teal-soft); transform: translateX(2px); }
.download-option-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: 0 0 auto; border-radius: 5px; color: #fff; background: var(--teal); font-size: 9px; }
.download-menu-option .download-option-arrow { margin-left: auto; color: var(--muted); font-size: 13px; }
.download-link { display: inline-flex; align-items: center; gap: 4px; height: 27px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: #fff; font-size: 10px; font-weight: 700; text-decoration: none; }
.download-link:hover { border-color: #9cacc5; background: #f9fbff; }
.download-link[aria-disabled="true"] { display: none; }
.empty-state { padding: 70px 20px; text-align: center; }
.empty-mark { display: grid; place-items: center; width: 45px; height: 45px; margin: 0 auto 15px; border-radius: 13px; color: var(--coral); background: var(--coral-soft); font-size: 24px; }
.empty-state h3 { margin-bottom: 6px; font-size: 16px; }
.empty-state p { margin-bottom: 0; color: var(--muted); font-size: 12px; }

.form-field { position: relative; margin-bottom: 16px; }
.form-field label, .download-links-heading { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; color: #536176; font-size: 11px; font-weight: 700; }
.form-field label span:not(.platform-badge) { color: var(--coral); }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fbfcfe; font-size: 12px; transition: border-color .18s ease, background .18s ease; }
.form-field input, .form-field select { height: 39px; padding: 0 11px; }
.form-field textarea { resize: vertical; min-height: 92px; padding: 10px 11px; line-height: 1.55; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: #9eb0d4; outline: 0; background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field-row-version { grid-template-columns: .72fr 1.28fr; }
.character-count { position: absolute; right: 8px; bottom: 7px; color: #abb4c1; font-size: 10px; }
.download-links-heading { justify-content: space-between; margin-top: 22px; margin-bottom: 14px; color: var(--ink); font-size: 12px; }
.download-links-heading small { color: #9aa4b2; font-size: 10px; font-weight: 500; }
.platform-field label { color: #647186; }
.platform-field-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.platform-field-heading label { margin: 0; }
.download-add-button { display: inline-grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--teal); background: var(--surface); font-size: 18px; line-height: 1; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.download-add-button:hover { border-color: var(--teal); background: var(--teal-soft); transform: rotate(90deg) scale(1.05); }
.download-add-button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.download-url-list { display: grid; gap: 7px; }
.download-url-row { display: flex; align-items: center; gap: 6px; opacity: 1; transform: translateY(0); transition: opacity .22s ease, transform .22s ease; }
.download-url-row.is-entering { opacity: 0; transform: translateY(-7px) scale(.98); }
.download-url-row.is-entering.is-visible { opacity: 1; transform: translateY(0) scale(1); transition: opacity .34s ease, transform .34s cubic-bezier(.2, .8, .2, 1); }
.download-url-row.is-removing { opacity: 0; transform: translateX(12px) scale(.97); }
.download-url-row input { min-width: 0; flex: 1; }
.download-url-row .download-link-label { flex: .82 1 0; }
.download-url-row .download-link-url { flex: 1.18 1 0; }
.download-remove-button { display: inline-grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: transparent; font-size: 17px; line-height: 1; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.download-remove-button:hover { border-color: var(--coral); color: var(--coral); background: var(--coral-soft); transform: scale(1.05); }
.platform-badge { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 5px; color: #fff; font-size: 10px; font-weight: 800; }
.platform-badge.android { background: var(--teal); }
.platform-badge.apple { background: #57647b; font-size: 7px; }
.file-picker { position: relative; }
.file-picker input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; touch-action: manipulation; }
.file-picker-label { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 0 11px; border: 1px dashed #cbd4e0; border-radius: 5px; color: #67758a !important; background: #fbfcfe; cursor: pointer; font-weight: 600 !important; pointer-events: none; }
.file-picker-label:hover { border-color: #9eb0d4; background: #fff; }
.file-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 5px; color: var(--coral); background: var(--coral-soft); font-size: 17px; font-weight: 500; }
.file-hint { margin-left: auto; color: #a8b2c0 !important; font-size: 10px !important; font-weight: 500 !important; }
.client-reader-status { min-height: 17px; margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.client-reader-status.is-success { color: var(--teal); }
.icon-preview { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 11px; }
.icon-preview img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.icon-preview-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-button { width: 22px; height: 22px; margin-left: auto; padding: 0; border: 0; border-radius: 4px; color: #8a96a7; background: transparent; font-size: 18px; line-height: 1; }
.icon-button:hover { color: var(--coral); background: var(--coral-soft); }
.form-message { min-height: 18px; margin: -2px 0 9px; color: var(--coral); font-size: 11px; line-height: 1.5; }
.form-message.is-success { color: var(--teal); }
.remember-field { display: flex; align-items: center; gap: 8px; margin: -2px 0 15px; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 650; line-height: 1.35; }
.remember-field[hidden] { display: none; }
.remember-field input { width: 15px; height: 15px; flex: 0 0 auto; margin: 0; accent-color: var(--blue); cursor: pointer; }
.remember-field span { user-select: none; }
.publisher-note { display: flex; gap: 5px; margin: 15px 0 0; color: #9aa4b2; font-size: 10px; line-height: 1.5; }
.publisher-note span { color: var(--teal); font-size: 13px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 5; max-width: min(360px, calc(100vw - 48px)); padding: 12px 16px; border: 1px solid #bfe4dd; border-radius: 6px; color: #176f64; background: #f1fbf8; box-shadow: 0 9px 24px rgba(26, 66, 80, .14); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

.admin-shell { width: min(1080px, 100%); margin: 0 auto; padding: 48px clamp(20px, 4vw, 64px) 70px; }
.admin-intro { margin-bottom: 28px; }
.admin-intro h1 { margin-bottom: 10px; }
.admin-intro p:last-child { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.admin-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 30px rgba(32, 48, 69, .05); }
.admin-card-narrow { max-width: 480px; padding: 29px; }
.admin-card-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 24px; }
.admin-card-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.admin-hint { margin: 17px 0 0; color: #9aa4b2; font-size: 10px; line-height: 1.6; }
.admin-hint code { padding: 2px 4px; border-radius: 3px; color: #68758a; background: #f0f3f7; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.admin-dashboard { padding: 29px; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.admin-form-wide { grid-column: 1 / -1; }
.platform-grid { margin-top: 2px; }
.admin-submit { max-width: 260px; margin-top: 4px; }

@media (max-width: 1050px) {
  .workspace-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .9fr); }
  .game-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .topbar { height: 64px; }
  .workspace-label, .topbar-divider { display: none; }
  .shell { padding-top: 32px; }
  .page-intro { align-items: start; flex-direction: column; }
  .intro-actions { width: 100%; }
  .page-intro .button { align-self: stretch; flex: 1; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
  .publisher-section { position: static; }
  .admin-shell { padding-top: 32px; }
  .admin-submit { max-width: none; }
}
@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .brand-text { font-size: 12px; }
  .shell { padding: 27px 16px 45px; }
  h1 { font-size: 34px; }
  .metrics { gap: 8px; }
  .metric { min-height: 112px; padding: 15px; }
  .metric-value { font-size: 27px; }
  .catalog-section, .publisher-section { padding: 21px 16px 23px; }
  .admin-card-narrow, .admin-dashboard { padding: 21px 16px 23px; }
  .admin-form-grid { grid-template-columns: 1fr; gap: 0; }
  .admin-form-wide { grid-column: auto; }
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-toolbar .search-box, .catalog-toolbar .filter-group { grid-column: 1 / -1; }
  .catalog-toolbar .custom-select { min-width: 0; }
  .filter-group { justify-content: stretch; }
  .filter-button { flex: 1; }
  .sort-select select { width: 100%; }
  .game-card { grid-template-columns: 58px minmax(0, 1fr); gap: 11px; padding: 13px; }
  .game-icon { width: 58px; height: 58px; border-radius: 13px; }
  .game-card h3 { font-size: 15px; }
  .game-description { margin-top: 9px; }
  .game-bottom { align-items: start; flex-direction: column; }
  .download-actions { width: 100%; }
  .download-actions .download-menu { flex: 1; }
  .download-actions .download-menu-trigger { width: 100%; }
  .download-link { flex: 1; justify-content: center; }
  .field-row, .field-row-version { grid-template-columns: 1fr; gap: 0; }
}

/* Glass surface system and motion layer */
:root {
  --ink: #eef7f7;
  --muted: #a8c0c4;
  --line: rgba(222, 244, 241, .16);
  --canvas: #0c1824;
  --surface: rgba(255, 255, 255, .095);
  --coral: #ff907d;
  --coral-soft: rgba(255, 144, 125, .15);
  --teal: #62d8c7;
  --teal-soft: rgba(98, 216, 199, .14);
  --blue: #a5c7ff;
  --blue-soft: rgba(165, 199, 255, .15);
  --gold: #ffd37d;
  --gold-soft: rgba(255, 211, 125, .14);
  --shadow: 0 24px 70px rgba(0, 0, 0, .25);
  --glass-blur: blur(24px) saturate(135%);
}

html { min-height: 100%; background: var(--canvas); }
body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: linear-gradient(125deg, #0b1724 0%, #123242 48%, #241d31 100%);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: .42;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 80%);
}
body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(115deg, transparent 0%, rgba(98, 216, 199, .07) 42%, transparent 67%), linear-gradient(295deg, transparent 0%, rgba(255, 144, 125, .055) 54%, transparent 78%);
  animation: atmosphereShift 16s ease-in-out infinite alternate;
}
body.modal-open { overflow: hidden; }
::selection { color: #0c1824; background: var(--teal); }

@keyframes atmosphereShift { from { transform: translate3d(-2%, -1%, 0) scale(1.02); } to { transform: translate3d(2%, 1%, 0) scale(1.04); } }
@keyframes pageRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardRise { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(98, 216, 199, .3); } 50% { box-shadow: 0 0 0 6px rgba(98, 216, 199, 0); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.topbar, .shell, .admin-shell { animation: pageRise .65s cubic-bezier(.2, .8, .2, 1) both; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 22, 33, .62);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .11);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.brand-mark { border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .12); box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 8px 18px rgba(0, 0, 0, .16); }
.brand-text { color: var(--ink); }
.brand-text b { color: var(--coral); }
.topbar-meta, .workspace-label { color: var(--muted); }
.topbar-divider { background: var(--line); }
.connection-status i { background: var(--gold); box-shadow: 0 0 0 3px rgba(255, 211, 125, .16); animation: pulseGlow 2.2s ease-in-out infinite; }
.connection-status.is-connected i { background: var(--teal); box-shadow: 0 0 0 3px rgba(98, 216, 199, .15); }
.connection-status.is-error i { background: var(--coral); box-shadow: 0 0 0 3px rgba(255, 144, 125, .15); }
.topbar-button { height: 34px; padding: 0 11px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 750; transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease; }
.topbar-button:hover { color: var(--ink); border-color: var(--line); background: rgba(255, 255, 255, .08); transform: translateY(-1px); }
.topbar-button-accent { color: #10252c; background: var(--teal); box-shadow: 0 8px 20px rgba(98, 216, 199, .17); }
.topbar-button-accent:hover { color: #10252c; border-color: transparent; background: #8be7da; }
.user-auth-area { display: flex; align-items: center; gap: 5px; }
.user-greeting { display: inline-flex; align-items: center; gap: 7px; max-width: 150px; color: var(--ink); font-size: 11px; }
.user-greeting i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px rgba(98, 216, 199, .14); }
.user-greeting b { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

.shell, .admin-shell { width: min(1220px, 100%); padding-top: 58px; padding-bottom: 86px; }
.page-intro, .admin-intro { animation: pageRise .7s .08s cubic-bezier(.2, .8, .2, 1) both; }
.eyebrow, .section-kicker { color: var(--coral); text-shadow: 0 0 20px rgba(255, 144, 125, .22); }
h1 { color: #f4fbfb; text-shadow: 0 8px 32px rgba(0, 0, 0, .25); }
.intro-copy, .admin-intro p:last-child { color: var(--muted); }
.button { border-color: var(--line); border-radius: 999px; color: var(--ink); background: rgba(255, 255, 255, .08); box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 10px 25px rgba(0, 0, 0, .12); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.button:hover { border-color: rgba(222, 244, 241, .35); background: rgba(255, 255, 255, .14); box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 15px 30px rgba(0, 0, 0, .19); }
.button-primary { border-color: transparent; color: #0d2229; background: linear-gradient(120deg, #6be0cf, #a1ecd9); box-shadow: 0 12px 26px rgba(98, 216, 199, .18); }
.button-primary:hover { color: #0d2229; border-color: transparent; background: linear-gradient(120deg, #95eee0, #c0f4e8); }
.button-quiet { color: var(--ink); background: rgba(255, 255, 255, .08); }
.button-icon { font-size: 16px; }

.metrics { gap: 14px; animation: pageRise .7s .16s cubic-bezier(.2, .8, .2, 1) both; }
.metric, .catalog-section, .admin-card {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .055));
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .11);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.metric { min-height: 132px; overflow: hidden; }
.metric::before { position: absolute; inset: 0; pointer-events: none; content: ""; opacity: .7; background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, .08) 48%, transparent 74%); transform: translateX(-100%); transition: transform .7s ease; }
.metric:hover::before { transform: translateX(100%); }
.metric::after { display: none; }
.metric-label, .metric-note { color: var(--muted); }
.metric-value { color: #f3fbfb; }
.metric-coral::after { background: var(--coral); }
.metric-teal::after { background: var(--teal); }
.metric-blue::after { background: var(--blue); }
.metric-gold::after { background: var(--gold); }

.workspace-grid { animation: pageRise .75s .23s cubic-bezier(.2, .8, .2, 1) both; }
.catalog-section { min-height: 610px; padding: 31px; }
.section-heading h2, .publisher-heading h2, .admin-card-heading h2 { color: #f1fbfa; }
.result-count { color: var(--muted); }
.catalog-toolbar { gap: 10px; }
.search-box, .filter-group, .sort-select select, .form-field input, .form-field select, .form-field textarea, .file-picker-label, .icon-preview { border-color: var(--line); color: var(--ink); background: rgba(6, 20, 31, .32); box-shadow: inset 0 1px rgba(255, 255, 255, .05); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.search-box:focus-within, .form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: rgba(98, 216, 199, .65); background: rgba(6, 20, 31, .45); box-shadow: 0 0 0 4px rgba(98, 216, 199, .09); }
.search-box input, .form-field input, .form-field select, .form-field textarea { color: var(--ink); }
.search-box input::placeholder, .form-field input::placeholder, .form-field textarea::placeholder { color: #79939a; }
.search-icon { color: var(--teal); }
.filter-button { color: var(--muted); }
.filter-button.is-active { color: #10252c; background: var(--teal); box-shadow: 0 5px 16px rgba(98, 216, 199, .18); }
.sort-select select { color: var(--ink); }
.game-grid { gap: 15px; }
.game-card { border: 1px solid var(--line); border-radius: 15px; background: rgba(255, 255, 255, .07); box-shadow: inset 0 1px rgba(255, 255, 255, .09), 0 12px 32px rgba(0, 0, 0, .15); animation: cardRise .55s cubic-bezier(.2, .8, .2, 1) both; transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease, background .25s ease; }
.game-card:nth-child(2) { animation-delay: .06s; }
.game-card:nth-child(3) { animation-delay: .12s; }
.game-card:nth-child(4) { animation-delay: .18s; }
.game-card:hover { border-color: rgba(98, 216, 199, .42); background: rgba(255, 255, 255, .105); box-shadow: inset 0 1px rgba(255, 255, 255, .16), 0 20px 42px rgba(0, 0, 0, .22); }
.game-icon { border: 1px solid rgba(255, 255, 255, .12); background: linear-gradient(145deg, rgba(98, 216, 199, .2), rgba(255, 144, 125, .16)); color: #d6f5f0; box-shadow: inset 0 1px rgba(255, 255, 255, .15); }
.game-meta, .game-description { color: var(--muted); }
.version-tag { color: #c8dcff; background: var(--blue-soft); }
.platform-chip.android { color: #a9f0e5; background: var(--teal-soft); }
.platform-chip.apple { color: #d7dfe9; background: rgba(255, 255, 255, .11); }
.download-link { border-color: var(--line); color: var(--ink); background: rgba(255, 255, 255, .07); transition: all .22s ease; }
.download-link:hover { border-color: rgba(98, 216, 199, .45); color: #b9f3ea; background: rgba(98, 216, 199, .12); transform: translateY(-2px); }
.download-menu-options { border-color: rgba(222, 244, 241, .18); background: rgba(39, 33, 51, .96); box-shadow: 0 18px 40px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .12); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.download-menu-option { color: rgba(255, 239, 249, .86); }
.download-menu-option:hover { color: #c5fff2; background: rgba(98, 216, 199, .13); }
.download-menu-option .download-option-arrow { color: rgba(255, 239, 249, .54); }
.empty-state p { color: var(--muted); }
.empty-mark { color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 30px rgba(98, 216, 199, .12); }

.admin-shell { max-width: 1120px; }
.admin-card { border-radius: 20px; }
.admin-card-narrow, .admin-dashboard { background: linear-gradient(145deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .065)); }
.admin-card-narrow { animation: cardRise .6s .18s cubic-bezier(.2, .8, .2, 1) both; }
.admin-dashboard { animation: cardRise .6s .14s cubic-bezier(.2, .8, .2, 1) both; }
.admin-card.view-exit { opacity: 0; transform: translateY(-10px) scale(.985); transition: opacity .16s ease, transform .16s ease; }
.admin-card.view-enter { opacity: 0; transform: translateY(14px) scale(.985); }
.admin-card.view-enter.view-visible { opacity: 1; transform: translateY(0) scale(1); transition: opacity .42s ease, transform .42s cubic-bezier(.2, .8, .2, 1); }
.admin-hint, .auth-footnote, .publisher-note { color: var(--muted); }
.admin-hint code { color: #c8e8e4; background: rgba(98, 216, 199, .13); }
.publish-dot { background: var(--coral); box-shadow: 0 0 0 4px var(--coral-soft); animation: pulseGlow 2.2s ease-in-out infinite; }
.form-field label, .download-links-heading { color: #c2d4d6; }
.download-links-heading { color: var(--ink); }
.download-links-heading small { color: var(--muted); }
.form-message { color: var(--coral); }
.form-message.is-success { color: var(--teal); }
.platform-badge.android { color: #0c262a; background: var(--teal); }
.platform-badge.apple { color: #eef7f7; background: rgba(255, 255, 255, .24); }
.file-picker-label { color: #c2d4d6 !important; }
.file-picker-label:hover { border-color: rgba(98, 216, 199, .6); background: rgba(98, 216, 199, .08); }
.file-hint { color: #86a3a7 !important; }
.icon-preview { color: var(--muted); }
.toast { border-color: rgba(98, 216, 199, .35); color: #c1f4eb; background: rgba(12, 51, 54, .72); box-shadow: 0 18px 38px rgba(0, 0, 0, .28); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.toast.is-visible { animation: toastIn .35s cubic-bezier(.2, .8, .2, 1) both; }
.toast.is-error { border-color: rgba(255, 144, 125, .4); color: #ffd1c8; background: rgba(67, 30, 37, .8); }

.auth-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .34s ease; }
.auth-modal[hidden] { display: none; }
.auth-modal.is-open { opacity: 1; pointer-events: auto; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(3, 11, 18, .64); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.auth-dialog { position: relative; width: min(440px, 100%); overflow: hidden; border: 1px solid rgba(222, 244, 241, .23); border-radius: 24px; background: linear-gradient(145deg, rgba(30, 65, 76, .9), rgba(19, 28, 47, .92)); box-shadow: 0 34px 100px rgba(0, 0, 0, .52), inset 0 1px rgba(255, 255, 255, .16); transform: translateY(-18px) scale(.96); transition: transform .42s cubic-bezier(.2, .8, .2, 1); backdrop-filter: blur(30px) saturate(145%); -webkit-backdrop-filter: blur(30px) saturate(145%); }
.auth-modal.is-open .auth-dialog { transform: translateY(0) scale(1); }
.auth-dialog-content { position: relative; z-index: 1; padding: 34px; }
.auth-dialog h2 { margin: 0 0 8px; color: #f2fbfa; font-size: 27px; letter-spacing: -.03em; }
.auth-subtitle { margin: 0 0 23px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-close { position: absolute; top: 15px; right: 15px; z-index: 3; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid transparent; border-radius: 50%; color: #bbd0d2; background: rgba(255, 255, 255, .08); font-size: 20px; line-height: 1; transition: all .22s ease; }
.auth-close:hover { color: #fff; border-color: rgba(255, 255, 255, .2); background: rgba(255, 144, 125, .2); transform: rotate(90deg); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 21px; border: 1px solid var(--line); border-radius: 11px; background: rgba(4, 17, 25, .26); }
.auth-tab { height: 35px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; transition: all .25s ease; }
.auth-tab:hover { color: var(--ink); background: rgba(255, 255, 255, .08); }
.auth-tab.is-active { color: #10252c; background: var(--teal); box-shadow: 0 7px 17px rgba(98, 216, 199, .18); }
.auth-submit { min-height: 47px; margin-top: 2px; }
.auth-footnote { margin: 17px 0 0; font-size: 10px; line-height: 1.6; }

@media (max-width: 780px) {
  .topbar { height: 68px; }
  .workspace-label, .topbar-divider { display: none; }
  .topbar-meta { gap: 8px; }
  .shell, .admin-shell { padding-top: 36px; }
  .page-intro { gap: 16px; }
  .intro-actions { width: auto; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-section { padding: 23px 19px; }
  .admin-card-narrow, .admin-dashboard { padding: 24px; }
}

@media (max-width: 520px) {
  .topbar { padding: 0 16px; }
  .brand-text { font-size: 11px; }
  .connection-status { display: none; }
  .shell, .admin-shell { padding: 28px 16px 54px; }
  .page-intro .button { width: 100%; }
  .intro-actions { width: 100%; }
  .metrics { gap: 9px; }
  .metric { min-height: 112px; padding: 15px; }
  .catalog-section { padding: 20px 14px; }
  .admin-users { padding: 21px 16px 23px; }
  .auth-modal { padding: 14px; }
  .auth-dialog-content { padding: 28px 22px 24px; }
}

@media (max-width: 560px) {
  .admin-user-item { grid-template-columns: auto minmax(0, 1fr); }
  .admin-user-item time { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Reference dashboard skin: floating navigation, illustrated backdrop, violet glass panels */
html { scroll-behavior: smooth; scrollbar-width: none; }
html::-webkit-scrollbar { width: 0; height: 0; }
body {
  background-color: #1d1726;
  background-image: linear-gradient(115deg, rgba(33, 24, 43, .43), rgba(73, 46, 69, .18) 50%, rgba(24, 30, 43, .44)), url('/assets/nexus-backdrop.jpg');
  background-position: center 34%;
  background-size: cover;
  background-attachment: fixed;
}
body { scrollbar-width: none; }
body::-webkit-scrollbar { width: 0; height: 0; }
body::before { opacity: .12; background-size: 72px 72px; }
body::after { background: linear-gradient(110deg, rgba(255, 208, 197, .14), transparent 34%, rgba(134, 128, 208, .12) 75%, transparent); opacity: .72; }
.topbar { position: sticky; height: auto; padding: 19px clamp(16px, 4vw, 54px) 12px; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar-inner { display: grid; grid-template-columns: auto minmax(250px, 1fr) auto; align-items: center; gap: 18px; width: min(1110px, 100%); min-height: 54px; margin: 0 auto; padding: 7px 10px 7px 14px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(52, 44, 61, .7); box-shadow: 0 16px 35px rgba(19, 12, 28, .26), inset 0 1px rgba(255, 255, 255, .2); backdrop-filter: blur(24px) saturate(135%); -webkit-backdrop-filter: blur(24px) saturate(135%); }
.brand { gap: 9px; padding-left: 3px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; color: #fff; background: linear-gradient(145deg, rgba(128, 122, 231, .95), rgba(82, 77, 160, .85)); box-shadow: 0 7px 15px rgba(69, 61, 145, .28), inset 0 1px rgba(255, 255, 255, .28); }
.brand-text { color: #f6eef6; font-size: 13px; letter-spacing: .13em; }
.brand-text b { color: #f4a0ba; }
.main-nav { position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 38px; padding: 3px; border-radius: 999px; background: rgba(30, 26, 39, .34); isolation: isolate; }
.main-nav::before { position: absolute; top: 3px; left: 0; z-index: 0; width: var(--nav-pill-w, 88px); height: 32px; border-radius: 999px; content: ""; background: linear-gradient(120deg, #827ce1, #928fe8); box-shadow: 0 8px 18px rgba(85, 76, 177, .34), inset 0 1px rgba(255, 255, 255, .24); transform: translateX(var(--nav-pill-x, 3px)); transition: width .42s cubic-bezier(.2, .8, .2, 1), transform .5s cubic-bezier(.2, .8, .2, 1); }
.nav-item { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; min-width: 88px; height: 32px; padding: 0 17px; border-radius: 999px; color: rgba(249, 240, 250, .78); font-size: 12px; font-weight: 750; text-decoration: none; background: transparent; transition: color .22s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }
.admin-main-nav .nav-item { border: 0; font: inherit; cursor: pointer; }
.nav-item:hover { color: #fff; transform: translateY(-1px); }
.nav-item.is-active { color: #fff; background: transparent; }
.topbar-meta { gap: 9px; color: rgba(249, 240, 250, .74); }
.workspace-label { color: rgba(249, 240, 250, .7); }
.topbar-divider { background: rgba(255, 255, 255, .17); }
.connection-status { font-size: 10px; }
.connection-status i { width: 6px; height: 6px; }
.topbar-button { height: 30px; padding: 0 10px; color: rgba(249, 240, 250, .76); font-size: 10px; }
.topbar-button-accent { color: #fff; background: linear-gradient(120deg, #827ce1, #a190e7); box-shadow: 0 6px 16px rgba(103, 88, 195, .25); }
.user-greeting { color: #fff; font-size: 10px; }

.shell, .admin-shell { width: min(1080px, 100%); padding-top: 29px; padding-bottom: 70px; }
.page-intro { align-items: center; margin-bottom: 18px; }
.eyebrow { margin-bottom: 4px; color: #ffc2cf; font-size: 9px; }
h1 { margin-bottom: 5px; font-size: clamp(28px, 3vw, 38px); text-shadow: 0 5px 22px rgba(35, 18, 43, .35); }
.intro-copy { color: rgba(255, 245, 251, .76); font-size: 12px; }
.button { min-height: 37px; padding: 0 14px; border-radius: 10px; background: rgba(64, 54, 73, .66); box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 8px 22px rgba(27, 15, 36, .2); }
.button-primary { background: linear-gradient(120deg, #867fe2, #9a91e9); box-shadow: 0 10px 22px rgba(90, 74, 177, .3), inset 0 1px rgba(255, 255, 255, .24); }
.button-primary:hover { background: linear-gradient(120deg, #a29beb, #b3a7ef); }

.featured-panel { margin-bottom: 15px; animation: pageRise .7s .12s cubic-bezier(.2, .8, .2, 1) both; }
.featured-art { position: relative; display: flex; align-items: end; min-height: 224px; overflow: hidden; padding: 24px 31px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 17px; background: rgba(27, 17, 32, .78); box-shadow: 0 21px 48px rgba(26, 13, 36, .32), inset 0 1px rgba(255, 255, 255, .24); isolation: isolate; transition: transform .35s ease, box-shadow .35s ease; }
.featured-art::before { position: absolute; inset: 0; z-index: -1; pointer-events: none; content: ""; background: linear-gradient(100deg, rgba(27, 17, 32, .9), rgba(27, 17, 32, .4) 48%, rgba(27, 17, 32, .12)); }
.featured-art::after { position: absolute; inset: 0; z-index: -1; pointer-events: none; content: ""; background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .13) 47%, transparent 67%); transform: translateX(-110%); transition: transform .8s ease; }
.featured-art:hover { transform: translateY(-2px); box-shadow: 0 26px 60px rgba(26, 13, 36, .38), inset 0 1px rgba(255, 255, 255, .27); }
.featured-art:hover::after { transform: translateX(110%); }
.featured-badge { position: absolute; top: 15px; left: 17px; z-index: 4; padding: 5px 9px; border-radius: 6px; color: #fff; background: #df3e73; font-size: 10px; font-weight: 800; box-shadow: 0 7px 16px rgba(223, 62, 115, .27); }
.featured-viewport { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.featured-track { display: flex; width: 200%; height: 100%; transform: translateX(0); transition: transform .56s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.featured-track.is-resetting { transition: none !important; }
.featured-track.is-prepared-prev:not(.is-sliding-prev) { transform: translateX(-50%); transition: none; }
.featured-track.is-sliding-next { transform: translateX(-50%); }
.featured-track.is-sliding-prev { transform: translateX(0); }
.featured-slide { position: relative; display: flex; flex: 0 0 50%; align-items: end; min-width: 0; padding: 24px 31px; background-position: center 24%; background-size: cover; isolation: isolate; }
.featured-slide::before { position: absolute; inset: 0; z-index: -1; pointer-events: none; content: ""; background: linear-gradient(100deg, rgba(27, 17, 32, .9), rgba(27, 17, 32, .4) 48%, rgba(27, 17, 32, .12)); }
.featured-slide::after { position: absolute; inset: 0; z-index: -1; pointer-events: none; content: ""; background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, .13) 47%, transparent 67%); transform: translateX(-110%); transition: transform .8s ease; }
.featured-slide:first-child::after { transform: translateX(110%); }
.featured-copy { max-width: 62%; margin-left: 48px; }
.featured-meta { margin: 0 0 7px; color: #e9b2cd; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.featured-copy h2 { margin: 0 0 8px; color: #fff6fb; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; text-shadow: 0 4px 15px rgba(0, 0, 0, .24); }
.featured-copy > p:not(.featured-meta) { overflow: hidden; margin: 0; color: rgba(255, 243, 249, .83); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.featured-platforms { display: flex; gap: 6px; margin-top: 13px; }
.featured-platform { padding: 5px 8px; border-radius: 6px; color: #fff; background: rgba(255, 255, 255, .16); font-size: 10px; font-weight: 750; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.featured-platform.android { color: #d7fff7; background: rgba(34, 178, 147, .32); }
.featured-controls { position: absolute; top: 50%; right: 0; left: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: 0 15px; pointer-events: none; transform: translateY(-50%); }
.featured-control { display: grid; place-items: center; width: 44px; height: 44px; padding: 0 0 3px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%; color: #303540; background: rgba(244, 244, 245, .8); font-size: 27px; font-weight: 400; line-height: 1; box-shadow: 0 8px 20px rgba(20, 16, 30, .16), inset 0 1px rgba(255, 255, 255, .8); backdrop-filter: blur(13px) saturate(130%); -webkit-backdrop-filter: blur(13px) saturate(130%); pointer-events: auto; transition: transform .3s cubic-bezier(.4, 0, .2, 1), background .3s ease, border-color .3s ease, opacity .3s ease; }
.featured-control:hover:not(:disabled) { border-color: rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .9); transform: translateY(-50%) scale(1.05); }
.featured-control:disabled { cursor: default; opacity: .38; }
.featured-dots { position: absolute; top: 13px; right: auto; bottom: auto; left: 50%; z-index: 5; display: flex; gap: 6px; align-items: center; transform: translateX(-50%); }
.featured-dot { width: 30px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(228, 228, 231, .8); box-shadow: 0 3px 9px rgba(20, 16, 30, .12); transition: width .3s cubic-bezier(.4, 0, .2, 1), background .3s ease, transform .3s ease; }
.featured-dot:hover { background: rgba(255, 255, 255, .84); transform: translateY(-1px); }
.featured-dot[aria-selected="true"] { width: 43px; background: #847de0; box-shadow: 0 3px 9px rgba(105, 93, 196, .38), inset 0 1px rgba(255, 255, 255, .35); }

.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.metric { min-height: 116px; padding: 17px 19px; border-radius: 16px; background: linear-gradient(145deg, rgba(89, 77, 95, .78), rgba(67, 60, 74, .7)); box-shadow: 0 18px 37px rgba(31, 17, 40, .24), inset 0 1px rgba(255, 255, 255, .15); }
.metric::before { opacity: .45; }
.metric-label { color: #d8c8ed; font-size: 12px; }
.metric-value { margin-top: 8px; color: #fff8ff; font-size: 25px; }
.metric-note { margin-top: 5px; color: rgba(255, 240, 250, .62); font-size: 10px; }
.metric-value-date { font-size: 22px; }

.catalog-section { min-height: 610px; padding: 25px; border-radius: 17px; background: linear-gradient(145deg, rgba(75, 65, 85, .79), rgba(49, 46, 62, .72)); box-shadow: 0 22px 50px rgba(27, 15, 36, .29), inset 0 1px rgba(255, 255, 255, .16); }
.section-heading { margin-bottom: 18px; }
.section-kicker { color: #dfb0dd; }
.section-heading h2 { font-size: 20px; text-shadow: 0 3px 15px rgba(0, 0, 0, .2); }
.result-count { color: rgba(255, 238, 249, .68); }
.catalog-toolbar { grid-template-columns: minmax(180px, 1fr) auto auto auto; margin-bottom: 17px; }
.search-box, .filter-group, .sort-select select { border-color: rgba(255, 255, 255, .15); background: rgba(33, 29, 42, .36); }
.search-box input { color: #fff7fb; }
.search-box input::placeholder { color: rgba(255, 239, 249, .48); }
.search-icon { color: #b6a7f3; }
.filter-button { color: rgba(255, 239, 249, .65); }
.filter-button.is-active { color: #fff; background: transparent; box-shadow: none; }
.sort-select select { color: rgba(255, 239, 249, .78); }
.game-grid { gap: 12px; }
.game-card { min-height: 176px; padding: 15px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; background: rgba(67, 59, 75, .62); box-shadow: 0 12px 28px rgba(29, 16, 39, .2), inset 0 1px rgba(255, 255, 255, .12); }
.game-card:hover { border-color: rgba(164, 152, 243, .52); background: rgba(84, 73, 95, .72); box-shadow: 0 20px 36px rgba(29, 16, 39, .3), inset 0 1px rgba(255, 255, 255, .18); }
.game-icon { width: 66px; height: 66px; border-radius: 14px; background: linear-gradient(145deg, rgba(130, 124, 225, .58), rgba(212, 113, 153, .43)); }
.game-meta, .game-description { color: rgba(255, 238, 249, .64); }
.version-tag { color: #e2ddff; background: rgba(139, 133, 233, .28); }
.platform-chip.android { color: #d4fff5; background: rgba(38, 188, 146, .25); }
.platform-chip.apple { color: #f3e7f4; background: rgba(255, 255, 255, .12); }
.download-link { border-color: rgba(255, 255, 255, .15); color: #fff4fa; background: rgba(255, 255, 255, .08); }
.download-link:hover { border-color: rgba(164, 152, 243, .56); color: #fff; background: rgba(139, 133, 233, .25); }

.admin-shell { padding-top: 38px; }
.admin-intro { max-width: 620px; margin: 0 auto 25px; text-align: center; }
.admin-intro h1 { font-size: clamp(30px, 4vw, 42px); }
.admin-intro p:last-child { color: rgba(255, 238, 249, .72); }
.admin-card-narrow, .admin-dashboard, .admin-users { border-radius: 17px; background: linear-gradient(145deg, rgba(75, 65, 85, .84), rgba(49, 46, 62, .78)); box-shadow: 0 22px 50px rgba(27, 15, 36, .3), inset 0 1px rgba(255, 255, 255, .16); }
.admin-card-narrow { width: min(840px, 100%); margin: 0 auto; max-width: 460px; }
.admin-dashboard { width: min(1080px, calc(100% + clamp(40px, 8vw, 128px))); margin: 0 0 0 calc(-1 * clamp(20px, 4vw, 64px)); }
.admin-card-heading h2 { font-size: 20px; }
.form-field label, .download-links-heading { color: rgba(255, 239, 249, .77); }
.form-field input, .form-field select, .form-field textarea, .file-picker-label, .icon-preview { border-color: rgba(255, 255, 255, .15); background: rgba(33, 29, 42, .38); }
.form-field input, .form-field select, .form-field textarea { color: #fff7fb; }
.form-field input::placeholder, .form-field textarea::placeholder { color: rgba(255, 239, 249, .45); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: rgba(164, 152, 243, .7); background: rgba(33, 29, 42, .55); box-shadow: 0 0 0 4px rgba(139, 133, 233, .13); }
.admin-hint, .auth-footnote, .publisher-note { color: rgba(255, 239, 249, .56); }
.auth-dialog { border-color: rgba(255, 255, 255, .25); background: linear-gradient(145deg, rgba(75, 65, 85, .78), rgba(38, 35, 52, .74)); box-shadow: 0 34px 100px rgba(15, 8, 25, .46), inset 0 1px rgba(255, 255, 255, .2); backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%); }
.auth-tab.is-active, .button-primary, .topbar-button-accent { background: linear-gradient(120deg, #837de2, #968de9); }
.auth-submit { color: #fff; }
.auth-tab.is-active { color: #fff; }
.featured-panel + .metrics { animation-delay: .19s; }

@media (max-width: 900px) {
  .topbar-inner { grid-template-columns: auto 1fr auto; gap: 10px; }
  .main-nav { gap: 0; }
  .nav-item { min-width: 68px; padding: 0 10px; }
  .workspace-label, .topbar-divider { display: none; }
}
@media (max-width: 680px) {
  .topbar { padding: 12px; }
  .topbar-inner { grid-template-columns: 1fr auto; border-radius: 18px; padding: 8px 10px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; order: 3; }
  .nav-item { flex: 1; min-width: 0; }
  .topbar-meta { justify-content: end; }
  .featured-art { min-height: 230px; padding: 22px; }
  .featured-copy { max-width: 78%; margin-left: 42px; }
  .featured-copy h2 { font-size: 25px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-toolbar .search-box, .catalog-toolbar .filter-group { grid-column: 1 / -1; }
  .catalog-toolbar .custom-select { min-width: 0; }
}
@media (max-width: 480px) {
  .brand-text { font-size: 10px; }
  .connection-status { display: none; }
  .topbar-button { padding: 0 8px; }
  .featured-art { min-height: 210px; }
  .featured-copy { max-width: 88%; margin-left: 36px; }
  .featured-controls { padding: 0 10px; }
  .featured-control { width: 38px; height: 38px; border-radius: 50%; font-size: 23px; }
  .featured-dots { top: 11px; }
  .featured-dot { width: 24px; height: 7px; }
  .featured-dot[aria-selected="true"] { width: 46px; }
  .metrics { gap: 8px; }
  .metric { min-height: 105px; padding: 13px; }
  .metric-value { font-size: 23px; }
  .catalog-section { padding: 17px 13px; }
}

/* Navigation alignment and account popover */
.topbar { padding-bottom: 18px; }
.topbar-inner { width: min(1080px, 100%); }
.user-auth-area { position: relative; min-width: 40px; justify-content: flex-end; }
.user-avatar { position: relative; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 2px solid rgba(255, 255, 255, .52); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #8d83e3, #df83b5); box-shadow: 0 7px 16px rgba(26, 15, 39, .3), inset 0 1px rgba(255, 255, 255, .36); font-size: 10px; font-weight: 850; letter-spacing: .04em; cursor: pointer; transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease; }
.user-avatar img, .account-popover-avatar img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
.user-avatar::after { position: absolute; right: -1px; bottom: 0; width: 8px; height: 8px; border: 2px solid #48354e; border-radius: 50%; content: ""; background: #55d8ae; }
.user-avatar:hover, .user-avatar[aria-expanded="true"] { border-color: #fff; box-shadow: 0 10px 22px rgba(69, 55, 162, .38), 0 0 0 4px rgba(150, 141, 233, .18); transform: translateY(-2px) scale(1.04); }
.account-popover { position: absolute; top: calc(100% + 13px); right: 0; z-index: 30; width: 224px; padding: 14px; border: 1px solid rgba(255, 255, 255, .23); border-radius: 15px; background: linear-gradient(145deg, rgba(100, 82, 107, .94), rgba(49, 43, 62, .96)); box-shadow: 0 22px 46px rgba(25, 13, 36, .34), inset 0 1px rgba(255, 255, 255, .2); opacity: 0; pointer-events: none; transform: translateY(-8px) scale(.96); transition: opacity .22s ease, transform .22s cubic-bezier(.2, .8, .2, 1); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); }
.account-popover[hidden] { display: none; }
.account-popover.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.account-popover-head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 9px; }
.account-popover-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #8d83e3, #df83b5); font-size: 10px; font-weight: 850; }
.account-popover-head strong { display: block; max-width: 145px; overflow: hidden; color: #fff7fb; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-popover-head small { display: block; margin-top: 3px; color: rgba(255, 239, 249, .62); font-size: 10px; }
.account-popover-rule { height: 1px; margin: 2px 0 8px; background: rgba(255, 255, 255, .13); }
.account-menu-button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 0 9px; border: 1px solid transparent; border-radius: 8px; color: rgba(255, 247, 251, .82); background: transparent; font-size: 11px; font-weight: 750; text-align: left; transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease; }
.account-menu-button:hover { color: #fff; border-color: rgba(164, 152, 243, .25); background: rgba(139, 133, 233, .15); transform: translateX(2px); }
.account-logout { color: #ffb4c3; }
.account-logout:hover { border-color: rgba(255, 144, 165, .22); background: rgba(255, 115, 146, .13); transform: translateX(2px); }

@media (max-width: 680px) {
  .topbar { padding-bottom: 12px; }
  .account-popover { right: -4px; }
}

/* Header tools: quick actions, theme switch and account controls. */
.header-tools { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.header-icon-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; color: rgba(255, 244, 251, .86); background: rgba(255, 255, 255, .09); font-size: 16px; line-height: 1; box-shadow: inset 0 1px rgba(255, 255, 255, .14); transition: transform .24s ease, color .24s ease, background .24s ease, border-color .24s ease; }
.header-icon-button:hover, .header-icon-button[aria-expanded="true"] { color: #fff; border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .19); transform: translateY(-1px) scale(1.05); }
.theme-toggle .theme-icon { display: block; transform: rotate(0deg); transition: transform .35s ease; }
.theme-toggle[aria-pressed="true"] .theme-icon { transform: rotate(180deg); }

/* Theme state is stored per page; both pages share the same transition language. */
html, body, .topbar, .metric, .catalog-section, .game-card, .admin-card, .button, .search-box, .filter-group, .sort-select select, .form-field input, .form-field select, .form-field textarea { transition: background .45s ease, background-color .45s ease, background-image .45s ease, border-color .35s ease, color .35s ease, box-shadow .35s ease; }
html::after { position: fixed; inset: 0; z-index: 70; pointer-events: none; content: ""; opacity: 0; background: linear-gradient(120deg, rgba(255, 255, 255, .2), rgba(164, 152, 243, .08) 48%, rgba(255, 144, 125, .13)); }
html.theme-transitioning::after { animation: themeTransitionOverlay .52s ease both; }
html.theme-transitioning *, html.theme-transitioning *::before, html.theme-transitioning *::after { transition-property: background, background-color, background-image, border-color, color, box-shadow, fill, stroke, opacity !important; transition-duration: .52s !important; transition-timing-function: ease !important; }
@keyframes themeTransitionOverlay { 0% { opacity: 0; } 32% { opacity: .62; } 100% { opacity: 0; } }
html[data-theme="light"] { --ink: #2b2540; --muted: #6d6681; --line: rgba(93, 69, 126, .2); --surface: rgba(255, 255, 255, .67); --canvas: #f7effb; --coral: #d95785; --coral-soft: rgba(217, 87, 133, .12); --teal: #4b9f91; --teal-soft: rgba(75, 159, 145, .13); --blue: #7064c7; --blue-soft: rgba(112, 100, 199, .14); --gold: #bd7b27; --gold-soft: rgba(189, 123, 39, .13); --shadow: 0 24px 70px rgba(92, 59, 104, .18); }
html[data-theme="light"] body { color: var(--ink); background-color: #f7effb; background-image: linear-gradient(115deg, rgba(255, 245, 251, .6), rgba(255, 255, 255, .2) 48%, rgba(237, 227, 252, .56)), url('/assets/nexus-backdrop.jpg'); }
html[data-theme="light"] body::before { opacity: .06; }
html[data-theme="light"] body::after { opacity: .34; background: linear-gradient(110deg, rgba(255, 255, 255, .24), transparent 36%, rgba(153, 143, 222, .12) 76%, transparent); }
html[data-theme="light"] .topbar-inner { border-color: rgba(255, 255, 255, .58); background: rgba(255, 255, 255, .72); box-shadow: 0 16px 35px rgba(93, 64, 109, .16), inset 0 1px rgba(255, 255, 255, .8); }
html[data-theme="light"] .brand-text, html[data-theme="light"] .nav-item, html[data-theme="light"] .topbar-meta, html[data-theme="light"] .workspace-label { color: #3b3150; }
html[data-theme="light"] .topbar-button { color: #5b4a6d; border-color: rgba(93, 69, 126, .24); background: rgba(255, 255, 255, .56); box-shadow: inset 0 1px rgba(255, 255, 255, .86), 0 5px 12px rgba(93, 59, 105, .1); }
html[data-theme="light"] .topbar-button:hover { color: #38294d; border-color: rgba(93, 69, 126, .42); background: rgba(255, 255, 255, .84); }
html[data-theme="light"] .topbar-button-accent { color: #fff; border-color: transparent; background: linear-gradient(120deg, #7e73da, #9e83e4); box-shadow: 0 7px 16px rgba(103, 88, 195, .25); }
html[data-theme="light"] .topbar-button-accent:hover { color: #fff; background: linear-gradient(120deg, #7165ce, #9072d8); }
html[data-theme="light"] .main-nav { background: rgba(115, 94, 143, .1); }
html[data-theme="light"] .nav-item:hover { color: #2b2540; background: rgba(112, 100, 199, .11); }
html[data-theme="light"] .header-icon-button { border-color: rgba(93, 69, 126, .18); color: #4b3c63; background: rgba(255, 255, 255, .58); box-shadow: inset 0 1px rgba(255, 255, 255, .9); }
html[data-theme="light"] .header-icon-button:hover, html[data-theme="light"] .header-icon-button[aria-expanded="true"] { color: #2b2540; border-color: rgba(93, 69, 126, .34); background: rgba(255, 255, 255, .84); }
html[data-theme="light"] .user-avatar { border-color: rgba(255, 255, 255, .82); }
html[data-theme="light"] .connection-status, html[data-theme="light"] .user-greeting { color: #5c4d6e; }
html[data-theme="light"] h1, html[data-theme="light"] .section-heading h2, html[data-theme="light"] .publisher-heading h2, html[data-theme="light"] .admin-card-heading h2 { color: #2b2540; text-shadow: 0 5px 22px rgba(255, 255, 255, .42); }
html[data-theme="light"] .intro-copy, html[data-theme="light"] .admin-intro p:last-child { color: #6d6681; }
html[data-theme="light"] .admin-intro .eyebrow,
html[data-theme="light"] .admin-card .section-kicker { color: #a44d78; text-shadow: none; }
html[data-theme="light"] .admin-card .form-field label,
html[data-theme="light"] .admin-card .download-links-heading { color: #5b496d; }
html[data-theme="light"] .admin-card .form-field label span:not(.platform-badge) { color: #c33f70; }
html[data-theme="light"] .admin-card .file-picker-label { color: #b23f70 !important; }
html[data-theme="light"] .admin-card .file-hint { color: #6f617c !important; }
html[data-theme="light"] .admin-card .publisher-note,
html[data-theme="light"] .admin-card .admin-hint { color: #756780; }
html[data-theme="light"] .metric, html[data-theme="light"] .catalog-section, html[data-theme="light"] .admin-card { background: linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(248, 237, 252, .62)); box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, .82); }
html[data-theme="light"] .metric-value { color: #312746; }
html[data-theme="light"] .game-card { border-color: rgba(93, 69, 126, .15); background: rgba(255, 255, 255, .5); box-shadow: inset 0 1px rgba(255, 255, 255, .75), 0 12px 32px rgba(93, 59, 105, .1); }
html[data-theme="light"] .game-card:hover { border-color: rgba(112, 100, 199, .44); background: rgba(255, 255, 255, .74); }
html[data-theme="light"] .metric-label, html[data-theme="light"] .metric-note, html[data-theme="light"] .game-meta, html[data-theme="light"] .game-description, html[data-theme="light"] .result-count { color: #706580; }
html[data-theme="light"] .search-box, html[data-theme="light"] .filter-group, html[data-theme="light"] .sort-select select, html[data-theme="light"] .form-field input, html[data-theme="light"] .form-field select, html[data-theme="light"] .form-field textarea, html[data-theme="light"] .file-picker-label, html[data-theme="light"] .icon-preview { border-color: rgba(93, 69, 126, .18); color: #332847; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .search-box input, html[data-theme="light"] .form-field input, html[data-theme="light"] .form-field select, html[data-theme="light"] .form-field textarea { color: #332847; }
html[data-theme="light"] .search-box input::placeholder, html[data-theme="light"] .form-field input::placeholder, html[data-theme="light"] .form-field textarea::placeholder { color: #9b8cab; }
html[data-theme="light"] .filter-button { color: #756a84; }
html[data-theme="light"] .filter-button.is-active { color: #fff; }
html[data-theme="light"] .download-link { border-color: rgba(93, 69, 126, .18); color: #47365c; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .download-menu-options { border-color: rgba(93, 69, 126, .18); background: rgba(255, 255, 255, .97); box-shadow: 0 18px 38px rgba(93, 59, 105, .2), inset 0 1px rgba(255, 255, 255, .9); }
html[data-theme="light"] .download-menu-option { color: #47365c; }
html[data-theme="light"] .download-menu-option:hover { color: #237c6d; background: rgba(75, 159, 145, .12); }
html[data-theme="light"] .download-menu-option .download-option-arrow { color: #887b95; }
html[data-theme="light"] .auth-dialog { border-color: rgba(255, 255, 255, .72); background: linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(239, 228, 249, .7)); box-shadow: 0 34px 100px rgba(80, 47, 95, .27), inset 0 1px rgba(255, 255, 255, .9); }
html[data-theme="light"] .auth-dialog h2 { color: #302441; }
html[data-theme="light"] .auth-subtitle, html[data-theme="light"] .auth-footnote { color: #786b89; }
html[data-theme="light"] .auth-tabs { background: rgba(112, 100, 199, .08); }
html[data-theme="light"] .auth-tab { color: #786b89; }
html[data-theme="light"] .auth-tab:hover { color: #3a2d4e; background: rgba(112, 100, 199, .1); }
html[data-theme="light"] .auth-close { color: #6f6180; background: rgba(112, 100, 199, .1); }
html[data-theme="light"] .account-popover { border-color: rgba(93, 69, 126, .18); background: linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(243, 231, 250, .97)); box-shadow: 0 22px 46px rgba(93, 59, 105, .2), inset 0 1px rgba(255, 255, 255, .9); }
html[data-theme="light"] .account-popover-head strong { color: #3b2c4d; }
html[data-theme="light"] .account-popover-head small { color: #887b95; }
html[data-theme="light"] .account-popover-rule { background: rgba(93, 69, 126, .12); }

/* Keep the user header aligned with the content column below it. */
body:not(.admin-page) .topbar-inner { width: min(calc(1080px - clamp(40px, 8vw, 128px)), calc(100% - clamp(40px, 8vw, 128px))); }

@keyframes navPulse { 0% { transform: scale(.96); } 55% { transform: scale(1.045); } 100% { transform: scale(1); } }
@keyframes sectionFocus { 0% { box-shadow: 0 0 0 0 rgba(139, 133, 233, .5), var(--shadow); } 45% { box-shadow: 0 0 0 7px rgba(139, 133, 233, .16), var(--shadow); } 100% { box-shadow: var(--shadow); } }
.nav-item.nav-pulse { animation: navPulse .46s cubic-bezier(.2, .8, .2, 1) both; }
.section-focus { animation: sectionFocus .72s ease both; }

/* Refresh now lives beside the page label in the header. */
.header-refresh-button { font-size: 17px; }
.header-refresh-button > span { display: grid; width: 100%; height: 100%; place-items: center; line-height: 1; transform: translateY(-1px); }
.header-refresh-button.is-loading { animation: spinRefresh .7s linear infinite; }
@keyframes spinRefresh { to { transform: rotate(360deg); } }

/* Make platform actions readable in both glass themes. */
.download-link { min-width: 55px; height: 34px; padding: 0 11px; border-radius: 8px; font-size: 11px; font-weight: 800; justify-content: center; }
.download-link.android-download { border-color: rgba(48, 176, 133, .45); color: #d8fff2; background: linear-gradient(135deg, rgba(28, 157, 119, .9), rgba(61, 190, 150, .78)); box-shadow: 0 7px 16px rgba(30, 157, 119, .2); }
.download-link.android-download:hover { border-color: rgba(155, 255, 222, .82); color: #fff; background: linear-gradient(135deg, #24a97e, #58cda6); }
.download-link.apple-download { border-color: rgba(219, 124, 174, .5); color: #fff0fb; background: linear-gradient(135deg, rgba(159, 87, 151, .9), rgba(211, 117, 168, .78)); box-shadow: 0 7px 16px rgba(171, 85, 155, .2); }
.download-link.apple-download:hover { border-color: rgba(255, 206, 237, .86); color: #fff; background: linear-gradient(135deg, #ad5f9d, #e28bb9); }
html[data-theme="light"] .platform-chip.android { color: #12664e; background: #bdeedf; border: 1px solid #73cdb0; }
html[data-theme="light"] .platform-chip.apple { color: #713968; background: #f2d4e8; border: 1px solid #d89ac4; }
html[data-theme="light"] .download-link.android-download { border-color: #43a987; color: #fff; background: linear-gradient(135deg, #218f70, #32b58a); box-shadow: 0 7px 16px rgba(33, 143, 112, .18); }
html[data-theme="light"] .download-link.apple-download { border-color: #bd6b9e; color: #fff; background: linear-gradient(135deg, #a05287, #cf6fa7); box-shadow: 0 7px 16px rgba(160, 82, 135, .18); }
html[data-theme="light"] .download-link.android-download:hover { background: linear-gradient(135deg, #187b60, #299c76); }
html[data-theme="light"] .download-link.apple-download:hover { background: linear-gradient(135deg, #87416f, #b95d91); }

/* The admin login is intentionally distraction-free; the header returns after authentication. */
.admin-page .topbar { max-height: 120px; overflow: visible; transition: max-height .46s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, transform .46s cubic-bezier(.2, .8, .2, 1), padding .46s cubic-bezier(.2, .8, .2, 1); }
.admin-page.admin-login-pending .topbar { max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-18px); animation: none; }
.admin-page.admin-login-pending .admin-shell { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: 32px; padding-bottom: 32px; }
.admin-page.admin-login-pending #login-view .admin-card-heading { position: relative; display: block; }
.admin-page.admin-login-pending #login-view .admin-card-heading > div { width: 100%; }
.admin-page.admin-login-pending #login-view #login-heading { text-align: center; }
.admin-page.admin-login-pending #login-view .admin-card-heading .publish-dot { position: absolute; top: 7px; right: 0; }
.admin-game-content { animation: pageRise .38s ease both; }
@keyframes adminSectionExit { from { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); } to { opacity: 0; transform: translate3d(0, -12px, 0) scale(.985); filter: blur(4px); } }
.admin-section-enter { opacity: 0; transform: translate3d(0, 18px, 0) scale(.985); filter: blur(5px); }
.admin-section-enter.admin-section-visible { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); transition: opacity .58s ease, transform .58s cubic-bezier(.2, .8, .2, 1), filter .58s ease; }
.admin-section-exit { pointer-events: none; animation: adminSectionExit .19s ease both; }
.admin-users { width: min(1080px, calc(100% + clamp(40px, 8vw, 128px))); margin: 0 auto 0 calc(-1 * clamp(20px, 4vw, 64px)); padding: 29px; }
.admin-users .admin-card-heading { align-items: center; }
.admin-users .admin-card-heading .button { min-height: 36px; padding: 0 13px; font-size: 11px; }
.admin-users-list { display: grid; gap: 10px; margin-top: 12px; }
.admin-comments-list { display: grid; gap: 10px; margin-top: 12px; }
.admin-comment-item { padding: 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 11px; background: rgba(28, 24, 39, .2); }
.admin-comment-item-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.admin-comment-item-heading strong { display: block; color: #fff7fb; font-size: 12px; }
.admin-comment-item-heading small { display: block; margin-top: 4px; color: rgba(255, 239, 249, .54); font-size: 10px; }
.admin-comment-item-heading time { flex: 0 0 auto; color: rgba(255, 239, 249, .5); font-size: 9px; }
.admin-comment-item p { margin: 10px 0 12px; color: rgba(255, 239, 249, .72); font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-comment-delete { min-height: 30px; padding: 0 10px; font-size: 10px; }
.admin-user-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 11px; background: rgba(28, 24, 39, .2); }
.admin-user-avatar { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #8d83e3, #df83b5); font-size: 11px; font-weight: 850; }
.admin-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-user-item strong { display: block; color: #fff7fb; font-size: 12px; }
.admin-user-item small { display: block; margin-top: 3px; color: rgba(255, 239, 249, .58); font-size: 10px; }
.admin-user-item time { color: rgba(255, 239, 249, .52); font-size: 10px; white-space: nowrap; }
.admin-users-empty { margin: 0; padding: 22px; border: 1px dashed rgba(255, 255, 255, .16); border-radius: 10px; color: rgba(255, 239, 249, .58); font-size: 11px; text-align: center; }
.admin-return-link { color: rgba(255, 247, 251, .82); text-decoration: none; }
.admin-profile-summary { display: grid; place-items: center; gap: 6px; padding: 0 34px 34px; text-align: center; }
.admin-profile-summary .profile-avatar-preview { margin: 0 0 8px; }
.admin-profile-summary strong { color: #fff7fb; font-size: 15px; }
.admin-profile-summary small { color: rgba(255, 239, 249, .6); font-size: 11px; }
.admin-profile-dialog .profile-details dd input { width: 100%; min-width: 0; height: 28px; margin: -8px 0; padding: 0 7px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 7px; outline: 0; color: #fff7fb; background: rgba(33, 29, 42, .3); font-size: 11px; font-weight: 700; transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.admin-profile-dialog .profile-details dd input:focus { border-color: rgba(164, 152, 243, .7); background: rgba(33, 29, 42, .55); box-shadow: 0 0 0 3px rgba(139, 133, 233, .13); }
html[data-theme="light"] .admin-user-item { border-color: rgba(93, 69, 126, .14); background: rgba(255, 255, 255, .32); }
html[data-theme="light"] .admin-comment-item { border-color: rgba(93, 69, 126, .14); background: rgba(255, 255, 255, .32); }
html[data-theme="light"] .admin-comment-item-heading strong { color: #3c2d4c; }
html[data-theme="light"] .admin-comment-item-heading small, html[data-theme="light"] .admin-comment-item-heading time, html[data-theme="light"] .admin-comment-item p { color: #887b95; }
html[data-theme="light"] .admin-user-item strong { color: #3c2d4c; }
html[data-theme="light"] .admin-user-item small, html[data-theme="light"] .admin-user-item time, html[data-theme="light"] .admin-users-empty, html[data-theme="light"] .admin-profile-summary small { color: #887b95; }
html[data-theme="light"] .admin-profile-summary strong { color: #3b2c4d; }
html[data-theme="light"] .admin-profile-dialog .profile-details dd input { border-color: rgba(93, 69, 126, .18); color: #332847; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .admin-profile-dialog .form-field label { color: #5b496d; }

/* Rich content tools, media previews and compact pagination. */
.rich-toolbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.rich-file-input { position: fixed; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.rich-editor { position: relative; display: block; width: 100%; min-height: 76px; max-height: 260px; overflow-y: auto; resize: vertical; padding: 10px 11px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; outline: 0; color: #fff7fb; background: rgba(33, 29, 42, .38); font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.rich-editor + textarea[hidden] { display: none !important; }
.rich-editor:empty::before { content: attr(data-placeholder); color: rgba(255, 239, 249, .45); pointer-events: none; }
.rich-editor:focus { border-color: rgba(164, 152, 243, .7); background: rgba(33, 29, 42, .55); box-shadow: 0 0 0 4px rgba(139, 133, 233, .13); }
.rich-editor-description { min-height: 108px; }
.rich-tool-button { min-height: 28px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: rgba(255, 255, 255, .08); font-size: 10px; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.rich-tool-button:hover { color: var(--ink); border-color: rgba(139, 133, 233, .55); background: rgba(139, 133, 233, .12); transform: translateY(-1px); }
.emoji-panel { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 40; display: grid; grid-template-columns: repeat(auto-fill, 30px); grid-auto-rows: 30px; justify-content: start; gap: 3px; width: min(360px, calc(100vw - 32px)); max-height: 300px; overflow-y: auto; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel, rgba(255, 255, 255, .94)); box-shadow: 0 16px 34px rgba(30, 17, 48, .2); animation: emojiPanelExpand .25s cubic-bezier(.2, .8, .2, 1) both; scrollbar-width: thin; }
.emoji-panel[hidden] { display: none; }
.emoji-panel button { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 6px; background: transparent; line-height: 1; cursor: pointer; transition: background .16s ease, transform .16s ease; }
.emoji-panel button img { display: block; width: 26px; height: 26px; object-fit: contain; }
.emoji-panel button:hover { background: rgba(139, 133, 233, .18); transform: scale(1.12); }
.qq-emoji-group-title { grid-column: 1 / -1; min-height: 18px; padding: 2px 3px 0; color: var(--muted); font-size: 10px; font-weight: 800; line-height: 16px; }
.emoji-panel.is-closing { pointer-events: none; animation: emojiPanelCollapse .2s cubic-bezier(.4, 0, .8, .2) both; transform-origin: bottom center; }
@keyframes emojiPanelExpand { from { opacity: 0; max-height: 40px; transform: translateY(-5px) scaleY(.8); transform-origin: top center; } to { opacity: 1; max-height: 300px; transform: translateY(0) scaleY(1); } }
@keyframes emojiPanelCollapse { from { opacity: 1; max-height: 300px; transform: translateY(0) scaleY(1); } to { opacity: 0; max-height: 40px; transform: translateY(-5px) scaleY(.8); } }
.qq-emoji-inline { display: inline-block; width: 1.35em; height: 1.35em; margin: 0 .08em; vertical-align: -.28em; object-fit: contain; }
.rich-media-preview { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; margin-top: 7px; }
.rich-media-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid rgba(139, 133, 233, .35); border-radius: 999px; color: var(--muted); background: rgba(139, 133, 233, .1); font-size: 10px; }
.rich-media-chip button { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; color: inherit; background: transparent; cursor: pointer; }
.rich-content-media, .rich-content-media-list { display: grid; gap: 7px; margin-top: 8px; }
.rich-content-media img, .rich-content-media video, .rich-content-media-list img, .rich-content-media-list video { display: block; width: min(100%, 430px); max-height: 300px; border-radius: 9px; object-fit: contain; background: rgba(0, 0, 0, .12); }
.game-card-version { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.game-publish-date { color: var(--muted); font-size: 9px; white-space: nowrap; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 18px; }
.pagination:empty { display: none; }
.pagination-button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: rgba(255, 255, 255, .08); font-size: 10px; cursor: pointer; transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease; }
.pagination-button:hover:not(:disabled) { color: var(--ink); border-color: rgba(139, 133, 233, .55); transform: translateY(-1px); }
.pagination-button.is-active { color: #fff; border-color: transparent; background: linear-gradient(120deg, #837de2, #bd88df); }
.pagination-button:disabled { opacity: .42; cursor: not-allowed; }
.admin-list-tools { display: grid; grid-template-columns: minmax(0, 1fr) 145px; gap: 9px; margin: 4px 0 12px; }
.admin-list-search { min-height: 38px; height: 38px; }
.admin-list-filter { min-width: 0; height: 38px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: rgba(255, 255, 255, .08); font-size: 11px; }
.icon-preview-default { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border-radius: 6px; color: #fff; background: linear-gradient(145deg, #827ce1, #c376a8); font-size: 9px; font-weight: 850; }
.icon-preview.has-image .icon-preview-default { display: none; }
@keyframes toastFloatOut { from { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); filter: blur(0); } to { opacity: 0; transform: translate3d(-50%, -22px, 0) scale(.94); filter: blur(4px); } }
.toast.is-closing { animation: toastFloatOut .34s ease both; pointer-events: none; }

@media (max-width: 600px) {
  .admin-list-tools { grid-template-columns: 1fr; }
  .game-card-version { align-items: flex-end; flex-direction: column; gap: 2px; }
}

/* Atmospheric confirmation dialog for destructive administrator actions. */
.admin-confirm-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.admin-confirm-modal[hidden] { display: none; }
.admin-confirm-modal.is-open { opacity: 1; pointer-events: auto; }
.admin-confirm-backdrop { position: absolute; inset: 0; background: rgba(19, 12, 29, .62); backdrop-filter: blur(15px) saturate(125%); -webkit-backdrop-filter: blur(15px) saturate(125%); }
.admin-confirm-dialog { position: relative; display: grid; justify-items: center; width: min(410px, 100%); padding: 30px 30px 25px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 22px; color: #fff7fb; background: linear-gradient(145deg, rgba(79, 65, 94, .94), rgba(39, 33, 54, .95)); box-shadow: 0 35px 100px rgba(15, 8, 25, .52), inset 0 1px rgba(255, 255, 255, .22); opacity: 0; transform: translateY(-22px) scale(.92) rotateX(-4deg); filter: blur(5px); transition: opacity .42s ease, transform .55s cubic-bezier(.2, .8, .2, 1), filter .42s ease; backdrop-filter: blur(28px) saturate(145%); -webkit-backdrop-filter: blur(28px) saturate(145%); }
.admin-confirm-modal.is-open .admin-confirm-dialog { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
.admin-confirm-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 13px; border: 1px solid rgba(255, 185, 205, .5); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #df6e9d, #9f72dc); box-shadow: 0 10px 28px rgba(206, 93, 150, .3), inset 0 1px rgba(255, 255, 255, .32); font-size: 21px; font-weight: 850; animation: confirmIconPulse 2.2s ease-in-out infinite; }
@keyframes confirmIconPulse { 0%, 100% { box-shadow: 0 10px 28px rgba(206, 93, 150, .3), inset 0 1px rgba(255, 255, 255, .32); } 50% { box-shadow: 0 10px 28px rgba(206, 93, 150, .3), 0 0 0 7px rgba(224, 119, 170, .1), inset 0 1px rgba(255, 255, 255, .32); } }
.admin-confirm-dialog .section-kicker { margin-bottom: 5px; color: #efacd0; }
.admin-confirm-dialog h2 { margin: 0 0 9px; color: #fff; font-size: 20px; text-align: center; }
.admin-confirm-message { max-width: 315px; margin: 0; color: rgba(255, 239, 249, .68); font-size: 12px; line-height: 1.7; text-align: center; }
.admin-confirm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; width: 100%; margin-top: 23px; }
.admin-confirm-actions .button { min-height: 40px; font-size: 11px; }
html[data-theme="light"] .admin-confirm-backdrop { background: rgba(60, 42, 74, .42); }
html[data-theme="light"] .admin-confirm-dialog { border-color: rgba(255, 255, 255, .8); color: #332847; background: linear-gradient(145deg, rgba(255, 255, 255, .94), rgba(240, 228, 249, .93)); box-shadow: 0 35px 100px rgba(93, 59, 105, .24), inset 0 1px rgba(255, 255, 255, .95); }
html[data-theme="light"] .admin-confirm-dialog h2 { color: #302441; }
html[data-theme="light"] .admin-confirm-dialog .section-kicker { color: #a44d78; }
html[data-theme="light"] .admin-confirm-message { color: #756780; }

/* Compact glass toast shared by login, publishing and realtime updates. */
@keyframes toastFloatIn { 0% { opacity: 0; transform: translate3d(-50%, -16px, 0) scale(.9); filter: blur(4px); } 62% { opacity: 1; transform: translate3d(-50%, 3px, 0) scale(1.015); filter: blur(0); } 100% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); filter: blur(0); } }
.toast { top: 14px; right: auto; bottom: auto; left: 50%; z-index: 80; display: flex; align-items: center; gap: 10px; min-width: 222px; max-width: min(340px, calc(100vw - 40px)); padding: 10px 15px 10px 10px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 14px; color: #fff7fb; background: linear-gradient(135deg, rgba(82, 69, 105, .9), rgba(46, 39, 64, .92)); box-shadow: 0 20px 42px rgba(31, 16, 44, .32), inset 0 1px rgba(255, 255, 255, .23); backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); opacity: 0; pointer-events: none; transform: translate3d(-50%, -12px, 0) scale(.94); transition: opacity .24s ease, transform .24s cubic-bezier(.2, .8, .2, 1); }
.toast::before { width: 3px; align-self: stretch; border-radius: 999px; content: ""; background: linear-gradient(180deg, #a79df2, #e98ab1); box-shadow: 0 0 13px rgba(167, 157, 242, .55); }
.toast-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 auto; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #7f78dc, #bd88df); font-size: 13px; font-weight: 850; box-shadow: inset 0 1px rgba(255, 255, 255, .28), 0 5px 13px rgba(89, 75, 174, .3); }
.toast-message { overflow: hidden; font-size: 12px; font-weight: 750; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.toast-progress { position: absolute; right: 10px; bottom: 5px; left: 10px; height: 2px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .14); }
.toast-progress::after { display: block; width: 100%; height: 100%; content: ""; border-radius: inherit; background: linear-gradient(90deg, #a79df2, #e98ab1); transform-origin: left center; transform: scaleX(0); }
.toast.is-visible .toast-progress::after { animation: toastProgress var(--toast-duration, 3500ms) linear both; }
@keyframes toastProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.toast.is-visible { opacity: 1; pointer-events: auto; transform: translate3d(-50%, 0, 0) scale(1); animation: toastFloatIn .48s cubic-bezier(.2, .8, .2, 1) both; }
.toast.is-error::before { background: linear-gradient(180deg, #ffb3bf, #ef6f8d); box-shadow: 0 0 13px rgba(239, 111, 141, .5); }
.toast.is-error .toast-icon { background: linear-gradient(145deg, #e5739a, #bd557c); }
html[data-theme="light"] .toast { border-color: rgba(93, 69, 126, .2); color: #3a2b4e; background: linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(246, 232, 252, .96)); box-shadow: 0 20px 42px rgba(93, 59, 105, .2), inset 0 1px rgba(255, 255, 255, .95); }
html[data-theme="light"] .toast-message { color: #3a2b4e; }
html[data-theme="light"] .toast-progress { background: rgba(93, 69, 126, .12); }
html[data-theme="light"] .toast-progress::after { background: linear-gradient(90deg, #7e70d6, #ce6fa4); }
html[data-theme="light"] .version-tag { color: #5848a7; border: 1px solid #c1b7f1; background: #e1dcff; box-shadow: 0 3px 8px rgba(88, 72, 167, .12); }
html:not([data-theme="light"]) .version-tag { color: #f4efff; border: 1px solid rgba(202, 194, 255, .32); background: rgba(139, 133, 233, .42); }

@media (max-width: 520px) {
  .toast { top: 10px; right: auto; left: 50%; min-width: 0; width: calc(100vw - 32px); }
}

/* Registration-only fields and directional sliding between login and register. */
.verification-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: stretch; }
.verification-row input { min-width: 0; }
.code-button { min-width: 92px; padding: 0 11px; border: 1px solid rgba(139, 133, 233, .5); border-radius: 8px; color: #fff; background: linear-gradient(120deg, #827be0, #a08de8); font-size: 11px; font-weight: 800; box-shadow: 0 7px 16px rgba(103, 88, 195, .22); transition: transform .22s ease, filter .22s ease, opacity .22s ease; }
.code-button:hover { filter: brightness(1.1); transform: translateY(-1px); }
.code-button:disabled { cursor: wait; opacity: .62; transform: none; }
.field-hint { display: block; margin-top: 6px; color: rgba(255, 239, 249, .56); font-size: 10px; line-height: 1.4; }
@keyframes authSlideForward { from { opacity: .28; transform: translateX(42px) scale(.985); filter: blur(3px); } 58% { opacity: 1; transform: translateX(-5px) scale(1.005); filter: blur(0); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes authSlideBack { from { opacity: .28; transform: translateX(-42px) scale(.985); filter: blur(3px); } 58% { opacity: 1; transform: translateX(5px) scale(1.005); filter: blur(0); } to { opacity: 1; transform: translateX(0) scale(1); } }
.auth-dialog.auth-mode-forward .auth-dialog-content { animation: authSlideForward .5s cubic-bezier(.2, .8, .2, 1) both; }
.auth-dialog.auth-mode-back .auth-dialog-content { animation: authSlideBack .5s cubic-bezier(.2, .8, .2, 1) both; }
html[data-theme="light"] .code-button { border-color: #7569d2; background: linear-gradient(120deg, #7165cf, #9079dd); }
html[data-theme="light"] .field-hint { color: #887b95; }
html[data-theme="light"] .auth-footnote { color: #776a88; }
.auth-dialog { max-height: calc(100vh - 28px); overflow-y: auto; scrollbar-width: none; }
.auth-dialog::-webkit-scrollbar { display: none; }

/* Centered custom catalog dropdowns without native selection gutters. */
.custom-select { position: relative; min-width: 110px; height: 40px; }
.custom-select.is-open { z-index: 30; }
.custom-select-trigger { display: grid; grid-template-columns: minmax(0, 1fr) 12px; align-items: center; width: 100%; height: 40px; padding: 0 12px 0 24px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; outline: 0; color: rgba(255, 239, 249, .78); background: rgba(33, 29, 42, .36); box-shadow: inset 0 1px rgba(255, 255, 255, .05); font: inherit; font-size: 12px; cursor: pointer; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: border-color .25s ease, background .25s ease, box-shadow .25s ease; }
.custom-select-trigger:focus-visible, .custom-select.is-open .custom-select-trigger { border-color: rgba(164, 152, 243, .68); box-shadow: 0 0 0 4px rgba(139, 133, 233, .14), inset 0 1px rgba(255, 255, 255, .09); }
.custom-select-value { overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-chevron { justify-self: end; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; opacity: .72; transform: translateY(-2px) rotate(45deg); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.custom-select.is-open .custom-select-chevron { transform: translateY(2px) rotate(225deg); }
.custom-select-menu { position: absolute; top: calc(100% + 5px); left: 0; width: 100%; overflow: hidden; padding: 4px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 8px; background: rgba(42, 35, 51, .92); box-shadow: 0 16px 35px rgba(25, 13, 35, .3), inset 0 1px rgba(255, 255, 255, .14); opacity: 0; transform: translateY(-7px) scale(.97); transform-origin: top center; pointer-events: none; backdrop-filter: blur(24px) saturate(145%); -webkit-backdrop-filter: blur(24px) saturate(145%); transition: opacity .18s ease, transform .26s cubic-bezier(.2, .8, .2, 1); }
.custom-select.is-open .custom-select-menu { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.custom-select-menu button { display: block; width: 100%; min-height: 30px; padding: 0 4px; border: 0; border-radius: 5px; outline: 0; color: rgba(255, 245, 251, .82); background: transparent; font: inherit; font-size: 12px; text-align: center; cursor: pointer; transition: color .18s ease, background .18s ease, transform .18s ease; }
.custom-select-menu button:hover, .custom-select-menu button:focus-visible { color: #fff; background: rgba(255, 255, 255, .1); }
.custom-select-menu button[aria-selected="true"] { color: #fff; background: linear-gradient(120deg, #837de2, #948be8); box-shadow: 0 5px 12px rgba(83, 72, 177, .25); }
html[data-theme="light"] .custom-select-trigger { border-color: rgba(93, 69, 126, .18); color: #332847; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .custom-select-menu { border-color: rgba(93, 69, 126, .2); background: rgba(255, 250, 253, .95); box-shadow: 0 16px 35px rgba(93, 59, 105, .18), inset 0 1px rgba(255, 255, 255, .9); }
html[data-theme="light"] .custom-select-menu button { color: #4f4260; }
html[data-theme="light"] .custom-select-menu button:hover, html[data-theme="light"] .custom-select-menu button:focus-visible { color: #302542; background: rgba(112, 100, 199, .11); }
html[data-theme="light"] .custom-select-menu button[aria-selected="true"] { color: #fff; background: linear-gradient(120deg, #786fd6, #8f83df); }

@media (max-width: 680px) {
  .custom-select { width: 100%; }
  .page-intro { width: 100%; align-items: center; text-align: center; }
  .page-intro > div { width: 100%; }
  .page-intro .intro-copy { margin-right: auto; margin-left: auto; }
}

/* Personal profile and verified password update. */
.profile-dialog { position: relative; width: min(780px, 100%); max-height: calc(100vh - 28px); overflow: auto; border: 1px solid rgba(255, 255, 255, .25); border-radius: 22px; color: #fff7fb; background: linear-gradient(145deg, rgba(75, 65, 85, .82), rgba(38, 35, 52, .78)); box-shadow: 0 36px 110px rgba(15, 8, 25, .52), inset 0 1px rgba(255, 255, 255, .2); opacity: 0; transform: translateY(-22px) scale(.965); transition: opacity .32s ease, transform .44s cubic-bezier(.2, .8, .2, 1); backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%); scrollbar-width: none; }
.profile-dialog::-webkit-scrollbar { display: none; }
.profile-modal.is-open .profile-dialog { opacity: 1; transform: translateY(0) scale(1); }
.profile-header { padding: 28px 31px 20px; border-bottom: 1px solid rgba(255, 255, 255, .13); }
.profile-header h2 { margin: 2px 0 6px; color: #fff; font-size: 26px; }
.profile-header p:last-child { margin: 0; color: rgba(255, 239, 249, .62); font-size: 12px; }
.profile-layout { display: grid; grid-template-columns: minmax(235px, .78fr) minmax(0, 1.35fr); }
.profile-identity, .profile-security { padding: 27px 31px 30px; }
.profile-identity { border-right: 1px solid rgba(255, 255, 255, .13); }
.profile-identity h3, .profile-security h3 { margin: 0 0 18px; color: #fff; font-size: 16px; }
.profile-avatar-preview { display: grid; place-items: center; width: 92px; height: 92px; margin: 0 auto 22px; overflow: hidden; border: 3px solid rgba(255, 255, 255, .48); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #8d83e3, #df83b5); box-shadow: 0 15px 34px rgba(52, 35, 104, .34), inset 0 1px rgba(255, 255, 255, .3); font-size: 22px; font-weight: 850; }
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-details { margin: 0 0 20px; }
.profile-details div { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 9px; padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.profile-details dt { color: rgba(255, 239, 249, .52); font-size: 10px; }
.profile-details dd { overflow: hidden; margin: 0; color: rgba(255, 250, 253, .9); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-nickname-row dd { overflow: visible; }
.profile-nickname-row input { width: 100%; min-width: 0; height: 28px; margin: -8px 0; padding: 0 7px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 7px; outline: 0; color: #fff7fb; background: rgba(33, 29, 42, .3); font-size: 11px; font-weight: 700; transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.profile-nickname-row input:focus { border-color: rgba(164, 152, 243, .7); background: rgba(33, 29, 42, .55); box-shadow: 0 0 0 3px rgba(139, 133, 233, .13); }
.profile-nickname-row input:disabled { cursor: not-allowed; opacity: .62; }
.nickname-change-hint { display: block; margin: -10px 0 18px; color: rgba(255, 239, 249, .5); font-size: 9px; line-height: 1.5; }
.profile-avatar-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.profile-avatar-actions .profile-action-button:first-child { grid-column: 1 / -1; }
.profile-action-button { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 36px; padding: 0 10px; border-radius: 8px; font-size: 10px; }
.profile-message { margin-top: 11px; }
.profile-section-heading { margin-bottom: 18px; }
.profile-section-heading h3 { margin-bottom: 5px; }
.profile-section-heading p { margin: 0; color: rgba(255, 239, 249, .56); font-size: 10px; line-height: 1.5; }
.profile-security .form-field { margin-bottom: 13px; }
.profile-security .button-primary { min-height: 43px; }
.profile-dialog button:disabled, .profile-dialog label[aria-disabled="true"] { cursor: not-allowed; opacity: .48; }
html[data-theme="light"] .profile-dialog { border-color: rgba(255, 255, 255, .78); color: #332847; background: linear-gradient(145deg, rgba(255, 255, 255, .8), rgba(239, 228, 249, .74)); box-shadow: 0 36px 110px rgba(80, 47, 95, .28), inset 0 1px rgba(255, 255, 255, .94); }
html[data-theme="light"] .profile-header, html[data-theme="light"] .profile-identity { border-color: rgba(93, 69, 126, .14); }
html[data-theme="light"] .profile-header h2, html[data-theme="light"] .profile-identity h3, html[data-theme="light"] .profile-security h3 { color: #302441; }
html[data-theme="light"] .profile-header p:last-child, html[data-theme="light"] .profile-section-heading p, html[data-theme="light"] .profile-details dt { color: #7f718e; }
html[data-theme="light"] .profile-details div { border-color: rgba(93, 69, 126, .12); }
html[data-theme="light"] .profile-details dd { color: #433451; }
html[data-theme="light"] .profile-nickname-row input { border-color: rgba(93, 69, 126, .18); color: #332847; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .nickname-change-hint { color: #887b95; }
html[data-theme="light"] .account-menu-button { color: #5b496d; }
html[data-theme="light"] .account-menu-button:hover { color: #392b4b; border-color: rgba(112, 100, 199, .2); background: rgba(112, 100, 199, .1); }
html[data-theme="light"] .account-logout { color: #a64f72; }

@media (max-width: 720px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-identity { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .13); }
  .profile-header, .profile-identity, .profile-security { padding-right: 22px; padding-left: 22px; }
}

/* Game details and community comments. */
.game-card { cursor: pointer; }
.game-card:focus-visible { outline: 3px solid rgba(139, 133, 233, .55); outline-offset: 3px; }
.game-detail-modal { z-index: 55; }
.game-detail-dialog { position: relative; display: flex; width: min(820px, 100%); max-height: calc(100vh - 28px); overflow: hidden; flex-direction: column; border: 1px solid rgba(255, 255, 255, .28); border-radius: 22px; color: #fff7fb; background: linear-gradient(145deg, rgba(75, 65, 85, .88), rgba(38, 35, 52, .86)); box-shadow: 0 36px 110px rgba(15, 8, 25, .52), inset 0 1px rgba(255, 255, 255, .2); opacity: 0; transform: translateY(-22px) scale(.965); transition: opacity .32s ease, transform .44s cubic-bezier(.2, .8, .2, 1); backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%); }
.game-detail-modal.is-open .game-detail-dialog { opacity: 1; transform: translateY(0) scale(1); }
.game-detail-header { display: flex; align-items: center; gap: 16px; padding: 29px 31px 22px; border-bottom: 1px solid rgba(255, 255, 255, .13); }
.game-detail-icon { display: grid; place-items: center; width: 78px; height: 78px; flex: 0 0 auto; overflow: hidden; border: 2px solid rgba(255, 255, 255, .38); border-radius: 18px; color: #fff; background: linear-gradient(145deg, #8d83e3, #df83b5); box-shadow: 0 14px 28px rgba(52, 35, 104, .3), inset 0 1px rgba(255, 255, 255, .3); font-size: 20px; font-weight: 850; }
.game-detail-icon img { width: 100%; height: 100%; object-fit: cover; }
.game-detail-heading { min-width: 0; flex: 1; }
.game-detail-heading .section-kicker { margin-bottom: 4px; }
.game-detail-heading h2 { overflow: hidden; margin: 0 0 5px; color: #fff; font-size: clamp(22px, 3vw, 30px); text-overflow: ellipsis; white-space: nowrap; }
.game-detail-subtitle { margin: 0; color: rgba(255, 239, 249, .62); font-size: 11px; }
.game-detail-header > .version-tag { align-self: start; margin-top: 4px; margin-right: 28px; }
.game-detail-content { overflow-y: auto; padding: 24px 31px 31px; scrollbar-width: none; }
.game-detail-content::-webkit-scrollbar { display: none; }
.game-detail-description { margin: 0; color: rgba(255, 244, 250, .82); font-size: 13px; line-height: 1.8; white-space: pre-wrap; }
.game-detail-platforms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.game-detail-platforms .download-link { min-height: 35px; padding: 0 13px; border: 0; border-radius: 9px; color: #fff; font-size: 11px; font-weight: 750; box-shadow: 0 8px 18px rgba(25, 18, 38, .2); }
.game-detail-platforms .android-download { background: linear-gradient(120deg, #159d85, #35b898); }
.game-detail-platforms .apple-download { background: linear-gradient(120deg, #b45491, #d16bab); }
.game-comments { margin-top: 25px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .13); }
.game-comments-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.game-comments-heading .section-kicker { margin: 0 0 3px; }
.game-comments-heading h3 { margin: 0; color: #fff; font-size: 18px; }
.game-comments-count { color: rgba(255, 239, 249, .56); font-size: 10px; }
.game-comments-list { display: grid; gap: 9px; }
.game-comments-list.is-scrollable { max-height: 240px; overflow-y: auto; padding-right: 4px; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: thin; }
.game-comment { display: flex; min-height: 68px; gap: 10px; padding: 12px 13px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 11px; background: rgba(28, 24, 39, .22); animation: commentRise .34s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes commentRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.game-comment-avatar { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgba(255, 255, 255, .35); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #827ce1, #c376a8); font-size: 10px; font-weight: 800; }
.game-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.game-comment-main { min-width: 0; flex: 1; }
.game-comment-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.game-comment-heading strong { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.game-comment-meta { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.game-comment-heading time { flex: 0 0 auto; color: rgba(255, 239, 249, .45); font-size: 9px; }
.game-comment-delete { padding: 0; border: 0; color: rgba(255, 185, 205, .8); background: transparent; font-size: 9px; cursor: pointer; transition: color .2s ease, transform .2s ease; }
.game-comment-delete:hover { color: #ffb2ca; transform: translateY(-1px); }
.game-comment-main p { margin: 5px 0 0; color: rgba(255, 244, 250, .72); font-size: 11px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.game-comments-empty { padding: 18px 12px; border: 1px dashed rgba(255, 255, 255, .16); border-radius: 10px; color: rgba(255, 239, 249, .5); font-size: 11px; text-align: center; }
.game-comments-empty[hidden] { display: none; }
.game-comment-form { margin-top: 15px; padding: 14px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 11px; background: rgba(28, 24, 39, .18); }
.game-comment-form > label { display: block; margin-bottom: 8px; color: rgba(255, 239, 249, .72); font-size: 10px; font-weight: 750; }
.game-comment-form textarea { display: block; width: 100%; min-height: 76px; resize: vertical; padding: 10px 11px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; outline: 0; color: #fff7fb; background: rgba(33, 29, 42, .38); font-size: 11px; line-height: 1.6; transition: border-color .25s ease, box-shadow .25s ease, background .25s ease; }
.game-comment-form textarea:focus { border-color: rgba(164, 152, 243, .7); background: rgba(33, 29, 42, .55); box-shadow: 0 0 0 4px rgba(139, 133, 233, .13); }
.game-comment-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.game-comment-hint { color: rgba(255, 239, 249, .48); font-size: 9px; }
.game-comment-form .button { min-height: 34px; padding: 0 13px; border-radius: 8px; font-size: 10px; }
.game-comment-message { min-height: 0; margin-top: 7px; }
html[data-theme="light"] .game-detail-dialog { border-color: rgba(255, 255, 255, .82); color: #332847; background: linear-gradient(145deg, rgba(255, 255, 255, .86), rgba(239, 228, 249, .8)); box-shadow: 0 36px 110px rgba(80, 47, 95, .28), inset 0 1px rgba(255, 255, 255, .94); }
html[data-theme="light"] .game-detail-header, html[data-theme="light"] .game-comments { border-color: rgba(93, 69, 126, .14); }
html[data-theme="light"] .game-detail-heading h2, html[data-theme="light"] .game-comments-heading h3 { color: #302441; }
html[data-theme="light"] .game-detail-subtitle, html[data-theme="light"] .game-comments-count { color: #7f718e; }
html[data-theme="light"] .game-detail-description { color: #51445e; }
html[data-theme="light"] .game-comment, html[data-theme="light"] .game-comment-form { border-color: rgba(93, 69, 126, .14); background: rgba(255, 255, 255, .34); }
html[data-theme="light"] .game-comment-heading strong { color: #433451; }
html[data-theme="light"] .game-comment-heading time, html[data-theme="light"] .game-comment-main p, html[data-theme="light"] .game-comment-hint { color: #887b95; }
html[data-theme="light"] .game-comment-delete { color: #a9587a; }
html[data-theme="light"] .game-comments-empty { border-color: rgba(93, 69, 126, .18); color: #887b95; }
html[data-theme="light"] .game-comment-form > label { color: #6f6180; }
html[data-theme="light"] .game-comment-form textarea { border-color: rgba(93, 69, 126, .18); color: #332847; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .rich-editor { border-color: rgba(93, 69, 126, .18); color: #332847; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .rich-editor:empty::before { color: rgba(91, 73, 109, .5); }

@media (max-width: 560px) {
  .game-detail-header { align-items: start; padding: 24px 20px 18px; gap: 11px; }
  .game-detail-icon { width: 60px; height: 60px; border-radius: 14px; }
  .game-detail-heading h2 { font-size: 21px; }
  .game-detail-content { padding: 19px 20px 23px; }
  .game-comment-form-footer { align-items: stretch; flex-direction: column; }
  .game-comment-form .button { width: 100%; }
}

/* Standalone game details keep the shared detail markup but remove the modal presentation. */
body.game-detail-page { min-height: 100vh; overflow-x: hidden; }
body.game-detail-page .shell { display: none; }
body.game-detail-page .game-detail-modal { position: relative; inset: auto; display: grid; min-height: calc(100vh - 82px); padding: 28px; opacity: 1; pointer-events: auto; }
body.game-detail-page .game-detail-modal .auth-backdrop { display: none; }
body.game-detail-page .game-detail-dialog { width: min(900px, 100%); max-height: none; opacity: 1; transform: none; }
body.game-detail-page .game-detail-content { overflow: visible; }
body.game-detail-page .game-detail-header { padding-top: 34px; }

@media (max-width: 560px) {
  body.game-detail-page .game-detail-modal { min-height: calc(100vh - 68px); padding: 14px; }
  body.game-detail-page .game-detail-header { padding-top: 24px; }
}

/* Announcement floating window and administrator editor. */
.announcement-modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .34s ease; }
.announcement-modal[hidden] { display: none; }
.announcement-modal.is-visible { opacity: 1; pointer-events: auto; }
.announcement-modal::before { position: absolute; inset: 0; content: ""; background: rgba(20, 12, 30, .3); backdrop-filter: blur(9px) saturate(120%); -webkit-backdrop-filter: blur(9px) saturate(120%); }
.announcement-dialog { position: relative; z-index: 1; width: min(720px, 100%); max-height: min(68vh, 620px); overflow: auto; padding: 23px 24px 18px; border: 1px solid rgba(255, 255, 255, .38); border-radius: 16px; color: #fff7fb; background: linear-gradient(145deg, rgba(71, 57, 78, .91), rgba(39, 34, 52, .9)); box-shadow: 0 24px 70px rgba(18, 9, 27, .42), inset 0 1px rgba(255, 255, 255, .22); transform: translateY(20px) scale(.97); backdrop-filter: blur(28px) saturate(145%); -webkit-backdrop-filter: blur(28px) saturate(145%); transition: transform .4s cubic-bezier(.2, .8, .2, 1); scrollbar-width: none; }
.announcement-dialog::-webkit-scrollbar { display: none; }
.announcement-modal.is-visible .announcement-dialog { transform: translateY(0) scale(1); }
.announcement-modal.is-opening .announcement-dialog { animation: announcementModalIn .62s cubic-bezier(.2, .8, .2, 1) both; }
.announcement-modal.is-closing .announcement-dialog { animation: announcementModalOut .4s cubic-bezier(.4, 0, .6, 1) both; }
.announcement-dialog.is-changing { animation: announcementChange .32s ease both; }
@keyframes announcementModalIn { from { opacity: 0; transform: translateY(30px) scale(.91) rotateX(5deg); filter: blur(7px); } 65% { opacity: 1; transform: translateY(-3px) scale(1.01) rotateX(0); filter: blur(0); } to { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); } }
@keyframes announcementModalOut { from { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } to { opacity: 0; transform: translateY(-20px) scale(.94); filter: blur(5px); } }
@keyframes announcementChange { from { opacity: .18; transform: translate3d(24px, 7px, 0) scale(.97); filter: blur(5px); } 58% { opacity: 1; transform: translate3d(-4px, 0, 0) scale(1.01); filter: blur(0); } to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); } }
.announcement-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.announcement-kicker { color: #efacd0; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.announcement-count { color: rgba(255, 239, 249, .58); font-size: 10px; }
.announcement-dialog h2 { margin: 0 0 15px; color: #fff; font-size: clamp(18px, 2vw, 24px); line-height: 1.35; }
.announcement-content { overflow: auto; max-height: min(43vh, 390px); color: rgba(255, 244, 250, .82); font-size: 13px; line-height: 1.8; white-space: pre-wrap; scrollbar-width: none; }
.announcement-content::-webkit-scrollbar { display: none; }
.announcement-media { display: grid; gap: 10px; margin-top: 16px; }
.announcement-media[hidden] { display: none; }
.announcement-media img, .announcement-media video { display: block; width: 100%; max-height: min(36vh, 320px); border: 1px solid rgba(255, 255, 255, .16); border-radius: 10px; background: rgba(16, 12, 24, .28); object-fit: contain; }
.announcement-media video { min-height: 120px; }
.announcement-footer { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, .12); }
.announcement-date { color: rgba(255, 239, 249, .58); font-size: 10px; }
.announcement-action { width: auto; min-width: 96px; min-height: 38px; padding: 0 15px; border-radius: 9px; font-size: 11px; }
html[data-theme="light"] .announcement-modal::before { background: rgba(87, 62, 103, .2); }
html[data-theme="light"] .announcement-dialog { border-color: rgba(255, 255, 255, .82); color: #332847; background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(241, 229, 249, .9)); box-shadow: 0 24px 70px rgba(93, 59, 105, .24), inset 0 1px rgba(255, 255, 255, .96); }
html[data-theme="light"] .announcement-kicker { color: #9b70b8; }
html[data-theme="light"] .announcement-count, html[data-theme="light"] .announcement-date { color: #887b95; }
html[data-theme="light"] .announcement-dialog h2 { color: #302441; }
html[data-theme="light"] .announcement-content { color: #51445e; }
html[data-theme="light"] .announcement-footer { border-color: rgba(93, 69, 126, .13); }

.announcement-admin-section { margin-top: 2px; padding-top: 0; border-top: 0; }
.announcement-admin-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 20px; }
.announcement-admin-heading h3 { margin: 0; color: #fff; font-size: 18px; }
.announcement-form textarea { min-height: 130px; }
.announcement-media-picker { position: relative; margin-top: 7px; }
.announcement-media-picker > input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: pointer; touch-action: manipulation; }
.announcement-media-picker > .file-picker-label { pointer-events: none; }
.announcement-admin-media { display: block; width: min(100%, 360px); max-height: 190px; margin-top: 10px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px; background: rgba(16, 12, 24, .25); object-fit: contain; }
.announcement-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 12px; color: rgba(255, 239, 249, .84); font-size: 12px; font-weight: 750; }
.announcement-list-heading small { color: rgba(255, 239, 249, .48); font-size: 10px; font-weight: 500; }
.announcement-list { display: grid; gap: 9px; }
.announcement-admin-item { padding: 13px 14px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 10px; background: rgba(28, 24, 39, .2); }
.announcement-admin-item-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.announcement-admin-item h4 { margin: 0; color: #fff; font-size: 13px; line-height: 1.4; }
.announcement-admin-item time { flex: 0 0 auto; color: rgba(255, 239, 249, .5); font-size: 9px; }
.announcement-admin-item p { margin: 8px 0 0; color: rgba(255, 239, 249, .65); font-size: 11px; line-height: 1.6; white-space: pre-wrap; }
.announcement-list-empty { margin: 0; padding: 16px; border: 1px dashed rgba(255, 255, 255, .15); border-radius: 9px; color: rgba(255, 239, 249, .5); font-size: 11px; text-align: center; }
html[data-theme="light"] .announcement-admin-heading h3 { color: #302441; }
html[data-theme="light"] .announcement-list-heading { color: #4f4260; }
html[data-theme="light"] .announcement-list-heading small, html[data-theme="light"] .announcement-admin-item time { color: #887b95; }
html[data-theme="light"] .announcement-admin-item { border-color: rgba(93, 69, 126, .14); background: rgba(255, 255, 255, .32); }
html[data-theme="light"] .announcement-admin-item h4 { color: #3c2d4c; }
html[data-theme="light"] .announcement-admin-item p { color: #6f6180; }
html[data-theme="light"] .announcement-list-empty { border-color: rgba(93, 69, 126, .18); color: #887b95; }
html[data-theme="light"] .announcement-media img, html[data-theme="light"] .announcement-media video, html[data-theme="light"] .announcement-admin-media { border-color: rgba(93, 69, 126, .14); background: rgba(255, 255, 255, .4); }

/* Admin publishing and management sections. */
.admin-manage-section { margin-top: 2px; }
.admin-manage-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.admin-manage-heading h3 { margin: 0; color: #fff; font-size: 18px; }
.admin-manage-heading .button { flex: 0 0 auto; min-height: 35px; padding: 0 13px; font-size: 10px; }
.admin-published-list { display: grid; gap: 10px; }
.admin-published-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 13px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 11px; background: rgba(28, 24, 39, .2); }
.admin-published-icon { display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #8d83e3, #df83b5); font-size: 16px; font-weight: 850; }
.admin-published-icon img { width: 100%; height: 100%; object-fit: cover; }
.admin-published-main { min-width: 0; }
.admin-published-main strong { display: block; color: #fff7fb; font-size: 13px; }
.admin-published-main small { display: block; margin-top: 4px; color: rgba(255, 239, 249, .55); font-size: 10px; }
.admin-published-main p { overflow: hidden; margin: 7px 0 0; color: rgba(255, 239, 249, .68); font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.admin-published-actions { display: flex; align-items: center; gap: 7px; }
.admin-published-actions .button { min-height: 32px; padding: 0 11px; font-size: 10px; }
.button-danger { border: 1px solid rgba(230, 117, 153, .38); color: #ffb5cf; background: rgba(182, 61, 105, .16); }
.button-danger:hover { border-color: rgba(255, 151, 184, .64); color: #fff; background: rgba(191, 60, 108, .3); }
.admin-users-table-wrap { overflow-x: auto; margin-top: 12px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 11px; }
.admin-users-table { width: 100%; min-width: 1180px; border-collapse: collapse; table-layout: fixed; }
.admin-users-table th { padding: 12px 10px; color: rgba(255, 239, 249, .58); background: rgba(28, 24, 39, .22); font-size: 10px; font-weight: 750; text-align: left; white-space: nowrap; }
.admin-users-table td { padding: 9px 10px; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 239, 249, .72); font-size: 10px; vertical-align: middle; }
.admin-user-time { display: inline-block; min-width: 142px; color: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-users-table input { width: 100%; min-width: 0; min-height: 32px; padding: 0 8px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 7px; color: #fff7fb; background: rgba(23, 20, 33, .28); font: inherit; outline: 0; }
.admin-users-table input:focus { border-color: rgba(224, 137, 177, .78); box-shadow: 0 0 0 3px rgba(224, 137, 177, .12); }
.admin-users-table input::placeholder { color: rgba(255, 239, 249, .42); }
.admin-users-table th:nth-child(1), .admin-users-table td:nth-child(1) { width: 6%; }
.admin-users-table th:nth-child(2), .admin-users-table td:nth-child(2) { width: 10%; }
.admin-users-table th:nth-child(3), .admin-users-table td:nth-child(3) { width: 10%; }
.admin-users-table th:nth-child(4), .admin-users-table td:nth-child(4) { width: 14%; }
.admin-users-table th:nth-child(5), .admin-users-table td:nth-child(5) { width: 16%; }
.admin-users-table th:nth-child(6), .admin-users-table td:nth-child(6), .admin-users-table th:nth-child(7), .admin-users-table td:nth-child(7), .admin-users-table th:nth-child(8), .admin-users-table td:nth-child(8) { width: 12%; }
.admin-users-table th:nth-child(9), .admin-users-table td:nth-child(9), .admin-users-table th:nth-child(10), .admin-users-table td:nth-child(10), .admin-users-table th:nth-child(11), .admin-users-table td:nth-child(11) { width: 6%; }
.admin-table-avatar { display: grid; place-items: center; width: 34px; height: 34px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .3); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #8d83e3, #df83b5); font-size: 10px; font-weight: 850; }
.admin-table-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.admin-user-ip { display: inline-block; min-width: 105px; color: inherit; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-users-table tr.is-disabled { opacity: .62; }
.admin-users-table tr.is-disabled td:first-child::after { display: block; margin-top: 3px; color: #f3a9c2; content: "已禁用"; font-size: 9px; }
.admin-user-disable { width: 100%; min-height: 32px; padding: 0 6px; border: 1px solid rgba(234, 187, 103, .4); border-radius: 6px; color: #ffd993; background: rgba(183, 122, 33, .16); font-size: 10px; white-space: nowrap; }
.admin-user-disable:hover { border-color: rgba(255, 220, 145, .72); background: rgba(183, 122, 33, .28); }
.admin-user-delete { width: 100%; min-height: 32px; padding: 0 6px; font-size: 10px; white-space: nowrap; }
.admin-user-save { min-height: 32px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
.admin-users-table { min-width: 1300px; }
.admin-users-table th:nth-child(9), .admin-users-table td:nth-child(9) { width: 10%; }
.admin-users-table th:nth-child(10), .admin-users-table td:nth-child(10), .admin-users-table th:nth-child(11), .admin-users-table td:nth-child(11), .admin-users-table th:nth-child(12), .admin-users-table td:nth-child(12) { width: 6%; }
html[data-theme="light"] .admin-manage-heading h3 { color: #302441; }
html[data-theme="light"] .admin-published-item, html[data-theme="light"] .admin-users-table-wrap { border-color: rgba(93, 69, 126, .14); background: rgba(255, 255, 255, .27); }
html[data-theme="light"] .admin-published-main strong { color: #3c2d4c; }
html[data-theme="light"] .admin-published-main small, html[data-theme="light"] .admin-published-main p { color: #887b95; }
html[data-theme="light"] .admin-users-table th { color: #756982; background: rgba(255, 255, 255, .4); }
html[data-theme="light"] .admin-users-table td { border-color: rgba(93, 69, 126, .1); color: #756982; }
html[data-theme="light"] .admin-users-table input { border-color: rgba(93, 69, 126, .18); color: #332847; background: rgba(255, 255, 255, .62); }
html[data-theme="light"] .admin-users-table input::placeholder { color: #a095ad; }
html[data-theme="light"] .button-danger { border-color: rgba(170, 69, 108, .35); color: #a33f6c; background: rgba(214, 106, 145, .1); }
html[data-theme="light"] .admin-user-disable { border-color: rgba(176, 119, 32, .35); color: #8b621b; background: rgba(214, 165, 72, .12); }
html[data-theme="light"] .admin-users-table tr.is-disabled td:first-child::after { color: #b05d79; }

@media (max-width: 680px) {
  .admin-dashboard, .admin-users { margin-left: -20px; width: calc(100% + 40px); padding-right: 16px; padding-left: 16px; }
  .admin-published-item { grid-template-columns: 42px minmax(0, 1fr); }
  .admin-published-icon { width: 42px; height: 42px; }
  .admin-published-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .admin-manage-heading { align-items: flex-start; }
}

@media (max-width: 560px) {
  .announcement-modal { padding: 14px; }
  .announcement-dialog { padding: 19px 18px 15px; }
  .announcement-footer { align-items: stretch; flex-direction: column; gap: 10px; }
  .announcement-action { width: 100%; }
  .announcement-admin-item-heading { flex-direction: column; gap: 5px; }
}
