/* Tailwind CSS 3.4 utilities, precompiled so the page works offline. */
.fixed {
  position: fixed
}

.absolute {
  position: absolute
}

.relative {
  position: relative
}

.sticky {
  position: sticky
}

.isolate {
  isolation: isolate
}

.block {
  display: block
}

.flex {
  display: flex
}

.inline-flex {
  display: inline-flex
}

.grid {
  display: grid
}

.hidden {
  display: none
}

.flex-shrink {
  flex-shrink: 1
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr))
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.flex-wrap {
  flex-wrap: wrap
}

.place-items-center {
  place-items: center
}

.items-center {
  align-items: center
}

.items-stretch {
  align-items: stretch
}

.justify-center {
  justify-content: center
}

.justify-between {
  justify-content: space-between
}

.gap-1 {
  gap: 0.25rem
}

.gap-1\.5 {
  gap: 0.375rem
}

.text-wrap {
  text-wrap: wrap
}

.border {
  border-width: 1px
}

.underline {
  text-decoration-line: underline
}

.outline {
  outline-style: solid
}

.blur {
  --tw-blur: blur(8px);
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
}

.filter {
  filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
}

.backdrop-filter {
  -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
  backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)
}

@media (min-width: 640px) {
  .sm\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr))
  }
}
:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: #191c23;
  background: #f5f7fa;
  --paper: #fff;
  --border: #eaecef;
  --muted: #606a79;
  --orange: #ff6b00;
  --coal: #1e2025;
  --gold: #f5d08a;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #ad4a08; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.container-shell { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.icon { width: 18px; height: 18px; display: inline-block; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; padding: 10px 16px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--border); background: var(--paper); }
.header-inner { min-height: 63px; gap: 46px; }
.brand { flex-shrink: 0; }
.brand-logo { display: block; width: 152px; height: auto; aspect-ratio: 4 / 1; }
.main-nav { gap: 28px; }
.nav-item { position: relative; display: flex; align-items: center; padding: 0; border: 0; background: transparent; color: var(--muted); text-wrap: nowrap; font-size: 14px; font-weight: 550; }
.nav-item:hover, .nav-item[aria-current] { color: #191c23; }
.nav-item[aria-current] { font-weight: 750; }
.nav-item[aria-current]::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; border-radius: 3px; background: #242831; }
.header-actions { gap: 10px; min-width: 0; margin-left: auto; }
.header-account { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: #363d49; font-size: 13px; font-weight: 700; }
.header-username { max-width: 138px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-vip { display: inline-grid; flex: none; place-items: center; width: 23px; height: 23px; border-radius: 50%; color: var(--gold); background: var(--coal); }
.header-vip .icon { width: 14px; height: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; padding: 0 13px; min-height: 38px; border-radius: 7px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.button .icon { width: 16px; height: 16px; }
.button-outline { border-color: #e1e5eb; background: var(--paper); color: #363d49; }
.button-outline:hover { background: #f3f5f8; }
.button-orange { background: var(--orange); color: #201105; }
.button-orange:hover { background: #f26000; }
.button-gold { border-radius: 99px; border-color: #33343a; background: var(--coal); color: var(--gold); }
.button-gold:hover { background: #353238; }

.hero {
  position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center;
  min-height: 276px; padding: 34px 0 36px; border-bottom: 1px solid #e9e9ef;
  background: linear-gradient(107deg, #edf1f8 0%, #f7f8fc 36%, #fcf9f6 67%, #f9eee4 100%);
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background-image: linear-gradient(#626f8810 1px, transparent 1px), linear-gradient(90deg, #626f8810 1px, transparent 1px);
  background-size: 25px 25px; mask-image: linear-gradient(90deg, #000, transparent 26%, transparent 74%, #000); opacity: .65;
}
.hero::after {
  inset: 0; background: radial-gradient(ellipse at 50% -20%, #fff8, transparent 68%);
  mask-image: none; opacity: 1;
}
.hero-content { text-align: center; }
.hero h1 { font-size: clamp(25px, 4vw, 43px); line-height: 1.2; font-weight: 850; letter-spacing: -.046em; }
.hero h1 { margin-bottom: 19px; }
.search-form { max-width: 590px; margin: 0 auto; min-height: 54px; gap: 11px; padding: 5px 5px 5px 15px; border: 1px solid #e1e5eb; border-radius: 9px; background: #fff; box-shadow: 0 4px 14px #2830440a; text-align: left; }
.search-form:focus-within { outline: 2px solid #ad4a08; outline-offset: 2px; }
.search-form > .icon { color: #6d7685; width: 20px; height: 20px; }
.search-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: inherit; padding: 9px 0; font-size: 14px; }
.search-form input::placeholder { color: #707989; }
.search-form input::-webkit-search-cancel-button { display: none; }
.search-submit { min-width: 90px; min-height: 42px; border: 0; border-radius: 6px; background: var(--orange); color: #201105; font-size: 14px; font-weight: 800; }
.search-submit:hover { background: #f26000; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; background: #f3f4f7; border: 0; border-radius: 7px; color: #4e586b; }
.icon-button:hover { background: #e9edf2; }
.search-clear { background: transparent; width: 28px; }

.library { padding-top: 30px; padding-bottom: 42px; scroll-margin-top: 82px; }
.library-title { gap: 11px; margin-bottom: 16px; }
.library-title h2 { font-size: 24px; line-height: 1.2; font-weight: 820; letter-spacing: -.035em; }
.library-title p { color: var(--muted); font-size: 12px; align-self: end; padding-bottom: 3px; }
.toolbar { gap: 12px; margin-bottom: 14px; }
.filters { gap: 4px; }
.filter { border: 1px solid transparent; padding: 0 11px; min-height: 36px; border-radius: 6px; background: transparent; font-size: 13px; color: #555e6d; font-weight: 600; white-space: nowrap; }
.filter .icon, .sort-option .icon { width: 15px; height: 15px; }
.filter[aria-pressed="true"] { background: #fff; border-color: #e2e6eb; color: #202630; box-shadow: 0 1px 2px #161e3010; }
.filter:hover { background: #eaedf2; }
.filter[aria-pressed="true"]:hover { background: #fff; }
.sort { flex-shrink: 0; gap: 2px; padding: 3px; border: 1px solid #e5e8ed; border-radius: 7px; background: #eef1f5; }
.sort-option { padding: 0 8px; min-height: 28px; border: 0; border-radius: 4px; background: transparent; font-size: 12px; color: #5a6474; white-space: nowrap; }
.sort-option[aria-pressed="true"] { color: #202630; font-weight: 700; background: #fff; box-shadow: 0 1px 2px #161e3014; }
.sort-option:hover { color: #202630; }
.game-grid { gap: 18px; }
.game-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); }
.game-cover { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: #262b37; }
.game-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.type-badge { position: absolute; top: 9px; right: 9px; gap: 5px; padding: 4px 7px; border: 1px solid #ffffff30; border-radius: 5px; background: #191d25ec; color: #fff; font-size: 11px; line-height: 1.35; font-weight: 650; white-space: nowrap; }
.type-badge .icon { width: 12px; height: 12px; }
.type-badge.online { background: #132b27f2; }
.type-badge.online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #78dab4; }
.game-main { flex: 1; padding: 13px 13px 12px; }
.game-title { font-size: 15px; line-height: 1.4; font-weight: 780; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.game-tags { gap: 6px; margin-top: 9px; }
.game-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 4px; color: #505a69; background: #f0f2f5; font-size: 11px; white-space: nowrap; }
.game-tag .icon { width: 12px; height: 12px; }
.game-footer { gap: 6px; padding: 9px 13px 10px; border-top: 1px solid #eff0f3; }
.game-offer { display: inline-flex; flex: none; align-items: center; gap: 6px; }
.game-price { color: #c44f00; font-size: 16px; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.member-tag { border: 1px solid #33343a; border-radius: 4px; padding: 3px 6px; color: var(--gold); background: var(--coal); font-size: 11px; line-height: 1.2; font-weight: 750; white-space: nowrap; }
.game-meta .icon { width: 13px; height: 13px; }
.game-meta { gap: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.game-system { min-width: 0; justify-content: flex-end; text-align: right; white-space: normal; }
.game-system .icon { flex: none; }
.empty { padding: 56px 20px; text-align: center; background: #fff; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); }
.empty > .icon { width: 28px; height: 28px; margin-bottom: 6px; }
.empty h3 { color: #242832; font-size: 17px; }
.empty p { margin: 7px 0 14px; font-size: 14px; }

.site-footer { border-top: 1px solid var(--border); background: #fff; padding: 27px 0; }
.footer-inner { gap: 16px 28px; }
.footer-links { gap: 17px; }
.footer-link { padding: 3px 0; border: 0; background: transparent; font-size: 13px; color: #535e6f; white-space: nowrap; }
.footer-link:hover { color: #191c23; text-decoration: underline; text-underline-offset: 3px; }

dialog { width: min(850px, calc(100% - 28px)); max-height: calc(100% - 28px); padding: 0; border: 1px solid #dddfe4; border-radius: 10px; background: #fff; color: #191c23; box-shadow: 0 24px 80px #14152144; }
dialog::backdrop { background: #171c2ab3; backdrop-filter: blur(3px); }
.dialog-heading { position: relative; padding: 25px 62px 23px 25px; background: linear-gradient(115deg, #202126, #302820); color: var(--gold); }
.dialog-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 23px; line-height: 1.25; }
.dialog-heading .icon { width: 21px; height: 21px; }
.dialog-heading p { margin-top: 8px; color: #f5e7d0; font-size: 13px; line-height: 1.6; }
.dialog-close { position: absolute; right: 17px; top: 17px; background: #ffffff18; color: #fff; }
.dialog-close:hover { background: #ffffff30; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.plan { display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 15px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.plan.recommended { border-color: #d6b26b; background: #fffcf6; }
.plan:has([aria-pressed="true"]) { box-shadow: inset 0 0 0 2px #a87932; }
.plan h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 16px; }
.plan .recommended-label { font-size: 10px; padding: 3px 5px; border-radius: 4px; background: var(--coal); color: var(--gold); }
.plan-amount { margin-top: 11px; color: #795010; font-size: 24px; font-weight: 820; }
.plan-amount small { font-size: 12px; font-weight: 650; }
.plan ul { display: grid; gap: 9px; list-style: none; padding: 13px 0; margin: 10px 0 6px; border-top: 1px solid #e9e7e3; font-size: 12px; color: #515968; line-height: 1.55; }
.plan li { display: flex; align-items: flex-start; gap: 6px; }
.plan li .icon { width: 14px; height: 14px; color: #795010; margin-top: 2px; }
.plan-trigger { margin-top: auto; }
.membership-checkout { margin: 0 18px 18px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #f5f7fa; }
.membership-checkout h3 { margin-bottom: 10px; font-size: 15px; }
.membership-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.membership-method { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--paper); }
.membership-method h4 { margin: 0; font-size: 13px; }
.membership-total { margin-top: 3px; color: #795010; font-size: 15px; font-weight: 780; white-space: nowrap; }
.membership-rate { margin-top: 9px; color: var(--muted); font-size: 12px; }
.membership-method button:disabled { cursor: default; color: var(--muted); background: #f5f7fa; }
@media (max-width: 520px) { .membership-methods { grid-template-columns: minmax(0, 1fr); } }
.small-dialog { max-width: 470px; }
.small-dialog .dialog-heading { background: var(--coal); color: #fff; }
.info-content { padding: 20px 25px 25px; color: #505a69; font-size: 14px; line-height: 1.7; }
.info-content p + p { margin-top: 10px; }
.info-content details + details { margin-top: 10px; }
.info-content summary { cursor: pointer; font-weight: 700; color: #232630; }
.info-content details p { margin: 5px 0 0 15px; }

@media (max-width: 940px) {
  .header-inner { gap: 22px; }
  .main-nav { gap: 18px; }
  .header-actions { gap: 7px; }
}
@media (max-width: 840px) {
  .container-shell { width: calc(100% - 32px); }
  .header-inner { flex-wrap: wrap; gap: 0 10px; min-height: initial; padding-top: 10px; }
  .main-nav { order: 3; gap: 0; width: 100%; margin-top: 3px; justify-content: space-between; }
  .nav-item { justify-content: center; min-height: 42px; }
  .header-actions .button { min-height: 34px; }
  .hero { min-height: 252px; padding: 26px 0; }
  .library { padding-top: 23px; scroll-margin-top: 107px; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .sort { align-self: flex-end; }
  .filters { width: 100%; overflow-x: auto; padding: 3px; margin: -3px; scrollbar-width: thin; }
  .game-grid { gap: 12px; }
  .footer-inner { align-items: flex-start; }
}
@media (max-width: 490px) {
  .header-actions .button { padding-inline: 8px; font-size: 11px; gap: 4px; }
  .header-actions .button .icon { width: 13px; height: 13px; }
  .header-username { max-width: clamp(38px, 18vw, 90px); }
  .header-vip { width: 19px; height: 19px; }
  .header-vip .icon { width: 12px; height: 12px; }
  .brand-logo { width: 118px; }
  .nav-item { font-size: 13px; }
  .hero h1 { letter-spacing: -.055em; }
  .search-submit { min-width: 58px; }
  .filters { flex-wrap: wrap; gap: 2px; padding: 0; margin: 0; overflow: visible; }
  .filter { min-height: 34px; padding-inline: 6px; font-size: 12px; }
  .filter .icon { display: none; }
  .game-main, .game-footer { padding-inline: 8px; }
  .game-title { font-size: 13px; }
  .game-meta .icon { display: none; }
  .game-meta, .member-tag { font-size: 10px; }
  .member-tag { padding: 2px 3px; }
  .game-offer { gap: 4px; }
  .game-price { font-size: 13px; }
  .type-badge { top: 6px; right: 6px; font-size: 10px; }
  .plan-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 12px; }
  .membership-checkout { margin-inline: 12px; }
}

a.game-card { transition: border-color .15s, box-shadow .15s; }
a.game-card:hover { border-color: #c9d0d9; box-shadow: 0 3px 12px #1e293512; }
a.game-card:focus-visible { outline-offset: 2px; }

@media (max-width: 370px) {
  .brand-logo { width: 105px; }
  .library { width: calc(100% - 24px); }
  .game-grid { gap: 8px; }
  .game-footer { gap: 2px; padding-inline: 3px; }
  .game-offer { gap: 3px; }
  .game-price { font-size: 12px; }
  .game-meta, .member-tag { font-size: 9px; }
  .game-meta { letter-spacing: -.025em; }
  .member-tag { padding-inline: 2px; }
  .header-actions { gap: 5px; }
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: radial-gradient(ellipse at 72% 2%, #faeadd 0%, transparent 45%),
    radial-gradient(ellipse at 14% 12%, #e8edf7 0%, transparent 48%), #f5f7fa;
}
.auth-shell { width: min(100%, 430px); }
.auth-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 1px 15px; }
.auth-return { display: inline-flex; gap: 3px; align-items: center; font-size: 13px; color: var(--muted); white-space: nowrap; }
.auth-return:hover { color: var(--coal); }
.auth-return .icon { width: 15px; height: 15px; transform: rotate(180deg); }
.auth-card { padding: 28px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); box-shadow: 0 12px 30px #343a4810; }
.auth-card h1 { margin-bottom: 18px; color: var(--coal); font-size: 26px; letter-spacing: -.04em; }
.auth-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 8px; background: #f0f2f5; }
.auth-tabs button { min-height: 36px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; transition: background-color .15s, color .15s; }
.auth-tabs button[aria-selected="true"] { border-color: var(--border); background: var(--paper); color: var(--coal); box-shadow: 0 1px 3px #343a4810; }
#auth-form { display: grid; gap: 15px; margin-top: 19px; }
.auth-field { display: grid; gap: 6px; color: #363d49; font-size: 13px; font-weight: 700; }
.auth-field input { width: 100%; min-height: 43px; padding: 8px 11px; border: 1px solid #dce1e8; border-radius: 6px; background: var(--paper); color: var(--coal); font-size: 14px; font-weight: 500; }
.auth-field input[aria-invalid="true"] { border-color: #a52324; }
.auth-options { display: flex; flex-wrap: wrap; gap: 9px 15px; color: var(--muted); font-size: 12px; }
.auth-options label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.auth-options input { margin: 0; accent-color: var(--coal); }
.auth-submit { min-height: 42px; width: 100%; }
.auth-error { color: #a52324; font-size: 13px; }
.auth-note { color: var(--muted); font-size: 12px; text-align: center; }
@media (max-width: 370px) { .auth-card { padding: 21px; } }
@media (prefers-reduced-motion: reduce) { .auth-tabs button { transition: none; } }

.plan-notice, .library-status { padding: 10px 0; color: var(--muted); font-size: 14px; }
.plan-notice { margin-inline: 18px; }
.order-status, .form-feedback { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.order-status { margin-top: 9px; }
.order-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.is-error { color: #a52324; }
.button:disabled { opacity: .55; cursor: default; }
.text-action { justify-self: start; padding: 0; border: 0; background: transparent; color: #865000; font-size: 13px; text-align: left; }
.text-action:hover { text-decoration: underline; }
.reset-form { display: grid; gap: 15px; }
.reset-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
.reset-code-row .button { min-height: 43px; }
