:root {
  --bg: #f3f3f9;
  --surface: #ffffff;
  --text: #15142c;
  --muted: #8d8ca0;
  --line: #e8e7f0;
  --purple: #7a38ef;
  --purple-2: #9a32f1;
  --cyan: #12abc5;
  --shadow: 0 14px 36px rgba(29, 21, 75, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); background: var(--bg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 40; height: 66px; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(218,217,229,.7); }
.header-inner { height: 66px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-size: 20px; font-weight: 800; letter-spacing: -.5px; }
.brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 18px rgba(122,56,239,.2); }
.top-nav { display: flex; align-items: center; gap: 34px; color: #6e6c7d; font-size: 15px; }
.top-nav a { position: relative; padding: 22px 0; }
.top-nav a.active { color: var(--purple); font-weight: 700; }
.top-nav a.active::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 18px; height: 3px; transform: translateX(-50%); border-radius: 999px; background: var(--purple); }
.login-link { justify-self: end; padding: 7px 22px; color: #fff; font-weight: 700; border-radius: 9px; background: linear-gradient(135deg, var(--purple), var(--purple-2)); box-shadow: 0 8px 18px rgba(122,56,239,.22); }

.home-hero { padding: 58px 0 10px; background: radial-gradient(circle at 50% 0, rgba(123,56,239,.08), transparent 34%), linear-gradient(#f7f7fb, #f3f3f9); }
.hero-intro { text-align: center; padding-bottom: 30px; }
.hero-logo { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 50%; box-shadow: 0 12px 38px rgba(96,58,184,.2); }
.hero-intro h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -1.3px; }
.hero-intro h1 span { color: transparent; background: linear-gradient(135deg, #6737ed, #a33cf0); -webkit-background-clip: text; background-clip: text; }
.hero-intro p { margin: 9px 0 0; color: var(--muted); font-size: 16px; }

.carousel { position: relative; overflow: hidden; border-radius: 22px; box-shadow: var(--shadow); }
.carousel-track { position: relative; aspect-ratio: 3.45 / 1; min-height: 230px; background: #ddd9f1; }
.carousel-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .55s ease, transform .75s ease; transform: scale(1.025); }
.carousel-slide.active { opacity: 1; pointer-events: auto; transform: scale(1); }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-overlay { position: absolute; inset: auto 0 0; padding: 52px 46px 34px; color: #fff; background: linear-gradient(transparent, rgba(20,12,45,.84)); }
.carousel-overlay strong, .carousel-overlay small { display: block; }
.carousel-overlay strong { font-size: clamp(24px, 3vw, 38px); line-height: 1.2; }
.carousel-overlay small { margin-top: 7px; font-size: 15px; opacity: .86; }
.carousel-arrow { position: absolute; top: 50%; z-index: 3; width: 42px; height: 42px; padding: 0 0 4px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; color: #fff; font-size: 32px; line-height: 1; background: rgba(18,13,42,.32); backdrop-filter: blur(10px); transform: translateY(-50%); }
.carousel-prev { left: 18px; }
.carousel-next { right: 18px; }
.carousel-dots { position: absolute; z-index: 4; right: 26px; bottom: 25px; display: flex; gap: 8px; }
.carousel-dots button { width: 8px; height: 8px; border: 0; border-radius: 50%; padding: 0; background: rgba(255,255,255,.55); transition: .2s; }
.carousel-dots button.active { width: 25px; border-radius: 999px; background: #fff; }

.home-search, .inline-search { margin-top: 28px; }
.search-box { display: flex; align-items: center; gap: 11px; width: min(680px, 100%); min-height: 52px; margin: 0 auto; padding: 0 18px; border: 1px solid #e2e1e9; border-radius: 16px; background: #fff; box-shadow: 0 8px 30px rgba(30,27,73,.05); }
.search-box > span { color: #77809d; font-size: 23px; transform: rotate(-15deg); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; }
.search-box input::placeholder { color: #aba9b7; }
.search-box a { color: #9a97a6; font-size: 22px; }

.section-block { padding: 52px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 24px; }
.section-heading h2 { margin: 3px 0 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.25; }
.section-heading p { max-width: 480px; margin: 0; color: var(--muted); text-align: right; }
.eyebrow { color: var(--purple); font-size: 12px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }

.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.category-card, .post-card { overflow: hidden; border: 1px solid rgba(228,226,237,.9); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 22px rgba(27,23,60,.045); transition: transform .25s, box-shadow .25s; }
.category-card:hover, .post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-cover { position: relative; display: block; aspect-ratio: 1.62 / 1; overflow: hidden; background: #eceaf6; }
.card-cover img, .post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.category-card:hover .card-cover img, .post-card:hover .post-cover img { transform: scale(1.045); }
.card-count { position: absolute; right: 12px; bottom: 12px; padding: 3px 9px; color: #fff; font-size: 12px; border-radius: 999px; background: rgba(30,23,54,.55); backdrop-filter: blur(7px); }
.card-body { padding: 17px 18px 19px; }
.card-body h3, .post-card-body h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.card-body p, .post-card-body p { min-height: 46px; margin: 8px 0 12px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.text-link { color: var(--purple); font-size: 14px; font-weight: 700; }
.text-link span { display: inline-block; transition: transform .2s; }
.text-link:hover span { transform: translateX(4px); }
.mini-label { display: inline-block; margin-bottom: 8px; padding: 3px 8px; color: #6f35da; font-size: 11px; font-weight: 700; border-radius: 999px; background: #f0e8ff; }

.trust-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; overflow: hidden; margin-bottom: 60px; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.trust-strip div { padding: 24px; background: #fff; }
.trust-strip strong, .trust-strip span { display: block; text-align: center; }
.trust-strip strong { font-size: 17px; }
.trust-strip span { margin-top: 4px; color: var(--muted); font-size: 13px; }

.category-page, .post-detail-page { padding: 34px 0 64px; }
.page-title-row { display: flex; align-items: start; gap: 16px; margin-bottom: 20px; }
.page-title-row h1 { margin: 0; font-size: 27px; line-height: 1.2; }
.page-title-row p { margin: 2px 0 0; color: var(--muted); }
.back-button { flex: 0 0 auto; padding: 7px 13px; color: #666477; font-size: 14px; border: 1px solid #dddbe6; border-radius: 9px; background: #fff; }
.category-banner { position: relative; overflow: hidden; height: 180px; margin-bottom: 24px; border-radius: 18px; background: #272033; box-shadow: var(--shadow); }
.category-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,10,23,.82), rgba(12,10,23,.08)); }
.category-banner img { width: 100%; height: 100%; object-fit: cover; }
.category-banner > div { position: absolute; z-index: 2; left: 28px; bottom: 28px; color: #fff; }
.category-banner strong, .category-banner span { display: block; }
.category-banner strong { font-size: 28px; }
.category-banner span { margin-top: 2px; opacity: .82; }
.category-tabs { display: grid; gap: 9px; }
.category-tab { display: flex; justify-content: space-between; align-items: center; min-height: 58px; padding: 0 18px; border: 1px solid #e7e5ef; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(30,23,66,.03); transition: .2s; }
.category-tab span { font-weight: 700; }
.category-tab small { color: #a4a1af; }
.category-tab:hover { border-color: #d8c6ff; }
.category-tab.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, var(--purple), var(--purple-2)); box-shadow: 0 11px 24px rgba(122,56,239,.24); }
.category-tab.active small { color: rgba(255,255,255,.76); }
.inline-search .search-box { width: 100%; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.post-grid.compact { grid-template-columns: repeat(4, 1fr); }
.post-cover { position: relative; display: block; aspect-ratio: 1.25 / 1; overflow: hidden; background: #eceaf6; }
.post-badge { position: absolute; left: 12px; bottom: 12px; padding: 4px 9px; color: #fff; font-size: 12px; border-radius: 999px; background: rgba(24,17,49,.65); backdrop-filter: blur(8px); }
.post-card-body { padding: 16px; }
.post-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 12px; border: 0; border-radius: 8px; font-size: 13px; font-weight: 700; }
.btn-purple { color: #fff; background: linear-gradient(135deg, var(--purple), #8d43ec); }
.btn-cyan { color: #fff; background: linear-gradient(135deg, var(--cyan), #0b9bb5); }
.btn-ghost { color: #5d5870; border: 1px solid #ddd9e8; background: #fff; }
.post-detail-link { display: block; margin-top: 12px; padding-top: 10px; color: #7e7a8d; font-size: 12px; border-top: 1px solid #efedf3; }
.empty-state { padding: 68px 28px; text-align: center; border: 1px dashed #d9d6e5; border-radius: 18px; background: rgba(255,255,255,.55); }
.empty-state strong { font-size: 21px; }
.empty-state p { margin: 5px 0 0; color: var(--muted); }

.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: #8b8799; font-size: 13px; }
.breadcrumbs strong { color: #4a4658; }
.detail-hero-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); overflow: hidden; border-radius: 22px; background: #fff; box-shadow: var(--shadow); }
.detail-cover { position: relative; min-height: 430px; padding: 0; border: 0; overflow: hidden; background: #e7e4f1; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-cover > span { position: absolute; right: 18px; bottom: 18px; padding: 6px 12px; color: #fff; font-size: 13px; border-radius: 999px; background: rgba(22,16,45,.58); backdrop-filter: blur(8px); }
.detail-summary { display: flex; flex-direction: column; justify-content: center; padding: 44px; }
.detail-summary h1 { margin: 4px 0 12px; font-size: clamp(28px,4vw,42px); line-height: 1.15; }
.detail-summary p { margin: 0; color: var(--muted); font-size: 16px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.detail-actions .btn { min-height: 42px; padding: 9px 17px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; margin-top: 24px; }
.content-panel, .notice-panel { padding: 26px; border: 1px solid #e7e4ef; border-radius: 18px; background: #fff; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 16px; border-bottom: 1px solid #efedf4; }
.panel-heading span { font-size: 20px; font-weight: 800; }
.panel-heading small { color: var(--muted); }
.rich-text { padding-top: 20px; color: #4a4657; font-size: 16px; line-height: 2; white-space: normal; }
.notice-panel { background: linear-gradient(155deg, #f7f2ff, #fff); }
.notice-panel strong { font-size: 19px; }
.notice-panel p { color: #766d89; }
.notice-panel ul { margin: 18px 0 0; padding-left: 20px; color: #6d667d; font-size: 14px; }
.notice-panel li + li { margin-top: 8px; }
.detail-gallery, .related-section { margin-top: 46px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.gallery-item { position: relative; aspect-ratio: 1.1/1; overflow: hidden; padding: 0; border: 0; border-radius: 16px; background: #e7e4ef; box-shadow: 0 7px 22px rgba(29,22,65,.06); }
.gallery-item img { width: 100%; object-fit: cover; transition: transform .35s; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item span { position: absolute; inset: auto 0 0; padding: 28px 14px 12px; color: #fff; text-align: left; font-size: 13px; background: linear-gradient(transparent, rgba(21,16,39,.8)); }
.related-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.related-card { display: flex; align-items: center; gap: 13px; padding: 12px; border: 1px solid #e7e4ef; border-radius: 14px; background: #fff; }
.related-card img { width: 86px; height: 70px; object-fit: cover; border-radius: 10px; }
.related-card strong, .related-card small { display: block; }
.related-card small { margin-top: 3px; color: var(--muted); }

.overlay-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center; padding: 52px 80px 70px; background: rgba(8,6,18,.92); backdrop-filter: blur(9px); }
.lightbox.open { display: flex; }
.lightbox figure { display: flex; flex-direction: column; width: min(1200px, 90vw); height: min(84vh, 900px); margin: 0; text-align: center; }
.lightbox-stage { display: flex; flex: 1; min-height: 0; align-items: center; justify-content: center; overflow: hidden; border-radius: 12px; touch-action: none; }
.lightbox img { max-width: 100%; max-height: 100%; margin: auto; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); cursor: zoom-in; user-select: none; transition: transform .12s ease; transform-origin: center center; will-change: transform; }
.lightbox img.zoomed { cursor: grab; transition: none; }
.lightbox img.dragging { cursor: grabbing; }
.lightbox figcaption { flex: 0 0 auto; min-height: 26px; margin-top: 10px; color: rgba(255,255,255,.8); }
.lightbox-close, .lightbox-prev, .lightbox-next { position: absolute; color: #fff; border: 0; background: transparent; }
.lightbox-close { top: 14px; right: 25px; font-size: 45px; }
.lightbox-prev, .lightbox-next { top: 50%; font-size: 56px; transform: translateY(-50%); }
.lightbox-prev { left: 25px; }
.lightbox-next { right: 25px; }
.lightbox-prev.hidden, .lightbox-next.hidden { display: none; }
.lightbox-tools { position: absolute; left: 50%; bottom: 18px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(25,20,42,.72); backdrop-filter: blur(12px); transform: translateX(-50%); }
.lightbox-tools button { min-width: 34px; height: 32px; padding: 0 10px; color: #fff; border: 0; border-radius: 999px; background: rgba(255,255,255,.12); }
.lightbox-tools button:hover { background: rgba(255,255,255,.22); }
.lightbox-tools span { min-width: 54px; color: rgba(255,255,255,.88); font-size: 13px; text-align: center; }

.site-modal { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center; padding: 24px; background: rgba(20,18,31,.64); backdrop-filter: blur(3px); }
.site-modal.open { display: flex; }
.site-modal-dialog { position: relative; width: min(512px, 100%); max-height: min(92vh, 760px); overflow: auto; padding: 24px; border: 1px solid rgba(220,218,230,.95); border-radius: 12px; background: #f9f9fc; box-shadow: 0 26px 70px rgba(12,9,28,.28); animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.site-modal-close { position: absolute; z-index: 2; top: 13px; right: 15px; width: 32px; height: 32px; padding: 0 0 2px; color: #656171; font-size: 25px; line-height: 1; border: 0; border-radius: 7px; background: transparent; }
.site-modal-close:hover, .site-modal-close:focus-visible { color: var(--purple); background: #f0eaff; outline: none; }
.site-modal-head { padding-right: 42px; }
.site-modal-head h2 { margin: 0; font-size: 21px; line-height: 1.35; }
.site-modal-head p { margin: 5px 0 0; color: #777384; font-size: 14px; }
.share-qr-wrap { display: flex; align-items: center; justify-content: center; width: 202px; height: 202px; margin: 31px auto 16px; background: #fff; }
.share-qr-wrap canvas { display: block; }
.share-link-field { padding: 3px; border: 2px solid #8e56ff; border-radius: 9px; background: #fff; box-shadow: 0 0 0 3px rgba(126,67,244,.12); }
.share-link-field input { width: 100%; height: 32px; padding: 0 10px; color: #6540ee; border: 0; outline: 0; background: transparent; }
.modal-wide-button { width: 100%; min-height: 38px; margin-top: 15px; color: #292635; border: 1px solid #d9d7e1; border-radius: 7px; background: #f7f7fa; box-shadow: 0 2px 5px rgba(25,20,47,.05); }
.modal-wide-button:hover { border-color: #c9c4d8; background: #fff; }
.service-dialog { width: min(512px, 100%); }
.service-media { display: flex; align-items: center; justify-content: center; min-height: 270px; margin: 28px auto 4px; overflow: hidden; border-radius: 8px; background: transparent; }
.service-media img { max-width: 100%; max-height: min(58vh, 420px); object-fit: contain; }
.service-media canvas { background: #fff; box-shadow: 0 8px 25px rgba(29,22,65,.08); }
.service-media span { padding: 42px 20px; color: var(--muted); text-align: center; border: 1px dashed #d8d4e3; border-radius: 12px; background: #fff; }
.service-media.disabled { cursor: default; }
.games-category-overview { margin-top: 22px; }

.site-footer { padding: 25px 0; color: #8b879b; font-size: 13px; border-top: 1px solid #e4e2eb; background: #fff; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }
.footer-inner a { color: var(--purple); }

@media (max-width: 1000px) {
  .category-grid { grid-template-columns: repeat(3,1fr); }
  .post-grid.compact { grid-template-columns: repeat(3,1fr); }
  .detail-hero-card { grid-template-columns: 1fr; }
  .detail-cover { min-height: 360px; }
  .detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header, .header-inner { height: 58px; }
  .header-inner { grid-template-columns: 1fr auto; }
  .brand { font-size: 17px; }
  .brand img { width: 31px; height: 31px; }
  .top-nav { display: none; }
  .login-link { padding: 6px 14px; font-size: 13px; }
  .home-hero { padding-top: 34px; }
  .hero-logo { width: 56px; height: 56px; }
  .hero-intro p { font-size: 14px; }
  .carousel { border-radius: 15px; }
  .carousel-track { aspect-ratio: 1.8/1; min-height: 190px; }
  .carousel-overlay { padding: 42px 20px 20px; }
  .carousel-overlay strong { font-size: 23px; }
  .carousel-overlay small { font-size: 13px; }
  .carousel-arrow { display: none; }
  .carousel-dots { right: 15px; bottom: 13px; }
  .category-grid, .post-grid, .post-grid.compact { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .section-block { padding: 34px 0; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 8px; text-align: left; }
  .trust-strip { grid-template-columns: 1fr; }
  .page-title-row { display: block; }
  .page-title-row .back-button { display: inline-block; margin-bottom: 12px; }
  .category-banner { height: 150px; }
  .category-banner > div { left: 20px; bottom: 20px; }
  .category-banner strong { font-size: 23px; }
  .detail-summary { padding: 26px; }
  .detail-cover { min-height: 300px; }
  .gallery-grid { grid-template-columns: repeat(2,1fr); }
  .related-grid { grid-template-columns: 1fr; }
  .lightbox { padding: 48px 12px 68px; }
  .lightbox figure { width: 100%; height: 78vh; }
  .lightbox-prev { left: 2px; }
  .lightbox-next { right: 2px; }
  .lightbox-tools { bottom: 14px; }
  .site-modal { padding: 14px; }
  .site-modal-dialog { padding: 20px; }
  .share-qr-wrap { margin-top: 26px; }
  .service-media { min-height: 230px; margin-top: 22px; }
}

@media (max-width: 520px) {
  .category-grid, .post-grid, .post-grid.compact { grid-template-columns: 1fr; }
  .card-cover { aspect-ratio: 1.8/1; }
  .post-cover { aspect-ratio: 1.55/1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .post-actions { grid-template-columns: 1fr 1fr; }
  .footer-inner { display: block; text-align: center; }
  .footer-inner a { display: inline-block; margin-top: 5px; }
}

/* v2: game list, configurable hero and richer article content */
.home-hero.has-custom-background { position: relative; isolation: isolate; background-image: linear-gradient(rgba(247,247,251,.88),rgba(243,243,249,.94)), var(--home-bg); background-position: center; background-size: cover; }
.search-box button { flex: 0 0 auto; min-height: 36px; padding: 0 17px; border: 0; border-radius: 10px; color: #fff; font-weight: 700; background: linear-gradient(135deg,var(--purple),var(--purple-2)); }
.game-category-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.game-category-filter a { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; padding: 8px 14px; border: 1px solid #dedbe9; border-radius: 12px; color: #5f5b6d; background: #fff; box-shadow: 0 4px 13px rgba(29,22,65,.035); transition: .2s; }
.game-category-filter a:hover { border-color: #cbb3fa; transform: translateY(-1px); }
.game-category-filter a.active { color: #fff; border-color: transparent; background: linear-gradient(135deg,var(--purple),var(--purple-2)); box-shadow: 0 9px 23px rgba(122,56,239,.23); }
.game-category-filter a span { font-weight: 700; }
.game-category-filter a small { min-width: 24px; padding: 1px 7px; border-radius: 999px; color: #918c9f; text-align: center; background: #f1eff6; }
.game-category-filter a.active small { color: #fff; background: rgba(255,255,255,.18); }
.game-list-grid .post-card { display: flex; flex-direction: column; }
.game-list-grid .post-card-body { display: flex; flex: 1; flex-direction: column; }
.game-list-grid .post-detail-link { margin-top: auto; }
.section-more { margin-top: 28px; text-align: center; }
.image-count { position: absolute; right: 12px; top: 12px; padding: 4px 8px; color: #fff; font-size: 12px; font-style: normal; border-radius: 999px; background: rgba(24,17,49,.62); backdrop-filter: blur(7px); }
.card-category-name { display: block; margin-bottom: 5px; color: var(--purple); font-size: 12px; font-weight: 700; }

.games-page { padding: 48px 0 70px; }
.games-page-head { display: grid; grid-template-columns: minmax(0,1fr) minmax(360px,.8fr); align-items: end; gap: 32px; margin-bottom: 24px; }
.games-page-head h1 { margin: 3px 0 5px; font-size: clamp(30px,4vw,46px); }
.games-page-head p { margin: 0; color: var(--muted); }
.games-search .search-box { width: 100%; }
.filter-panel { padding: 22px; border: 1px solid #e4e1ec; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.filter-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.filter-heading strong { font-size: 17px; }
.filter-heading span { color: var(--muted); font-size: 13px; }
.filter-panel .game-category-filter { margin-bottom: 0; }
.subcategory-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eeecf3; }
.subcategory-filter a { padding: 6px 12px; color: #777283; font-size: 13px; border-radius: 9px; background: #f4f2f8; }
.subcategory-filter a.active { color: #fff; background: var(--purple); }
.subcategory-filter small { margin-left: 5px; opacity: .72; }
.list-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin: 34px 0 18px; }
.list-heading h2 { margin: 0; font-size: 27px; }
.list-heading p { margin: 3px 0 0; color: var(--muted); }
.list-heading > a { color: var(--purple); font-size: 13px; }
.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 34px; }
.pagination a { min-width: 39px; min-height: 39px; display: inline-flex; justify-content: center; align-items: center; padding: 0 12px; border: 1px solid #dedbe8; border-radius: 10px; background: #fff; }
.pagination a.active { color: #fff; border-color: transparent; background: var(--purple); }
.empty-state .text-link { display: inline-block; margin-top: 14px; color: var(--purple); font-weight: 700; }

.rich-text h2,.rich-text h3,.rich-text h4 { margin: 1.35em 0 .55em; color: #252037; line-height: 1.35; }
.rich-text h2 { font-size: 27px; }
.rich-text h3 { font-size: 22px; }
.rich-text h4 { font-size: 18px; }
.rich-text p { margin: .65em 0; }
.rich-text ul,.rich-text ol { padding-left: 1.65em; }
.rich-text blockquote { margin: 1.2em 0; padding: 14px 18px; color: #675e79; border-left: 4px solid var(--purple); border-radius: 0 10px 10px 0; background: #f6f2ff; }
.rich-text figure { margin: 24px 0; text-align: center; }
.rich-text figure img,.rich-text > img { max-width: 100%; height: auto; margin: 0 auto; border-radius: 13px; box-shadow: 0 8px 27px rgba(27,21,66,.1); cursor: zoom-in; }
.rich-text figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; }
.rich-text table { width: 100%; margin: 20px 0; border-collapse: collapse; overflow: hidden; border-radius: 10px; }
.rich-text th,.rich-text td { padding: 10px 12px; border: 1px solid #dedbe8; text-align: left; }
.rich-text th { background: #f5f2fb; }
.rich-text pre { overflow: auto; padding: 16px; border-radius: 12px; background: #211d31; color: #ece9f6; }
.rich-text a { color: var(--purple); text-decoration: underline; }
.rich-text hr { margin: 28px 0; border: 0; border-top: 1px solid #e5e2ed; }

@media (max-width: 760px) {
  .games-page { padding-top: 28px; }
  .games-page-head { grid-template-columns: 1fr; gap: 18px; }
  .filter-heading,.list-heading { display: block; }
  .filter-heading span,.list-heading > a { display: block; margin-top: 5px; }
  .game-category-filter { gap: 8px; }
  .game-category-filter a { min-height: 38px; padding: 6px 10px; font-size: 13px; }
  .search-box { padding-right: 8px; }
  .search-box button { padding: 0 12px; }
}

/* v3: 富贵榜单 */
.rankings-page { padding: 52px 0 76px; }
.rankings-hero { max-width: 760px; margin: 0 auto 28px; text-align: center; }
.rankings-hero h1 { margin: 4px 0 8px; font-size: clamp(32px,5vw,48px); letter-spacing: -1.2px; }
.rankings-hero p { margin: 0; color: var(--muted); }
.ranking-tabs { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 22px; }
.ranking-tabs a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 11px 15px; color: #625d70; border: 1px solid #e2deea; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px rgba(29,22,65,.04); transition: .2s; }
.ranking-tabs a:hover { border-color: #cdb9f3; transform: translateY(-1px); }
.ranking-tabs a.active { color: #fff; border-color: transparent; background: linear-gradient(135deg,var(--purple),var(--purple-2)); box-shadow: 0 10px 25px rgba(122,56,239,.2); }
.ranking-tabs span { font-weight: 750; }
.ranking-tabs small { min-width: 27px; padding: 2px 7px; border-radius: 999px; color: #8e899b; text-align: center; background: #f1eef6; }
.ranking-tabs a.active small { color: #fff; background: rgba(255,255,255,.18); }
.ranking-panel { overflow: hidden; border: 1px solid #e4e1ea; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.ranking-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 24px 26px 20px; border-bottom: 1px solid #ece9f0; background: linear-gradient(180deg,#fff,#fcfbfe); }
.ranking-heading h2 { margin: 2px 0 0; font-size: 27px; }
.ranking-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.ranking-list { display: grid; }
.ranking-row { display: grid; grid-template-columns: 86px 64px minmax(0,1fr); align-items: center; gap: 18px; padding: 20px 26px; border-bottom: 1px solid #efedf3; }
.ranking-row:last-child { border-bottom: 0; }
.ranking-position { color: #8d869a; font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.ranking-row:nth-child(-n+3) .ranking-position { color: var(--purple); }
.ranking-avatar { width: 58px; height: 58px; overflow: hidden; display: grid; place-items: center; border: 1px solid #e4dfeb; border-radius: 50%; color: #887f98; background: #f4f1f8; }
.ranking-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ranking-avatar span { font-size: 24px; }
.ranking-copy { min-width: 0; }
.ranking-copy > strong { display: block; margin-bottom: 3px; font-size: 18px; }
.ranking-copy > p { margin: 0; color: #5f5a69; white-space: normal; }
.ranking-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; color: #94909d; font-size: 13px; }
.ranking-meta b { color: #5c5665; }
.ranking-meta a { color: var(--purple); font-weight: 700; }
.ranking-meta a:hover { text-decoration: underline; }
.ranking-meta i { font-style: normal; }
.ranking-empty { padding: 64px 24px; }

/* Large-image viewer: preserve original source pixels and prioritize wheel/pinch gestures. */
.lightbox-stage { overscroll-behavior: contain; }
.lightbox img { image-rendering: auto; -webkit-user-drag: none; }

@media (max-width: 760px) {
  .site-header { height: auto; }
  .header-inner { min-height: 58px; height: auto; grid-template-columns: 1fr; padding: 8px 0 0; }
  .brand { justify-self: center; }
  .top-nav { display: flex; width: 100%; justify-content: center; gap: 22px; margin-top: 7px; border-top: 1px solid rgba(224,221,232,.75); font-size: 13px; }
  .top-nav a { padding: 9px 0 10px; }
  .top-nav a.active::after { bottom: 3px; height: 2px; }
  .rankings-page { padding-top: 30px; }
  .ranking-tabs { grid-template-columns: repeat(2,1fr); gap: 9px; }
  .ranking-tabs a { min-height: 48px; padding: 8px 11px; font-size: 13px; }
  .ranking-heading { display: block; padding: 20px; }
  .ranking-heading p { margin-top: 5px; }
  .ranking-row { grid-template-columns: 56px 50px minmax(0,1fr); gap: 11px; padding: 17px 16px; }
  .ranking-avatar { width: 48px; height: 48px; }
  .ranking-position { font-size: 11px; }
  .ranking-copy > strong { font-size: 16px; }
  .ranking-copy > p { font-size: 14px; }
  .ranking-meta { display: grid; gap: 3px; }
}

@media (max-width: 430px) {
  .ranking-tabs { grid-template-columns: 1fr; }
  .ranking-row { grid-template-columns: 44px minmax(0,1fr); }
  .ranking-avatar { grid-row: 1 / span 2; grid-column: 1; }
  .ranking-position { grid-column: 2; }
  .ranking-copy { grid-column: 2; }
}
