/* iGame — 前台样式（深色游戏媒体风）
   class 清单与 .hermes/specs/game-site-contract.md 第 3 节保持一致。 */

:root {
    --bg: #0b0d12;
    --bg-soft: #11141b;
    --panel: #161a23;
    --panel-2: #1d2230;
    --line: #262c3a;
    --text: #eef1f7;
    --muted: #98a0b3;
    --accent: #7c5cff;
    --accent-2: #22d3ee;
    --danger: #f0506e;
    --radius: 14px;
    --shadow: 0 18px 40px rgba(0, 0, 0, .45);
    --max-width: 1220px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.25; }
h1 { font-size: 30px; letter-spacing: -.4px; }
h2 { font-size: 21px; }
p { margin: 0 0 10px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ===== 顶部导航 ===== */
.site-header {
    position: sticky; top: 0; z-index: 40;
    background: rgba(11, 13, 18, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.site-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex; align-items: center; gap: 20px;
}

.site-logo {
    font-weight: 800; font-size: 20px; letter-spacing: .5px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.nav-links { display: flex; gap: 18px; flex: 1; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); }

.nav-toggle {
    display: none; background: transparent; color: var(--text);
    border: 1px solid var(--line); border-radius: 10px;
    font-size: 18px; padding: 4px 10px; cursor: pointer;
}

.account-links { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.account-links form { display: inline; margin: 0; }

.link-button {
    background: none; border: 0; color: inherit;
    font: inherit; cursor: pointer; padding: 0;
}
.link-button:hover { color: var(--accent-2); }

.lang-switch {
    display: inline-flex; border: 1px solid var(--line);
    border-radius: 999px; overflow: hidden;
}
.lang-switch a { padding: 3px 10px; font-size: 12px; color: var(--muted); }
.lang-switch a.is-current { background: var(--panel-2); color: var(--text); }

/* ===== 通用容器 ===== */
.site-main { max-width: var(--max-width); margin: 0 auto; padding: 0 20px 60px; }
.home-content { display: flex; flex-direction: column; gap: 44px; }
.section { padding: 34px 0; }
.section-heading {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
}
.section-kicker {
    margin: 0 0 4px; font-size: 11px; letter-spacing: 1.6px;
    text-transform: uppercase; color: var(--accent-2);
}
.section-subtitle { color: var(--muted); margin: 0; }
.result-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.more-link { color: var(--accent-2); font-size: 13px; white-space: nowrap; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 16px; border-radius: 10px; border: 1px solid transparent;
    font: inherit; font-size: 14px; cursor: pointer; transition: .15s;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), #5b46d6); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); color: #fff; }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.empty-state {
    padding: 48px 20px; text-align: center; color: var(--muted);
    border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ===== 首屏 ===== */
.hero {
    position: relative; margin: 24px 0 8px;
    border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, #1a1f2e, #0d1017);
    min-height: 320px; display: flex; align-items: flex-end;
    border: 1px solid var(--line);
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.hero-slide.is-active { opacity: 1; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(8, 10, 14, .88) 0%, rgba(8, 10, 14, .35) 60%, rgba(8, 10, 14, .1) 100%);
}
.hero-content { position: relative; z-index: 2; padding: 34px 28px; max-width: 620px; }
.hero-content h1 { font-size: 38px; }
.hero-description { color: #cfd5e4; margin: 0; }

/* ===== 搜索 ===== */
.search-section { margin: 26px 0 6px; }
.search-box { display: flex; gap: 10px; }
.search-box input {
    flex: 1; padding: 12px 16px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--panel);
    color: var(--text); font: inherit;
}
.search-box input:focus { outline: 2px solid var(--accent); border-color: transparent; }

/* ===== 游戏卡片 ===== */
.game-grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}
.game-card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
    display: flex; flex-direction: column; transition: .18s;
}
.game-card:hover { transform: translateY(-3px); border-color: #35405a; box-shadow: var(--shadow); }
.game-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel-2); }
.game-cover-img { width: 100%; height: 100%; object-fit: cover; }
.game-cover-fallback {
    display: flex; align-items: center; justify-content: center;
    height: 100%; color: var(--muted); font-weight: 700; letter-spacing: 2px;
}
.score-badge {
    position: absolute; right: 8px; bottom: 8px;
    background: rgba(8, 10, 14, .85); color: #9ff0a8;
    border: 1px solid #2e5c3a; border-radius: 8px;
    padding: 1px 8px; font-size: 12px; font-weight: 700;
}
.game-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; }
.game-card-title { font-size: 15px; margin: 0; }
.game-card-title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-card-meta {
    margin: 0; font-size: 12px; color: var(--muted);
    display: flex; gap: 8px; flex-wrap: wrap;
}
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
    font-size: 11px; color: var(--muted);
    background: var(--panel-2); border: 1px solid var(--line);
    border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}

/* ===== 筛选 ===== */
.filter-bar {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 16px 18px; margin-bottom: 22px;
    display: flex; flex-direction: column; gap: 14px;
}
.filter-search input {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font: inherit;
}
.filter-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 6px; }
.filter-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.filter-options { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-option {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--line); border-radius: 999px;
    padding: 3px 12px; font-size: 13px; color: var(--muted); cursor: pointer;
}
.filter-option input { display: none; }
.filter-option.is-active { border-color: var(--accent); color: var(--text); background: rgba(124, 92, 255, .14); }
.filter-actions { display: flex; gap: 10px; margin-left: auto; }
.sort-select {
    padding: 8px 12px; border-radius: 10px; font: inherit;
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
}

.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tab {
    padding: 6px 14px; border-radius: 999px;
    border: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.tab.is-current { border-color: var(--accent); color: var(--text); background: rgba(124, 92, 255, .16); }

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 26px 0 0; }
.pager-link { padding: 6px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); }
.pager-link.is-current { border-color: var(--accent); }
.pager-current { color: var(--muted); font-size: 13px; }

/* ===== 厂商目录 ===== */
.company-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.company-item a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 14px; background: var(--panel);
    border: 1px solid var(--line); border-radius: 12px;
}
.company-item a:hover { border-color: var(--accent); }

/* ===== 详情页 ===== */
.detail-hero {
    position: relative; margin: 24px 0 26px; border-radius: var(--radius);
    overflow: hidden; min-height: 300px; display: flex; align-items: flex-end;
    background: linear-gradient(135deg, #171c28, #0c0f16); border: 1px solid var(--line);
}
.detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.detail-head { position: relative; z-index: 2; padding: 28px 26px; }
.detail-title { font-size: 34px; }
.detail-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; color: var(--muted); }
.lang-notice {
    margin-top: 8px; font-size: 12px; color: #ffd479;
    background: rgba(255, 212, 121, .1); border: 1px solid rgba(255, 212, 121, .3);
    border-radius: 10px; padding: 4px 10px; display: inline-block;
}
.detail-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; }
.detail-text { color: #cbd2e1; white-space: pre-line; }
.detail-side { display: flex; flex-direction: column; gap: 16px; }
.meta-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.meta-row {
    display: flex; justify-content: space-between; gap: 14px;
    padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13px;
}
.meta-row:last-child { border-bottom: 0; }
.meta-row span { color: var(--muted); }
.meta-row strong { font-weight: 600; text-align: right; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select {
    padding: 7px 10px; border-radius: 10px; font: inherit;
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
}
.store-links { display: flex; flex-direction: column; gap: 8px; }
.shot-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.shot-item { border-radius: 12px; border: 1px solid var(--line); width: 100%; }

/* ===== 静态内容页 / 表单（组 A 复用） ===== */
.content-page {
    max-width: 760px; margin: 34px auto; background: var(--panel);
    border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px;
}
.content-page h1 { margin-bottom: 14px; }
.content-page p, .content-page li { color: #cbd2e1; }

.auth-page { display: flex; justify-content: center; padding: 50px 0; }
.auth-card {
    width: 100%; max-width: 420px; background: var(--panel);
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 26px 28px; display: flex; flex-direction: column; gap: 10px;
}
.auth-card-small { max-width: 380px; }
.auth-card h1 { font-size: 22px; }
.auth-intro { color: var(--muted); font-size: 13px; }
.auth-card label { font-size: 13px; color: var(--muted); }
.auth-card input, .auth-card select, .auth-card textarea {
    width: 100%; padding: 10px 12px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--text); font: inherit;
}
.auth-submit { margin-top: 6px; background: linear-gradient(135deg, var(--accent), #5b46d6); color: #fff; border: 0; padding: 10px; border-radius: 10px; cursor: pointer; font: inherit; }
.auth-error { color: var(--danger); font-size: 13px; }
.auth-success { color: #9ff0a8; font-size: 13px; }
.auth-switch { font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--accent-2); }

/* ===== 页脚 ===== */
.site-footer {
    border-top: 1px solid var(--line); background: var(--bg-soft);
    padding: 26px 20px 40px; text-align: center; color: var(--muted); font-size: 13px;
}
.site-footer-links { display: flex; gap: 18px; justify-content: center; margin-bottom: 10px; flex-wrap: wrap; }
.footer-note { margin: 2px 0; font-size: 12px; }

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .detail-body { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .nav-toggle { display: inline-block; }
    .nav-links {
        display: none; flex-direction: column; gap: 12px;
        width: 100%; padding: 12px 0 4px;
    }
    .nav-links.is-open { display: flex; }
    .site-nav { flex-wrap: wrap; }
    .account-links { margin-left: auto; }
    .hero-content h1 { font-size: 28px; }
    .detail-title { font-size: 26px; }
    .filter-actions { margin-left: 0; width: 100%; }
}
