/* ============================================================
   site.css —— 全站公共页面框架
   顶部导航栏（电脑端） / 侧边导航栏（手机端、小窗口） / 底部栏
   注册系统、下载系统、商城系统、官网系统 共用同一套样式
   视觉风格与各系统保持一致：
   奶油色背景 + 紫色渐变主色 + 玻璃拟态 + 深色模式
   ============================================================ */

:root {
    --site-header-h: 66px;
    --site-surface: rgba(255, 255, 255, 0.75);
    --site-glass: rgba(255, 255, 255, 0.45);
    --site-border: rgba(200, 180, 210, 0.25);
    --site-accent: #764ba2;
    --site-accent-2: #5a3a7a;
    --site-accent-glow: rgba(118, 75, 162, 0.15);
    --site-text: #2d2a3e;
    --site-text-2: #5a4e6b;
    --site-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --site-strong-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
}

body.dark {
    --site-surface: rgba(26, 26, 46, 0.82);
    --site-glass: rgba(26, 26, 46, 0.45);
    --site-border: rgba(255, 255, 255, 0.08);
    --site-accent: #b8a0c9;
    --site-accent-2: #8a6aa0;
    --site-accent-glow: rgba(184, 160, 201, 0.2);
    --site-text: #f0e6d0;
    --site-text-2: #b0aac0;
    --site-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    --site-strong-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

/* ===== 页面框架（由公共脚本自动包裹，或 Vue 中手动使用） ===== */
body.site-chrome {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
}

.site-main {
    width: 100%;
    box-sizing: border-box;
}

.site-main-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px 20px 26px;
}

/* ===== 顶部导航栏（电脑端） ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 500;
    width: 100%;
    background: var(--site-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--site-border);
    box-shadow: var(--site-shadow);
}

.site-bar {
    height: var(--site-header-h);
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}

/* 品牌（游戏图标 + 名称） */
.site-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 0 0 auto;
}

.site-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.site-brand-name {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--site-accent);
    white-space: nowrap;
}

/* 导航项 */
.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.site-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 17px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--site-text);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.site-link:hover {
    background: var(--site-accent-glow);
    color: var(--site-accent);
    transform: translateY(-1px);
}

/* 当前所在页面高亮（合成表为站外链接，不高亮） */
.site-link.is-active {
    background: linear-gradient(145deg, #764ba2, #5a3a7a);
    color: #fff;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

body.dark .site-link.is-active {
    background: linear-gradient(145deg, #b8a0c9, #8a6aa0);
    color: #1a1a2e;
}

/* 右侧动作区：当前页面标题（小屏） + 主题切换 */
.site-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.site-page-title {
    display: none;
    font-size: 15px;
    font-weight: 700;
    color: var(--site-accent);
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--site-accent-glow);
    white-space: nowrap;
}

.site-theme-toggle {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 60px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--site-text);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.25s;
    white-space: nowrap;
}

.site-theme-toggle:hover {
    transform: scale(1.04);
    background: rgba(255, 255, 255, 0.5);
}

body.dark .site-theme-toggle {
    background: rgba(40, 40, 60, 0.7);
    color: #f0e6d0;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .site-theme-toggle:hover {
    background: rgba(60, 60, 85, 0.8);
}

/* ===== 手机端 / 小窗口：侧边导航 ===== */
.site-drawer-tab {
    display: none;
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 700;
    width: 34px;
    height: 72px;
    border: 1px solid var(--site-border);
    border-left: none;
    border-radius: 0 16px 16px 0;
    background: var(--site-surface);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.18);
    color: var(--site-accent);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-drawer-tab:hover {
    background: var(--site-accent-glow);
}

.site-drawer-mask {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(20, 16, 32, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

.site-drawer {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1200;
    width: 272px;
    max-width: 82vw;
    height: 100%;
    box-sizing: border-box;
    padding: 18px 16px 24px;
    background: var(--site-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--site-border);
    box-shadow: var(--site-strong-shadow);
    transform: translateX(-102%);
    transition: transform 0.28s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
}

body.site-drawer-open .site-drawer {
    transform: translateX(0);
}

body.site-drawer-open .site-drawer-mask {
    opacity: 1;
    pointer-events: auto;
}

.site-drawer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--site-border);
}

.site-drawer-head .site-logo {
    width: 34px;
    height: 34px;
}

.site-drawer-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--site-accent);
    flex: 1;
}

.site-drawer-close {
    border: 1px solid var(--site-border);
    background: transparent;
    color: var(--site-text-2);
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}

.site-drawer-close:hover {
    background: var(--site-accent-glow);
    color: var(--site-accent);
}

.site-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--site-text);
    text-decoration: none;
    background: var(--site-glass);
    border: 1px solid var(--site-border);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.site-drawer-link:hover {
    transform: translateX(3px);
    color: var(--site-accent);
    background: var(--site-accent-glow);
}

.site-drawer-link.is-active {
    background: linear-gradient(145deg, #764ba2, #5a3a7a);
    color: #fff;
    border-color: transparent;
}

body.dark .site-drawer-link.is-active {
    background: linear-gradient(145deg, #b8a0c9, #8a6aa0);
    color: #1a1a2e;
}

.site-drawer-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.site-drawer-foot a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    overflow: hidden;
    border: 1px solid var(--site-border);
    background: rgba(255, 255, 255, 0.35);
}

.site-drawer-foot a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 底部栏 ===== */
.site-footer {
    width: 100%;
    margin-top: 26px;
    background: var(--site-surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--site-border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
}

.site-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 26px 22px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.site-footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--site-text);
    letter-spacing: 0.03em;
}

.site-footer-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.site-footer-copy {
    color: var(--site-text-2);
    font-size: 13px;
    line-height: 1.9;
    letter-spacing: 0.03em;
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2px;
}

.site-footer-links a {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--site-border);
    background: rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.dark .site-footer-links a {
    background: rgba(255, 255, 255, 0.08);
}

.site-footer-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.site-footer-links a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== 响应式：手机端 / 小窗口 → 侧边导航 ===== */
@media (max-width: 900px) {
    :root {
        --site-header-h: 58px;
    }

    .site-bar {
        padding: 0 14px;
        gap: 10px;
    }

    .site-logo {
        width: 32px;
        height: 32px;
    }

    .site-brand-name {
        font-size: 16px;
    }

    .site-nav {
        display: none;
    }

    .site-page-title {
        display: inline-flex;
    }

    .site-theme-toggle {
        padding: 7px 11px;
        font-size: 13px;
    }

    .site-drawer-tab {
        display: inline-flex;
    }

    .site-main-center {
        padding: 16px 12px 22px;
    }

    .site-footer-inner {
        padding: 22px 14px 26px;
    }
}

@media (max-width: 420px) {
    .site-brand-name {
        display: none;
    }
}
