/* 基础视觉变量：深色中性背景搭配青绿色强调色。 */
:root {
    color-scheme: dark;
    --bg: #0c1015;
    --panel: #141b23;
    --line: #27323e;
    --text: #ecf3f5;
    --muted: #a3b2bf;
    --accent: #9ceac5
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif
}

a {
    color: inherit;
    text-decoration: none
}

a:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px
}

header {
    max-width: 1280px;
    margin: auto;
    padding: 28px 40px;
    display: flex;
    gap: 40px;
    align-items: center;
    border-bottom: 1px solid var(--line)
}

.brand {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -1px
}

nav {
    display: flex;
    gap: 28px;
    color: var(--muted)
}

.languages {
    margin-left: auto;
    position: relative
}

.languages summary {
    cursor: pointer
}

.languages div {
    position: absolute;
    right: 0;
    top: 35px;
    z-index: 2;
    background: var(--panel);
    padding: 12px;
    min-width: 150px;
    border: 1px solid var(--line);
    border-radius: 12px
}

.languages a {
    display: block;
    padding: 10px
}

.languages a:hover,
[aria-current=true] {
    color: var(--accent)
}

main {
    max-width: 1280px;
    margin: auto;
    padding: 60px 40px;
    min-height: 75vh
}

.hero {
    padding: 35px 0 70px;
    max-width: 850px
}

.eyebrow {
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 3px
}

h1 {
    font-size: clamp(36px, 5vw, 68px);
    line-height: 1.12;
    letter-spacing: -2px;
    margin: 26px 0
}

p {
    color: var(--muted);
    line-height: 1.8;
    max-width: 650px
}

.hero p {
    font-size: 19px
}

.button {
    display: inline-flex;
    gap: 40px;
    background: var(--accent);
    color: #10231b;
    padding: 16px 22px;
    border-radius: 10px;
    margin-top: 22px;
    font-weight: 700
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px
}

article {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 16px;
    padding: 28px
}

h2 {
    font-size: 20px
}

.number {
    font-size: 13px;
    color: var(--accent)
}

footer {
    max-width: 1280px;
    margin: auto;
    padding: 28px 40px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 13px
}

/* 后台布局预览：与前台复用字体、颜色和基础组件。 */
.admin-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 60px
}

.admin-grid aside {
    border-right: 1px solid var(--line);
    padding-right: 30px
}

.admin-grid aside a {
    display: block;
    padding: 15px 12px;
    margin-top: 12px;
    color: var(--muted)
}

.admin-grid .active {
    background: var(--panel);
    border-radius: 10px;
    color: var(--accent)
}

.status {
    display: flex;
    gap: 18px;
    margin-top: 24px
}

.status h2 {
    margin-top: 0
}

.status p {
    margin-bottom: 0
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    margin-top: 7px;
    flex-shrink: 0
}

/* 移动端使用单列结构，避免导航和后台内容横向溢出。 */
@media(max-width:700px) {
    header {
        padding: 22px 20px;
        gap: 18px;
        flex-wrap: wrap
    }

    .brand {
        font-size: 20px
    }

    nav {
        order: 3;
        width: 100%;
        font-size: 14px
    }

    main {
        padding: 32px 20px
    }

    .hero {
        padding-top: 20px
    }

    .cards,
    .admin-grid {
        grid-template-columns: 1fr
    }

    .admin-grid {
        gap: 24px
    }

    .admin-grid aside {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-bottom: 20px
    }

    .admin-grid aside a {
        display: inline-block
    }

    footer {
        padding: 24px 20px;
        flex-direction: column
    }

    h1 {
        letter-spacing: -1px
    }
}

/* 游戏门户改版：沿用参考站的内容层级，以紫色、紧凑游戏卡片与平台侧栏呈现。 */
:root {
    --bg: #101015;
    --panel: #19191f;
    --line: #2a2933;
    --text: #f0eef6;
    --muted: #96939f;
    --accent: #aa8bff
}

body {
    background: radial-gradient(ellipse at 15% 0%, #201a322e, transparent 45%), var(--bg)
}

header {
    max-width: none;
    padding: 20px max(28px, calc((100vw - 1440px)/2));
    gap: 34px;
    background: #15151bd9;
    min-height: 80px
}

.brand {
    display: flex;
    align-items: center;
    white-space: nowrap;
    gap: 5px;
    font-size: 24px;
    letter-spacing: -.8px
}

/* 纯图形按原始32像素显示，旁边使用当前语言的网站名称，避免字标重复。 */
.brand {
    gap: 10px;
}

.brand-logo {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name {
    font-size: 24px;
    font-weight: 750;
    line-height: 1.2;
}

@media (max-width: 700px) {
    .brand-name {
        font-size: 21px;
    }
}

.brand-accent {
    color: var(--accent)
}

nav {
    font-size: 14px;
    white-space: nowrap
}

.search-box {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #202027;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 9px 13px;
    color: var(--muted);
    max-width: 260px
}

.search-box span {
    font-size: 24px;
    line-height: 20px
}

.search-box input {
    width: 100%;
    min-width: 0;
    background: none;
    border: 0;
    outline: none;
    color: var(--text);
    font: inherit;
    font-size: 13px
}

.languages {
    margin-left: 0;
    white-space: nowrap;
    font-size: 13px
}

.languages div {
    background: #23212c
}

main {
    max-width: 1440px;
    padding: 35px 28px 45px
}

.portal-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 28px
}

.portal-heading h1 {
    font-size: 30px;
    letter-spacing: -.6px;
    line-height: 1.4;
    margin: 10px 0
}

.portal-heading p {
    margin: 0;
    font-size: 14px
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px
}

.preview-label {
    font-size: 12px;
    color: var(--accent);
    border: 1px solid #70519a66;
    background: #a584ff0b;
    border-radius: 20px;
    padding: 8px 13px;
    white-space: nowrap
}

.portal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 28px
}

.genre-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 18px 21px;
    margin-bottom: 28px
}

h2 {
    font-size: 16px;
    margin: 0 0 17px
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 9px
}

.chip {
    font: inherit;
    font-size: 12px;
    background: #24232c;
    color: #bcb8c9;
    border: 1px solid transparent;
    border-radius: 7px;
    padding: 9px 16px;
    cursor: pointer
}

.chip:hover {
    border-color: #7862a6
}

.chip.selected {
    background: #8861df;
    color: white;
    box-shadow: 0 3px 12px #8056db25
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 25px 0 16px
}

.section-title h2 {
    margin: 0;
    font-size: 18px
}

.section-icon {
    color: var(--accent);
    margin-right: 5px
}

.section-title>span {
    font-size: 10px;
    letter-spacing: 1.3px;
    color: #77717f
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px
}

.game-card {
    padding: 0;
    overflow: hidden;
    border-radius: 11px;
    background: var(--panel);
    border: 1px solid var(--line);
    transition: transform .18s, border-color .18s
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: #7e62b0
}

.game-card[hidden] {
    display: none
}

.cover {
    height: 195px;
    position: relative;
    background: linear-gradient(145deg, #393244, #201e2c);
    padding: 12px
}

.cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 8px #0007)
}

.cover-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #17151dda;
    border: 1px solid #ffffff20;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .7px;
    padding: 4px 6px
}

.game-info {
    padding: 15px 13px;
    position: relative
}

.game-info h3 {
    font-size: 13px;
    line-height: 1.5;
    margin: 0 0 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.game-info>span {
    font-size: 11px;
    color: var(--muted)
}

.game-info .card-arrow {
    position: absolute;
    right: 12px;
    bottom: 15px;
    color: #8e7cae
}

.side-panel {
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--panel);
    padding: 20px;
    margin-bottom: 22px
}

.side-panel h2 {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 5px
}

.platform-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 0;
    font-size: 12px;
    border-bottom: 1px solid #26252c
}

.platform-row:last-child {
    border: 0;
    padding-bottom: 0
}

.platform-symbol {
    color: #ae96d5;
    background: #272230;
    border-radius: 6px;
    padding: 5px 8px
}

.chevron {
    margin-left: auto;
    color: #716b7b
}

.rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid #28262e
}

.rank-row:last-child {
    border: 0;
    padding-bottom: 0
}

.rank-row>b {
    font-size: 13px;
    color: var(--accent);
    font-style: italic
}

.rank-row img {
    width: 38px;
    height: 42px;
    object-fit: cover;
    border-radius: 5px
}

.rank-row h3 {
    font-size: 12px;
    margin: 0 0 5px;
    font-weight: 500
}

.rank-row small {
    font-size: 9px;
    letter-spacing: .8px;
    color: var(--muted)
}

.ad-placeholder {
    height: 120px;
    border: 1px dashed #3a3446;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #77717f;
    font-size: 12px
}

.ad-placeholder small {
    font-size: 10px
}

.sample-note {
    font-size: 11px;
    margin-top: 25px;
    color: #88808f
}

footer {
    max-width: 1384px;
    padding: 25px 0;
    font-size: 12px
}

.admin-grid h1 {
    font-size: 38px
}

.status {
    border-color: var(--line)
}

/* 中等屏幕压缩卡片列数；移动端将侧栏下移并保持搜索可用。 */
@media(min-width:1450px) {
    .cover {
        height: 225px
    }
}

@media(max-width:1100px) {
    header {
        gap: 22px
    }

    .portal-grid {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 20px
    }

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

    .cover {
        height: 210px
    }

    .search-box {
        max-width: 200px
    }

    footer {
        margin: 0 28px
    }
}

@media(max-width:700px) {
    header {
        padding: 18px 20px;
        gap: 16px
    }

    .brand {
        font-size: 21px
    }

    nav {
        order: 3;
        width: auto;
        margin-right: auto;
        font-size: 12px;
        gap: 20px
    }

    .search-box {
        order: 4;
        max-width: none;
        width: 100%;
        margin: 0
    }

    .languages {
        margin-left: auto
    }

    .portal-heading {
        gap: 12px;
        align-items: flex-start
    }

    .portal-heading h1 {
        font-size: 25px
    }

    .portal-heading p {
        font-size: 12px
    }

    .preview-label {
        padding: 6px 8px;
        font-size: 10px;
        margin-top: 8px
    }

    .portal-grid {
        grid-template-columns: 1fr
    }

    .portal-sidebar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0
    }

    .cover {
        height: 190px
    }

    .game-grid {
        gap: 12px
    }

    .genre-panel {
        padding: 16px
    }

    .chip {
        padding: 8px 12px
    }

    .section-title>span {
        font-size: 8px
    }

    .game-info h3 {
        font-size: 12px
    }

    .footer-links {
        line-height: 2
    }

    footer {
        margin: 0 20px
    }

    .portal-heading .eyebrow {
        font-size: 8px
    }
}

/* 收藏操作与独立页面：按钮保持可触达，空状态有清晰返回入口。 */
.favorite-button {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 36px;
    height: 36px;
    border: 1px solid #ffffff35;
    border-radius: 50%;
    background: #18151fe8;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center
}

.favorite-button:hover,
.favorite-button.is-favorite {
    color: #c6aaff;
    border-color: #a886ed;
    background: #30223f
}

.favorite-button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

.favorite-button:disabled {
    opacity: .4;
    cursor: wait
}

.favorite-count {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 6px;
    background: #292333;
    color: var(--accent);
    font-size: 10px
}

.favorites-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 25px
}

.favorites-empty {
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 65px 20px;
    margin: 30px 0
}

.favorites-empty>span {
    font-size: 54px;
    color: var(--accent)
}

.favorites-empty h2 {
    margin-top: 22px
}

.favorites-empty p {
    margin: 0 auto
}

.favorite-status {
    font-size: 13px;
    color: #f3b5bd
}

.favorite-status:empty {
    display: none
}

[hidden] {
    display: none !important
}

@media(max-width:900px) {
    .favorites-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    header {
        flex-wrap: wrap
    }

    nav {
        gap: 16px;
        font-size: 12px
    }
}

/* 语言切换使用防伪 POST 表单，按钮保持与原菜单一致的外观。 */
.languages form {
    margin: 0
}

.languages button {
    display: block;
    width: 100%;
    padding: 10px;
    background: none;
    border: 0;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer
}

.languages button:hover,
.languages button[aria-current=true] {
    color: var(--accent)
}

.languages button:focus-visible {
    outline: 2px solid var(--accent)
}

/* 管理员表单复用门户设计系统，错误与成功信息使用明确文字提示。 */
.auth-panel {
    max-width: 480px;
    margin: 24px auto 65px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel)
}

.auth-panel h1 {
    font-size: 30px;
    letter-spacing: -.5px
}

.auth-panel p {
    font-size: 13px
}

.auth-panel label {
    display: block;
    margin: 22px 0 9px;
    font-size: 13px
}

.auth-panel input {
    width: 100%;
    padding: 13px;
    border: 1px solid #3a3446;
    border-radius: 8px;
    background: #101015;
    color: var(--text);
    font: inherit
}

.auth-panel input:focus {
    outline: 2px solid var(--accent)
}

.auth-panel .button {
    border: 0;
    font: inherit;
    font-size: 14px;
    cursor: pointer
}

.auth-error {
    color: #ffb6bd !important;
    background: #50202a40;
    padding: 12px;
    border-radius: 8px
}

.auth-success {
    color: #a4e8b6 !important
}

.setup-link {
    display: block;
    margin-top: 25px;
    color: var(--accent);
    font-size: 13px
}

@media(max-width:700px) {
    .auth-panel {
        padding: 23px
    }
}

/* 网站信息表单：全局字段和翻译分区展示，窄屏保持单列。 */
.settings-content {
    min-width: 0
}

.settings-content h1 {
    font-size: 34px;
    letter-spacing: -.5px
}

.settings-form {
    max-width: 850px
}

.settings-section {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 13px;
    padding: 25px;
    margin: 24px 0
}

.settings-form label {
    display: block;
    margin: 21px 0 9px;
    font-size: 13px
}

.settings-form input:not([type=hidden]),
.settings-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #3a3446;
    border-radius: 8px;
    background: #101015;
    color: var(--text);
    font: inherit;
    font-size: 14px
}

.settings-form textarea {
    resize: vertical
}

.settings-form input:focus,
.settings-form textarea:focus {
    outline: 2px solid var(--accent)
}

.field-hint {
    font-size: 12px !important;
    line-height: 1.7;
    color: var(--muted)
}

.translation-block {
    padding: 16px 0;
    border-top: 1px solid var(--line);
    margin-top: 14px
}

.translation-block summary {
    cursor: pointer;
    font-size: 14px
}

.translation-block small {
    float: right;
    color: var(--muted)
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 15px 0
}

.settings-actions .button {
    margin: 0;
    cursor: pointer;
    border: 0;
    font: inherit;
    font-size: 14px
}

.settings-actions>a {
    font-size: 12px;
    color: var(--muted)
}

.contact-email {
    color: var(--accent);
    overflow-wrap: anywhere
}

footer {
    flex-wrap: wrap
}

.brand>span:last-child {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis
}

@media(max-width:700px) {
    .settings-section {
        padding: 18px
    }

    .settings-content h1 {
        font-size: 28px
    }

    .brand>span:last-child {
        max-width: 170px
    }
}

/* 分类管理列表和键位编辑，保持后台表单的统一视觉及窄屏横向滚动。 */
.taxonomy-toolbar {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 20px 0
}

.taxonomy-toolbar .button {
    margin: 0
}

.taxonomy-toolbar>a:last-child,
.back-link {
    font-size: 13px;
    color: var(--accent)
}

.taxonomy-search {
    display: flex;
    gap: 10px;
    margin: 20px 0
}

.taxonomy-search input,
.settings-form select {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #14131b;
    color: var(--text);
    font: inherit;
    font-size: 13px
}

.taxonomy-search input {
    width: min(100%, 340px)
}

.taxonomy-search button,
.row-actions button,
.text-button {
    background: #2b233c;
    border: 1px solid #55416f;
    border-radius: 7px;
    padding: 8px 13px;
    color: var(--accent);
    cursor: pointer;
    font: inherit;
    font-size: 12px
}

.table-scroll {
    overflow-x: auto
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.admin-table th {
    text-align: left;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    padding: 15px 12px;
    background: #1c1923
}

.admin-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--line)
}

.admin-table code {
    font-size: 11px;
    white-space: nowrap
}

.row-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    white-space: nowrap
}

.row-actions>a {
    color: var(--accent)
}

.state-badge {
    border: 1px solid var(--line);
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 11px
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 25px 0;
    font-size: 12px
}

.pagination a {
    color: var(--accent)
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 9px
}

.settings-form input[type=checkbox] {
    width: auto !important
}

.settings-form select {
    width: 100%
}

.controls-table input {
    min-width: 160px;
    padding: 8px !important;
    font-size: 12px !important
}

.controls-table td {
    padding: 10px
}

.settings-form input[type=checkbox] {
    accent-color: var(--accent)
}

/* 游戏管理文件信息与类型多选，长文件名和哈希不撑破页面。 */
.game-filter {
    flex-wrap: wrap
}

.game-filter select {
    max-width: 230px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text)
}

.row-slug {
    display: block;
    color: var(--muted);
    font-size: 10px;
    margin-top: 6px
}

.genre-checkboxes {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 24px 0;
    padding: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px
}

.genre-checkboxes legend {
    font-size: 13px;
    color: var(--muted)
}

.genre-checkboxes .checkbox-label {
    margin: 8px 0 !important
}

.game-image-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px
}

.asset-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    padding: 16px;
    background: #101015;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow-wrap: anywhere
}

.asset-info a {
    color: var(--accent);
    font-size: 13px
}

.asset-info small {
    color: var(--muted);
    font-size: 11px
}

.asset-info code {
    font-size: 10px;
    word-break: break-all
}

.asset-preview {
    display: block;
    width: 150px;
    height: 140px;
    object-fit: contain;
    margin-top: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #101015
}

.settings-form input[type=file] {
    font-size: 12px !important;
    overflow: hidden
}

.settings-form input::file-selector-button {
    background: #302442;
    color: var(--accent);
    border: 0;
    border-radius: 5px;
    padding: 7px;
    margin-right: 10px
}

@media(max-width:700px) {
    .game-image-fields {
        grid-template-columns: 1fr
    }

    .game-filter input,
    .game-filter select {
        max-width: none;
        width: 100%
    }
}

/* 真实游戏库及详情：复用门户卡片，筛选和播放器在窄屏下按阅读顺序排列。 */
.search-box button {
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer
}

.section-title>a {
    font-size: 12px;
    color: var(--accent)
}

.cover>a {
    display: block;
    width: 100%;
    height: 100%
}

.cover-badge {
    max-width: calc(100% - 58px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis
}

.library-empty {
    padding: 45px 20px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    text-align: center
}

.library-empty>span {
    font-size: 40px;
    color: var(--accent)
}

.library-empty h2 {
    margin: 15px 0
}

.library-empty p {
    margin: auto;
    font-size: 13px
}

.library-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    background: var(--panel);
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 0 0 28px
}

.library-filters label {
    flex: 1;
    min-width: 140px
}

.library-filters label>span {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 8px
}

.library-filters input,
.library-filters select {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #111016;
    color: var(--text);
    font: inherit;
    font-size: 13px
}

.library-filters button {
    align-self: flex-end;
    padding: 11px 22px;
    border: 0;
    border-radius: 7px;
    background: var(--accent);
    color: #191122;
    cursor: pointer
}

.ad-slot {
    min-height: 100px;
    margin: 24px 0;
    border: 1px dashed #332b3c;
    border-radius: 10px;
    position: relative;
    background: #16131d40
}

.ad-slot>small {
    position: absolute;
    top: 8px;
    left: 10px;
    color: #77707e;
    font-size: 9px;
    letter-spacing: 1px
}

.breadcrumbs {
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: var(--muted)
}

.breadcrumbs a:hover {
    color: var(--accent)
}

.game-detail-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px
}

.game-detail-heading h1 {
    font-size: 34px;
    margin: 10px 0 17px;
    letter-spacing: -.6px
}

.game-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

.game-tags a {
    padding: 6px 11px;
    background: #272030;
    border: 1px solid #453456;
    border-radius: 6px;
    color: #c7b4e5;
    font-size: 11px
}

.detail-favorite {
    border: 1px solid #66517e;
    background: #261e32;
    color: var(--accent);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    flex-shrink: 0
}

.detail-favorite.is-favorite {
    background: #4a315d
}

.game-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 28px
}

.player-shell {
    aspect-ratio: 4/3;
    position: relative;
    background: #0b0910;
    border: 1px solid #42324f;
    border-radius: 14px;
    overflow: hidden
}

.player-poster {
    width: 100%;
    height: 100%;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden
}

.player-poster>img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .18;
    filter: blur(3px)
}

.player-poster>div {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 15px
}

.player-poster>div>span {
    font-size: 12px;
    color: #c4b5d6;
    letter-spacing: 2px
}

.play-button {
    border: 1px solid #c0a2fc;
    background: #8f64df;
    color: white;
    border-radius: 14px;
    padding: 18px 40px;
    box-shadow: 0 10px 50px #8f64df30;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer
}

.play-button:hover {
    background: #a47bef
}

.player-poster p {
    font-size: 12px;
    text-align: center;
    padding: 0 20px;
    margin: 0
}

.player-shell iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0
}

.player-toolbar {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin: 12px 0 22px;
    font-size: 11px
}

.player-toolbar p {
    font-size: 11px;
    margin: 0 auto 0 0
}

.player-toolbar button {
    background: #2b2038;
    color: var(--accent);
    border: 1px solid #513c66;
    border-radius: 6px;
    padding: 7px 11px;
    cursor: pointer
}

.player-toolbar>a {
    color: var(--muted)
}

.game-section {
    padding: 26px 0;
    border-bottom: 1px solid var(--line)
}

.game-section>h2 {
    font-size: 19px;
    margin-bottom: 20px
}

.game-summary {
    font-size: 14px;
    white-space: pre-wrap;
    max-width: none;
    overflow-wrap: anywhere
}

.game-facts {
    font-size: 12px
}

.game-facts dt {
    color: var(--muted);
    margin-top: 17px
}

.game-facts dd {
    margin: 8px 0;
    color: var(--text)
}

/* 平台手柄与街机面板：全部标签来自与键位表相同的槽位，不使用固定FC图片。 */
.platform-controller {
    margin: 22px 0;
    padding: 16px 12px;
    border: 1px solid #51445f;
    border-radius: 32px;
    background: linear-gradient(145deg, #2d2638, #19171f);
    color: #c8b4ea;
}

.platform-controller--arcade {
    border-radius: 12px 12px 24px 24px;
    border-bottom: 6px solid #463852;
}

.platform-controller-body {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 12px;
    min-height: 90px;
}

.platform-dpad {
    font-size: 48px;
    line-height: 1;
}

.platform-face-buttons {
    display: grid;
    grid-auto-flow: column;
    gap: 5px;
}

.platform-face-buttons > span {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #5a397c;
    border: 1px solid #a186bc;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 3px 0 #100d16;
}

.platform-controller--arcade .platform-face-buttons > span:nth-child(4n+1) {
    background: #9d354f;
}

.platform-controller--arcade .platform-face-buttons > span:nth-child(4n+2) {
    background: #a88022;
}

.platform-controller--arcade .platform-face-buttons > span:nth-child(4n+3) {
    background: #327b68;
}

.platform-face-buttons--six {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 27px);
    gap: 9px 5px;
}

.platform-face-buttons--diamond {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 27px);
}

.platform-face-buttons--diamond > span:nth-child(1) {
    grid-column: 2;
}

.platform-face-buttons--diamond > span:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
}

.platform-face-buttons--diamond > span:nth-child(3) {
    grid-column: 3;
    grid-row: 2;
}

.platform-face-buttons--diamond > span:nth-child(4) {
    grid-column: 2;
    grid-row: 3;
}

.platform-system-buttons, .platform-shoulders {
    display: flex;
    justify-content: space-around;
    gap: 8px;
    font-size: 10px;
}

.platform-system-buttons > span {
    padding: 4px 8px;
    background: #111017;
    border-radius: 8px;
}

.platform-shoulders {
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.arcade-stick {
    position: relative;
    width: 55px;
    height: 62px;
    border-bottom: 9px solid #65516f;
    border-radius: 50%;
}

.arcade-stick::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 39px;
    background: linear-gradient(90deg, #888, #ddd, #666);
    left: 24px;
    top: 13px;
    transform: rotate(-12deg);
}

.arcade-stick > span {
    position: absolute;
    width: 30px;
    height: 30px;
    top: 0;
    left: 9px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #ef9ea8, #b13156 50%, #50192f);
    box-shadow: 0 3px 8px #0008;
}

.key-panel details {
    border-top: 1px solid var(--line);
    padding: 14px 0
}

.key-panel summary {
    font-size: 12px;
    cursor: pointer
}

.key-panel table {
    width: 100%;
    font-size: 10px;
    margin-top: 12px
}

.key-panel th {
    text-align: left;
    color: var(--muted);
    font-weight: 400;
    padding: 8px 0
}

.key-panel td {
    padding: 6px 0
}

.key-panel kbd {
    display: inline-block;
    padding: 4px 7px;
    background: #24202d;
    border: 1px solid #42374e;
    border-radius: 4px;
    font: 10px system-ui
}

.faq-section details {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 9px;
    margin: 12px 0;
    padding: 17px
}

.faq-section summary {
    cursor: pointer;
    font-size: 13px
}

.faq-section p {
    font-size: 12px;
    margin: 15px 0 0;
    max-width: none
}

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

.game-detail-grid .cover {
    height: 160px
}

.game-info>span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 90%
}

.brand {
    flex-shrink: 0
}

@media(max-width:1100px) {
    .game-detail-grid {
        grid-template-columns: minmax(0, 1fr) 240px;
        gap: 20px
    }

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

    .game-detail-grid .cover {
        height: 180px
    }
}

@media(max-width:760px) {
    .game-detail-grid {
        grid-template-columns: 1fr
    }

    .game-detail-grid>aside {
        order: 0
    }

    .game-detail-heading h1 {
        font-size: 27px
    }

    .player-shell {
        aspect-ratio: 4/3
    }

    .game-detail-grid .cover {
        height: 190px
    }

    .library-filters {
        padding: 16px
    }

    .library-filters label {
        min-width: 120px
    }

    .library-filters button {
        width: 100%
    }

    .player-toolbar>a {
        font-size: 10px
    }

    .game-section {
        padding: 22px 0
    }

    .search-box button {
        padding: 0
    }

    .game-detail-grid>div {
        min-width: 0
    }
}

/* 攻略沿用门户深色视觉；正文控制阅读行长，目录在宽屏独立固定。 */
.guide-library {
    padding: 32px 0
}

.guide-library h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin: 12px 0
}

.guide-lead {
    color: #b6b2ca;
    font-size: 1.08rem;
    line-height: 1.8;
    max-width: 760px
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 26px 0
}

.guide-card {
    background: #181625;
    border: 1px solid #302b44;
    border-radius: 18px;
    overflow: hidden;
    transition: transform .18s, border-color .18s;
    min-width: 0
}

.guide-card:hover {
    transform: translateY(-3px);
    border-color: #9475ed
}

.guide-card-image {
    display: block;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #211e32
}

.guide-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.guide-card-image span {
    position: absolute;
    left: 16px;
    bottom: 14px;
    background: #201936e8;
    border: 1px solid #a58acb66;
    border-radius: 30px;
    padding: 5px 12px;
    font-size: .75rem
}

.guide-card>div {
    padding: 22px
}

.guide-card small {
    color: #b49be7
}

.guide-card h2 {
    font-size: 1.25rem;
    line-height: 1.45;
    margin: 10px 0
}

.guide-card h2 a {
    color: #f3efff
}

.guide-card p {
    color: #a9a5bb;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.7;
    min-height: 3.4em
}

.guide-read {
    display: inline-block;
    margin-top: 10px;
    color: #c7acff
}

.guide-empty {
    padding: 72px 24px;
    text-align: center;
    background: #181625;
    border: 1px solid #302b44;
    border-radius: 20px;
    margin-top: 24px
}

.guide-breadcrumb {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 28px 0;
    color: #9f96b6;
    font-size: .9rem
}

.guide-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 800px) minmax(200px, 280px);
    gap: 48px;
    justify-content: center;
    padding: 16px 0 50px
}

.guide-article {
    min-width: 0
}

.guide-article h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.25;
    letter-spacing: -.03em;
    overflow-wrap: anywhere
}

.guide-date {
    font-size: .85rem;
    color: #918aa4;
    margin: 22px 0
}

.guide-hero {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    border-radius: 16px;
    margin: 8px 0 26px
}

.guide-toc {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border: 1px solid #353047;
    border-radius: 16px;
    background: #181625;
    max-height: calc(100vh - 48px);
    overflow: auto
}

.guide-toc a {
    font-size: .9rem;
    line-height: 1.6;
    overflow-wrap: anywhere
}

.guide-toc-level-3,
.guide-toc-level-4 {
    padding-left: 12px
}

.guide-prose {
    line-height: 1.9;
    color: #d2cede;
    overflow-wrap: anywhere;
    font-size: 1rem
}

.guide-prose h2,
.guide-prose h3,
.guide-prose h4 {
    color: #f5f0ff;
    line-height: 1.4;
    margin: 1.8em 0 .65em;
    scroll-margin-top: 24px
}

.guide-prose h2 {
    font-size: 1.65rem
}

.guide-prose h3 {
    font-size: 1.3rem
}

.guide-prose p {
    margin: 1em 0
}

.guide-prose a {
    color: #bda0ff;
    text-decoration: underline;
    text-underline-offset: 3px
}

.guide-prose img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    margin: 20px auto
}

.guide-prose ul,
.guide-prose ol {
    padding-left: 1.6em
}

.guide-prose blockquote {
    margin: 24px 0;
    padding: 12px 22px;
    background: #251f37;
    border-left: 3px solid #a67bf8;
    border-radius: 0 12px 12px 0
}

.guide-prose pre {
    max-width: 100%;
    overflow: auto;
    background: #100f19;
    padding: 20px;
    border: 1px solid #302b44;
    border-radius: 12px;
    line-height: 1.6
}

.guide-prose code {
    font-size: .9em;
    background: #292339;
    border-radius: 4px;
    padding: 2px 5px
}

.guide-prose pre code {
    padding: 0;
    background: none
}

.guide-prose table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
    border-collapse: collapse;
    margin: 24px 0
}

.guide-prose td,
.guide-prose th {
    padding: 12px 16px;
    border: 1px solid #3d3452;
    text-align: left
}

.guide-prose th {
    background: #272035
}

.guide-prose hr {
    border: 0;
    border-top: 1px solid #393146;
    margin: 32px 0
}

.guide-language {
    padding: 18px;
    background: #191625;
    border: 1px solid #332c46;
    border-radius: 12px;
    margin: 18px 0
}

.guide-language summary {
    cursor: pointer;
    font-weight: 700
}

.guide-language label {
    display: block;
    margin: 16px 0
}

.guide-language textarea {
    width: 100%;
    font-family: inherit;
    line-height: 1.65
}

.guide-tools {
    margin-top: 28px;
    padding: 24px;
    border: 1px solid #3a3051;
    border-radius: 16px;
    min-width: 0
}

.guide-tools>button {
    margin: 12px 0
}

.guide-tools #guide-preview-body:not(:empty) {
    padding: 24px;
    background: #161321;
    border-radius: 12px;
    margin: 20px 0
}

.guide-image-library {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.guide-image-library button {
    padding: 4px;
    background: #211b30;
    border: 1px solid #514268;
    border-radius: 8px;
    cursor: pointer
}

.guide-image-library img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    display: block
}

.guide-editor-cover {
    max-width: 260px;
    max-height: 180px;
    object-fit: contain
}

.guide-language input[type=checkbox] {
    width: auto
}

.guide-tools input[type=file] {
    max-width: 100%
}

@media(max-width:1000px) {
    .guide-article-layout {
        grid-template-columns: minmax(0, 1fr) 220px;
        gap: 24px
    }

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

@media(max-width:700px) {
    .guide-article-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 24px
    }

    .guide-aside {
        width: 100%
    }

    .guide-toc {
        position: static;
        max-height: 240px
    }

    .guide-grid {
        grid-template-columns: 1fr
    }

    .guide-article h1 {
        font-size: 2rem
    }

    .guide-tools {
        padding: 16px
    }

    .guide-library {
        padding-top: 20px
    }
}

/* 金手指代码保持等宽和原始换行，长行在代码区滚动，不撑开手机页面。 */
.cheat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 24px 0
}

.cheat-card {
    min-width: 0;
    padding: 24px;
    border: 1px solid #383047;
    border-radius: 16px;
    background: linear-gradient(145deg, #201a2d, #17151f);
    scroll-margin-top: 24px
}

.cheat-card h3 {
    font-size: 1.3rem;
    margin: 18px 0 12px
}

.cheat-card-top,
.cheat-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap
}

.cheat-card-top a {
    font-size: .85rem;
    color: #bda4ed
}

.cheat-card-top span {
    padding: 5px 10px;
    background: #302344;
    border: 1px solid #584069;
    border-radius: 20px;
    font-size: .75rem;
    overflow-wrap: anywhere
}

.cheat-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: #b4adbf;
    line-height: 1.8;
    min-height: 3em
}

.cheat-card pre {
    overflow: auto;
    max-width: 100%;
    padding: 18px;
    background: #100e18;
    border: 1px solid #3a2e4d;
    border-radius: 10px;
    line-height: 1.8;
    font-size: 1rem;
    color: #d7c7ff
}

.cheat-card-bottom small {
    font-size: .75rem;
    color: #978da6
}

.cheat-card-bottom .button {
    padding: 9px 16px;
    font-size: .85rem
}

.cheat-code-input {
    font-family: ui-monospace, monospace !important
}

#cheat-copy-status {
    color: #cdb2ff;
    min-height: 1.5em
}

@media(max-width:700px) {
    .cheat-grid {
        grid-template-columns: minmax(0, 1fr)
    }

    .cheat-card {
        padding: 18px
    }
}

/* 字段错误紧邻输入，使用清晰的对比色，避免只显示笼统摘要。 */
.field-error {
    display: block;
    color: #ffadb8;
    font-size: .85rem;
    line-height: 1.65;
    margin-top: 7px
}

.field-error:empty {
    display: none
}

/* 评论以轻量列表和独立提交表单展示，长文本不撑开游戏布局。 */
.comments-panel {
    border-top: 1px solid #332a42;
    padding-top: 28px
}

.comments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.comments-heading h2 {
    margin: 0
}

.comments-heading h2 span {
    display: inline-block;
    margin-left: 8px;
    padding: 3px 10px;
    border-radius: 20px;
    background: #302444;
    color: #c3a2f3;
    font-size: .8rem;
    vertical-align: middle
}

.comments-heading>small {
    color: #9b8cae
}

.comments-empty {
    padding: 24px;
    border: 1px dashed #463653;
    border-radius: 12px;
    color: #aaa0b7;
    background: #191520
}

.comment-item {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 14px;
    padding: 24px 0;
    border-bottom: 1px solid #2f283c;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important
}

.comment-avatar {
    height: 40px;
    width: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #352349;
    color: #d9b8ff;
    overflow: hidden;
    font-weight: 700
}

.comment-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center
}

.comment-meta time {
    font-size: .75rem;
    color: #94899e
}

.comment-item p,
.comment-full-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.8
}

.comment-item p {
    color: #c9c0d4;
    margin: 10px 0 0
}

.comment-form {
    padding: 24px;
    margin-top: 28px;
    border: 1px solid #3a2e4a;
    background: #19151f;
    border-radius: 16px;
    position: relative
}

.comment-form h3 {
    margin-top: 0
}

.comment-form label {
    display: block;
    margin: 18px 0 8px;
    font-size: .9rem
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #45374f;
    background: #110e18;
    color: #e6dcf0;
    border-radius: 8px;
    font: inherit;
    line-height: 1.6
}

.comment-form textarea {
    resize: vertical;
    min-height: 140px
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: 2px solid #a485e8;
    outline-offset: 2px
}

.comment-form .comment-honey {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden
}

.comment-feedback {
    min-height: 1.5em;
    line-height: 1.7;
    color: #ffb4c0;
    overflow-wrap: anywhere
}

.comment-feedback.comment-success {
    color: #abdabb
}

.comment-excerpt {
    max-width: 480px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.6
}

.comment-audit {
    padding: 18px 20px;
    margin: 16px 0;
    background: #19151f;
    border: 1px solid #392c48;
    border-radius: 12px
}

.comment-audit small {
    margin-left: 16px;
    color: #a398ae
}

.comment-audit p {
    margin: 12px 0 0
}

@media(max-width:650px) {
    .comment-form {
        padding: 18px
    }

    .comment-item {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px
    }

    .comment-avatar {
        width: 32px;
        height: 32px
    }

    .comments-heading {
        align-items: flex-start
    }
}

/* 评论语言筛选与每条评论的语言标记。 */
.comment-scope {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px;
    background: #15111d;
    border: 1px solid #3a2d48;
    border-radius: 12px
}

.comment-scope a {
    padding: 7px 12px;
    border-radius: 8px;
    font-size: .8rem;
    color: #afa3bb
}

.comment-scope a.active {
    background: #3c2856;
    color: #e2c5ff
}

.comment-language {
    padding: 2px 8px;
    background: #2b203a;
    border-radius: 12px;
    color: #c2a7e5;
    font-size: .7rem
}

.comments-empty a {
    display: inline-block;
    margin-left: 12px;
    color: #c7a5ff
}

@media(max-width:650px) {
    .comments-heading {
        flex-wrap: wrap
    }
}

/* 联系留言沿用深色门户视觉，双栏强调私密反馈入口，手机按单栏阅读。 */
.contact-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 0 56px
}

.contact-heading {
    max-width: 780px;
    margin-bottom: 34px
}

.contact-heading h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.2;
    margin: 14px 0 18px;
    letter-spacing: -.03em
}

.contact-heading>p {
    font-size: 1.1rem;
    color: #b8aec6;
    line-height: 1.8
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    gap: 28px;
    align-items: start
}

.contact-form {
    position: relative;
    padding: 30px;
    border: 1px solid #40314e;
    border-radius: 20px;
    background: linear-gradient(145deg, #21192e, #17131f);
    min-width: 0
}

.contact-form h2 {
    margin: 0 0 24px;
    font-size: 1.4rem
}

.contact-form label {
    display: block;
    font-size: .9rem;
    margin: 18px 0 9px
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #453650;
    background: #110e18;
    color: #eee4f8;
    border-radius: 9px;
    font: inherit;
    line-height: 1.6
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: 2px solid #a58adf;
    outline-offset: 2px
}

.contact-form textarea {
    resize: vertical;
    min-height: 180px
}

.contact-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px
}

.contact-fields label {
    margin-top: 0
}

.contact-form .message-honey {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden
}

.contact-aside {
    display: flex;
    flex-direction: column;
    gap: 20px
}

.contact-aside section {
    padding: 26px;
    border: 1px solid #362b43;
    border-radius: 16px;
    background: #19151f
}

.contact-aside h2 {
    font-size: 1.1rem;
    margin: 16px 0 12px
}

.contact-aside p {
    color: #afa4bd;
    line-height: 1.8;
    font-size: .92rem
}

.contact-aside a {
    display: block;
    color: #c8a9fa;
    margin-top: 16px;
    font-size: .9rem
}

.contact-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    background: #39264c;
    border-radius: 13px;
    color: #d9b7ff;
    font-size: 1.6rem
}

.message-feedback {
    min-height: 1.6em;
    color: #ffb4c0;
    line-height: 1.7;
    overflow-wrap: anywhere
}

.message-feedback.message-success {
    color: #abdabb
}

.message-detail-facts {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px 20px;
    line-height: 1.7
}

.message-detail-facts dt {
    color: #a99ab8
}

.message-detail-facts dd {
    margin: 0;
    overflow-wrap: anywhere
}

.message-filters {
    flex-wrap: wrap
}

@media(max-width:800px) {
    .contact-grid {
        grid-template-columns: minmax(0, 1fr)
    }

    .contact-aside {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:550px) {
    .contact-page {
        padding-top: 24px
    }

    .contact-form {
        padding: 20px
    }

    .contact-fields,
    .contact-aside {
        grid-template-columns: minmax(0, 1fr)
    }

    .contact-fields {
        gap: 0
    }

    .contact-fields label {
        margin-top: 18px
    }

    .message-detail-facts {
        grid-template-columns: 1fr;
        gap: 4px
    }

    .message-detail-facts dd {
        margin-bottom: 12px
    }
}

/* FAQ帮助中心和游戏内问答共用折叠列表，纯文本回答保留段落换行。 */
.faq-library {
    max-width: 960px;
    margin: 0 auto;
    padding: 36px 0 56px
}

.faq-library h1 {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    margin: 14px 0 18px;
    line-height: 1.2
}

.faq-search {
    margin: 28px 0
}

.faq-items details {
    scroll-margin-top: 24px
}

.faq-items details {
    padding: 20px 22px;
    border-radius: 13px
}

.faq-items summary {
    overflow-wrap: anywhere;
    font-size: 1rem;
    line-height: 1.6
}

.faq-answer {
    padding: 16px 0 0;
    font-size: .95rem;
    white-space: pre-wrap;
    color: #bcb1cb;
    line-height: 1.85;
    overflow-wrap: anywhere
}

.faq-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap
}

.faq-panel-heading>a {
    font-size: .85rem;
    color: #bca0e8
}

.faq-empty {
    padding: 32px 24px;
    margin: 24px 0;
    border: 1px dashed #44324f;
    border-radius: 14px;
    background: #19151f;
    color: #b0a3bd
}

.faq-contact {
    margin-top: 36px;
    padding: 28px;
    border: 1px solid #3d2d4c;
    border-radius: 18px;
    background: linear-gradient(120deg, #271a37, #18141f)
}

.faq-contact h2 {
    margin-top: 0;
    font-size: 1.35rem
}

.faq-contact p {
    line-height: 1.8;
    color: #b7abc5
}

.faq-contact .button {
    display: inline-block;
    margin-top: 10px
}

@media(max-width:650px) {
    .faq-library {
        padding-top: 24px
    }

    .faq-answer {
        padding: 14px 0 0
    }

    .faq-contact {
        padding: 22px
    }
}

/* 隐私政策控制正文阅读宽度，沿用安全Markdown排版与目录。 */
.policy-layout {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 820px) minmax(210px, 280px);
    gap: 40px;
    padding: 48px 0 60px
}

.policy-article {
    min-width: 0
}

.policy-article h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
    margin: 14px 0 20px;
    overflow-wrap: anywhere
}

.policy-summary {
    white-space: pre-wrap
}

.policy-preview {
    margin-top: 32px;
    padding: 24px;
    border: 1px solid #3c2f4c;
    border-radius: 16px;
    background: #19151f
}

.policy-preview label {
    display: block;
    margin: 16px 0 8px
}

.policy-preview select {
    padding: 10px 14px;
    background: #120e1b;
    color: #eee3fa;
    border: 1px solid #483454;
    border-radius: 8px;
    margin-right: 12px
}

.policy-preview .guide-prose:not(:empty) {
    padding: 22px;
    margin-top: 20px;
    background: #110e18;
    border-radius: 12px
}

.policy-unavailable {
    max-width: 820px;
    margin: 40px auto;
    padding: 36px;
    border: 1px solid #3c2c4b;
    border-radius: 18px;
    background: #1b1524
}

.policy-unavailable h1 {
    font-size: 2.1rem;
    line-height: 1.35
}

.policy-unavailable p {
    line-height: 1.9;
    color: #b8aac7
}

.policy-unavailable .button {
    display: inline-block;
    margin-top: 16px
}

@media(max-width:800px) {
    .policy-layout {
        display: flex;
        flex-direction: column-reverse;
        gap: 24px;
        padding-top: 28px
    }

    .policy-aside .guide-toc {
        position: static;
        max-height: 220px
    }

    .policy-unavailable {
        padding: 24px
    }

    .policy-preview {
        padding: 18px
    }
}

/* 多语言词条列表、默认文案与覆盖状态，长文本不挤压表格布局。 */
.translation-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 24px 0
}

.translation-stats>span {
    padding: 12px 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    font-size: 13px
}

.translation-stats strong {
    margin-left: 8px;
    color: var(--text)
}

.translation-search {
    flex-wrap: wrap;
    align-items: center
}

.translation-search label,
.translation-search>a {
    font-size: 13px;
    color: var(--muted)
}

.translation-value {
    min-width: 160px;
    max-width: 360px;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.translation-locale {
    display: inline-block;
    padding: 3px 5px;
    margin: 3px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 10px
}

.translation-locale.is-custom {
    color: var(--accent);
    border-color: #695193;
    background: #30233e
}

.translation-edit-link {
    color: var(--accent);
    white-space: nowrap
}

.translation-default {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    background: #15121b;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    line-height: 1.8;
    font-size: 13px
}

.translation-search input[type=checkbox] {
    width: auto;
    accent-color: var(--accent)
}

/* 统一广告组件：广告标识、独立脚本框及可关闭漂浮容器，不覆盖播放器操作层。 */
.ad-slot {
    padding: 30px 16px 16px;
    border-style: solid;
    background: #19151f;
    overflow: hidden
}

.ad-banner {
    display: flex;
    align-items: center;
    gap: 18px
}

.ad-banner img {
    display: block;
    max-width: 100%;
    width: 180px;
    max-height: 220px;
    object-fit: contain;
    border-radius: 8px
}

.ad-banner>div {
    min-width: 0
}

.ad-banner h3 {
    font-size: 16px;
    margin: 0 0 10px;
    overflow-wrap: anywhere
}

.ad-banner p {
    font-size: 13px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    margin: 0 0 12px;
    line-height: 1.7
}

.ad-banner a {
    font-size: 12px;
    color: var(--accent)
}

.ad-frame {
    display: block;
    width: 100%;
    border: 0;
    background: transparent
}

.portal-sidebar .ad-banner,
.game-detail-grid>aside .ad-banner {
    flex-direction: column;
    align-items: flex-start
}

.ad-floating {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 320px;
    max-width: calc(100vw - 32px);
    max-height: 45vh;
    overflow: auto;
    z-index: 30;
    box-shadow: 0 15px 50px #0008;
    margin: 0;
    border-color: #57416f
}

.ad-floating .ad-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px
}

.ad-floating img {
    max-height: 140px;
    width: auto
}

.ad-close {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #372a47;
    color: #eee;
    cursor: pointer;
    font-size: 20px;
    line-height: 1
}

.ad-close:focus-visible {
    outline: 2px solid var(--accent)
}

@media(max-width:760px) {
    .ad-floating {
        width: 220px;
        max-height: 35vh;
        right: 8px;
        bottom: 8px
    }

    .ad-floating img {
        max-height: 90px
    }

    .ad-banner {
        flex-direction: column;
        align-items: flex-start
    }
}

/* 后台聚合统计以轻量服务端卡片和可访问数据表展示，无第三方图表脚本。 */
.stats-filters {
    margin-top: 24px
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px
}

.stats-cards article {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    min-width: 0
}

.stats-cards span,
.stats-cards a {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.6
}

.stats-cards strong {
    display: block;
    font-size: 32px;
    letter-spacing: -1px;
    margin-top: 14px;
    color: var(--text)
}

.stats-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px;
    margin: 22px 0;
    min-width: 0
}

.stats-panel h2 {
    font-size: 18px;
    margin: 0 0 16px
}

.stats-legend {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--muted)
}

.stats-legend span:before {
    content: '';
    display: inline-block;
    width: 9px;
    height: 9px;
    background: #a78bfa;
    border-radius: 3px;
    margin-right: 7px
}

.stats-legend span+span:before {
    background: #50cfb5
}

.stats-chart-scroll {
    overflow-x: auto
}

.stats-bars {
    min-width: 420px;
    height: 200px;
    display: flex;
    align-items: stretch;
    gap: 4px;
    padding-top: 20px;
    margin-top: 18px;
    border-bottom: 1px solid var(--line)
}

.stats-bar-pair {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    flex: 1;
    min-width: 3px
}

.stats-bar-pair i {
    display: block;
    width: 42%;
    min-width: 1px;
    background: #a78bfa;
    border-radius: 3px 3px 0 0
}

.stats-bar-pair i+i {
    background: #50cfb5
}

.stats-daily {
    margin-top: 20px
}

.stats-daily summary {
    font-size: 12px;
    color: var(--accent);
    cursor: pointer
}

.stats-columns {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px
}

.stats-columns .stats-panel {
    margin-top: 0
}

.stats-panel a {
    color: var(--accent)
}

.stats-category-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap
}

.stats-category-grid>span {
    font-size: 12px;
    color: var(--muted);
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 8px
}

.stats-category-grid strong {
    color: var(--text);
    margin-left: 10px
}

@media(max-width:1100px) {
    .stats-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }

    .stats-columns {
        grid-template-columns: 1fr
    }
}

@media(max-width:600px) {
    .stats-panel {
        padding: 16px
    }

    .stats-cards article {
        padding: 15px
    }

    .stats-cards strong {
        font-size: 27px
    }
}

/* 平台分享采用本站SVG图标，微信展开二维码，不依赖外部图标或分享SDK。 */
.game-share {
    margin: 22px 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 13px
}

.share-icon-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap
}

.game-share .share-icon-row h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .3px
}

.share-platforms {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap
}

.game-share .share-icon {
    --share-eye: #19161f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 9px;
    border: 1px solid #3b3346;
    border-radius: 50%;
    background: #211b2b;
    color: #b7a9c8;
    text-decoration: none;
    cursor: pointer;
    transition: background .16s, border-color .16s, transform .16s
}

.share-symbol {
    display: block;
    width: 20px;
    height: 20px;
    flex: none
}

.game-share .share-icon-wechat {
    color: #59d787
}

.game-share .share-icon-x {
    color: #f0eaf7
}

.game-share .share-icon-telegram {
    color: #66bdf1
}

.game-share .share-icon-whatsapp {
    color: #62d59a
}

.game-share .share-icon-link {
    color: #c2a2ff
}

.game-share .share-icon:hover:not(:disabled) {
    background: #34283f;
    border-color: #88709e;
    transform: translateY(-2px)
}

.game-share .share-icon:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px
}

.game-share .share-icon:disabled {
    opacity: .35;
    cursor: default
}

.share-icon[hidden] {
    display: none !important
}

.share-link-label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px
}

.share-link-label input {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 11px;
    border: 1px solid #41354e;
    border-radius: 8px;
    background: #100d16;
    color: var(--text);
    font: 12px system-ui
}

.share-status {
    font-size: 12px;
    line-height: 1.7;
    margin: 12px 0 0
}

.share-status:empty {
    display: none
}

.share-qr {
    margin-top: 15px;
    font-size: 12px
}

.share-qr summary,
.share-link-tools summary {
    cursor: pointer;
    color: var(--accent);
    font-size: 11px
}

.share-qr[open] {
    border-top: 1px solid var(--line);
    padding-top: 14px
}

.share-qr:not([open]):has(summary[hidden]) {
    margin-top: 0
}

.share-qr>div {
    margin-top: 12px
}

.share-qr h3 {
    font-size: 14px;
    margin: 0 0 12px
}

.share-qr img {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    background: #fff;
    border: 8px solid #fff;
    border-radius: 8px;
    image-rendering: pixelated
}

.share-qr a,
.game-share a {
    color: var(--accent);
    font-size: 12px
}

.share-qr p {
    max-width: 430px
}

.share-link-tools {
    margin-top: 12px
}

.game-share>.field-hint {
    margin: 10px 0 0
}

.share-qr summary[hidden] {
    display: none
}

@media(max-width:600px) {
    .share-icon-row {
        gap: 12px
    }

    .share-platforms {
        gap: 7px
    }

    .game-share .share-icon {
        width: 36px;
        height: 36px;
        padding: 8px
    }
}

/* 当前页全屏容器保留原iframe与底部退出控制；兼容放大仅改变CSS，不重新加载游戏。 */
.game-player {
    min-width: 0
}

.player-view-status {
    font-size: 11px;
    color: var(--muted);
    margin: 0
}

.player-view-status:empty {
    display: none
}

#fullscreen-game {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.game-player:fullscreen,
.game-player.is-expanded {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 10px;
    background: #09070e;
    box-sizing: border-box
}

.game-player.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 1000
}

.game-player:fullscreen .player-shell,
.game-player.is-expanded .player-shell {
    flex: 1;
    min-height: 0;
    width: 100%;
    aspect-ratio: auto;
    border-radius: 8px
}

.game-player:fullscreen .player-toolbar,
.game-player.is-expanded .player-toolbar {
    flex: none;
    margin: 8px 0 0;
    min-height: 34px
}

.game-player:fullscreen .player-view-status,
.game-player.is-expanded .player-view-status {
    flex: none;
    margin: 5px 0 0
}

.player-expanded,
.player-expanded body {
    overflow: hidden !important
}

@media(max-width:600px) {

    .game-player:fullscreen,
    .game-player.is-expanded {
        padding: env(safe-area-inset-top, 6px) env(safe-area-inset-right, 6px) env(safe-area-inset-bottom, 6px) env(safe-area-inset-left, 6px)
    }

    .game-player:fullscreen .player-toolbar,
    .game-player.is-expanded .player-toolbar {
        gap: 8px
    }

    .game-player:fullscreen .player-toolbar p,
    .game-player.is-expanded .player-toolbar p {
        flex-basis: 100%;
        margin-bottom: 2px
    }
}

/* 游戏卡片名称下保留两行简介高度；移动端随卡片宽度重新截断，不撑破网格。 */
.game-card .card-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: anywhere;
    white-space: normal;
    font-size: 12px;
    line-height: 1.65;
    height: 3.3em;
    max-height: 3.3em;
    margin: 0 0 11px;
    color: var(--muted);
    max-width: 100%
}

.game-card .game-info {
    min-width: 0
}

/* 首页内容发现：精选强调人工策展，攻略保持短卡片，空区块由服务端隐藏。 */
.home-featured {
    padding: 18px;
    border: 1px solid #534063;
    border-radius: 15px;
    background: linear-gradient(125deg, #292033aa, #19191f);
    margin-bottom: 28px
}

.home-featured>.section-title {
    margin: 0 0 18px
}

.home-featured .eyebrow {
    font-size: 9px;
    letter-spacing: 1.8px
}

.home-featured h2 {
    margin-top: 6px
}

.home-guides {
    margin: 30px 0
}

.home-guides .guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px
}

.home-guides .guide-card-image {
    height: 140px;
    aspect-ratio: auto
}

.home-guides .guide-card>div {
    padding: 15px
}

.home-guides .guide-card h2 {
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    max-height: 3.2em;
    margin: 9px 0
}

.home-guides .guide-card p {
    font-size: 12px;
    -webkit-line-clamp: 2;
    max-height: 3.4em
}

.home-guides .guide-card small {
    font-size: 10px
}

@media(max-width:1100px) {
    .home-guides .guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:600px) {
    .home-featured {
        padding: 13px
    }

    .home-guides .guide-grid {
        grid-template-columns: 1fr
    }

    .home-guides .guide-card-image {
        height: 180px
    }
}

/* 页脚版权与导航统一居中，链接在窄屏自然换行。 */
footer {
    max-width: 1384px;
    margin: 0 auto;
    padding: 26px 28px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 20px;
    line-height: 1.8
}

@media(max-width:600px) {
    footer {
        padding: 22px 20px
    }

    .footer-links {
        gap: 6px 16px
    }
}

/* 首页底部FAQ复用全站折叠问答，桌面两列、手机单列，长回答自动换行。 */
.home-faq {
    margin-top: 40px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(120deg, #201b2b66, var(--panel))
}

.home-faq .faq-panel-heading {
    margin-bottom: 20px
}

.home-faq h2 {
    font-size: 21px;
    margin: 0 0 10px
}

.home-faq .faq-panel-heading p {
    margin: 0;
    font-size: 13px;
    line-height: 1.7
}

.home-faq .faq-items {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start
}

.home-faq .faq-items details {
    margin: 0;
    background: #17151e
}

.home-faq .faq-items summary {
    font-size: 14px;
    line-height: 1.7
}

.home-faq .faq-answer {
    font-size: 13px;
    line-height: 1.85
}

@media(max-width:760px) {
    .home-faq {
        padding: 20px 16px;
        margin-top: 28px
    }

    .home-faq .faq-items {
        grid-template-columns: 1fr
    }
}

/* 收藏本站：星形描边图标和原生展开指引，不抢占页面焦点。 */
.bookmark-site {
    position: relative;
    flex-shrink: 0;
}

.bookmark-site > summary {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    color: var(--muted);
}

.bookmark-site > summary::-webkit-details-marker {
    display: none;
}

.bookmark-site > summary:hover, .bookmark-site[open] > summary {
    color: #c1a2ff;
}

.bookmark-site > summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 6px;
    border-radius: 4px;
}

.bookmark-help {
    position: absolute;
    right: 0;
    top: calc(100% + 18px);
    width: min(290px, calc(100vw - 40px));
    padding: 18px;
    background: #22202b;
    border: 1px solid #514160;
    border-radius: 12px;
    box-shadow: 0 12px 32px #0007;
    z-index: 100;
    font-size: 13px;
    line-height: 1.8;
}

.bookmark-help p {
    margin: 8px 0 0;
}

@media (max-width: 1100px) {
    .bookmark-site > summary > span {
    display: none;
   ;
}

}
