/* ════════════════════════════════════════════════════════════ */
/* 🎮 像素离散·换装小游戏 — 全站通用样式                         */
/* 继承自 sd-pxlsan 主站色系，为游戏场景做轻度调整                */
/* ════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════ */
/* ☀️ 亮色主题 · 白蓝弥散光风格 · 全面覆盖（游戏站）                */
/* ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] {
    --bg-color: #eef2f9;
    --card-bg: rgba(255,255,255,0.82);
    --text-main: #1a1a2e;
    --text-sub: #5a6a7e;
    --text-muted: #94a3b8;
    --border-default: rgba(180,200,240,0.3);
    --border-hover: rgba(100,140,220,0.4);
    --shadow-card: 0 4px 16px rgba(100,140,220,0.1);
    --shadow-hover: 0 8px 24px rgba(100,140,220,0.15);
}
[data-theme="light"] body { background: linear-gradient(135deg, #e8eeff 0%, #f4f0ff 35%, #eef6ff 65%, #f0f4ff 100%); background-attachment: fixed; }
[data-theme="light"] .navbar-wrapper { box-shadow: 0 2px 16px rgba(100,140,220,0.12); }
[data-theme="light"] .navbar-top { background: rgba(255,255,255,0.88); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(180,200,240,0.35); position: relative; z-index: 10; }
[data-theme="light"] .navbar-logo, [data-theme="light"] .navbar-logo a { color: #1e293b !important; }
[data-theme="light"] .logo-sub { color: #64748b !important; }
[data-theme="light"] .server-id-tag { color: #94a3b8; background: rgba(100,140,220,0.08); }
[data-theme="light"] .navbar-tabs { background: rgba(240,245,255,0.85); backdrop-filter: blur(8px); }
[data-theme="light"] .nav-tab { color: #5a6a7e; }
[data-theme="light"] .nav-tab:hover { background: rgba(100,140,220,0.1); color: #1e293b; }
[data-theme="light"] .nav-tab.active { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; font-weight: 700; }
[data-theme="light"] .theme-toggle { border-color: rgba(100,140,220,0.2); color: #5a6a7e; }
[data-theme="light"] .theme-toggle:hover { background: rgba(100,140,220,0.08); border-color: rgba(100,140,220,0.3); }
/* Hero 区域 */
[data-theme="light"] .hero { background: linear-gradient(135deg, #e8eeff 0%, #f0ecff 50%, #eef6ff 100%); }
[data-theme="light"] .hero-title { color: #1e293b; }
[data-theme="light"] .hero-subtitle { color: #5a6a7e; }
[data-theme="light"] .hero-tag { background: rgba(100,140,220,0.08); color: #5a6a7e; border-color: rgba(180,200,240,0.3); }
/* 游戏卡片 */
[data-theme="light"] .game-card { background: rgba(255,255,255,0.82); backdrop-filter: blur(8px); border-color: rgba(180,200,240,0.3); box-shadow: 0 4px 16px rgba(100,140,220,0.08); }
[data-theme="light"] .game-card:hover { border-color: rgba(100,140,220,0.4); box-shadow: 0 8px 24px rgba(100,140,220,0.15); }
[data-theme="light"] .game-card-title { color: #1e293b; }
[data-theme="light"] .game-card-desc { color: #5a6a7e; }
[data-theme="light"] .game-card-meta { color: #94a3b8; }
[data-theme="light"] .game-card-badge { color: #fff; }
/* 按钮 */
[data-theme="light"] .btn { background: rgba(255,255,255,0.8); border-color: rgba(180,200,240,0.3); color: #334155; }
[data-theme="light"] .btn:hover { border-color: #f59e0b; color: #b45309; }
/* Toast */
[data-theme="light"] .toast { background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); color: #1e293b; border-color: rgba(180,200,240,0.3); box-shadow: 0 8px 24px rgba(100,140,220,0.12); }
/* Modal */
[data-theme="light"] .modal-overlay { background: rgba(100,120,180,0.4); backdrop-filter: blur(12px); }
[data-theme="light"] .modal { background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); border-color: rgba(180,200,240,0.3); box-shadow: 0 20px 60px rgba(100,140,220,0.2); }
/* 滚动条 */
[data-theme="light"] ::-webkit-scrollbar-track { background: transparent; }
[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(100,140,220,0.18); }
[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(100,140,220,0.3); }
/* 亮色主题移动端适配 */
@media (max-width: 640px) {
    [data-theme="light"] .navbar-wrapper { box-shadow: 0 1px 8px rgba(100,140,220,0.1); border-radius: 0; }
}
@media (max-width: 480px) {
    [data-theme="light"] .navbar-wrapper { border-radius: 8px; }
}

:root {
    /* —— 继承主站核心色 —— */
    --bg-color: #1c1c1e;
    --card-bg: #1f2937;
    --text-main: #f3f4f6;
    --text-sub: #9ca3af;
    --text-muted: #6b7280;

    /* —— 强调色（游戏主题微调） —— */
    --accent-char: #fbbf24;     /* 金色 - 角色 */
    --accent-outfit: #f472b6;   /* 粉色 - 服装 */
    --accent-story: #a78bfa;    /* 淡紫 - 剧情 */
    --btn-mix: #8b5cf6;         /* 紫色 - 混合按钮 */

    /* —— 功能色 —— */
    --badge-user: #3b82f6;
    --badge-official: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* —— 边框/阴影 —— */
    --border-default: #374151;
    --border-hover: #6b7280;
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.5);

    /* —— 圆角 —— */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

/* 🛡️ 全局防溢出 */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 20px 20px 0;
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

/* ════════════════════════════════════════ */
/* 📌 统一导航栏（与主站 sd-pxlsan 对齐）    */
/* ════════════════════════════════════════ */
.navbar-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
    border-radius: 12px;
    position: relative;
    z-index: 100;
}
.navbar-wrapper .navbar-top {
    border-radius: 12px 12px 0 0;
}
.navbar-wrapper .navbar-tabs {
    border-radius: 0 0 12px 12px;
    overflow-x: auto;
}
.navbar-wrapper .navbar-top:last-child {
    border-radius: 12px;
}

.navbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #374151;
    padding: 12px 20px;
}

.navbar-logo {
    font-weight: 800;
    font-size: 1.3rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-logo .logo-sub { color: #9ca3af; font-weight: 400; font-size: 0.75rem; }
.navbar-logo a { display: inline; }
.navbar-logo .logo-slogan {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
    border-left: 1px solid #4b5563;
    padding-left: 10px;
    margin-left: 2px;
    letter-spacing: 0.05em;
}
[data-theme="light"] .logo-slogan { color: #94a3b8 !important; border-left-color: rgba(180,200,240,0.4) !important; }
.navbar-logo .logo-pro { flex-shrink: 0; }
.server-id-tag {
    font-size: 0.7rem;
    color: #6b7280;
    background: rgba(255,255,255,0.06);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 400;
}

.navbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ═══════ 主站风格：用户信息栏 ═══════ */
.user-info-compact {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.9rem;
}
.user-avatar-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.avatar-nickname {
    color: #e5e7eb;
    font-weight: 600;
    font-size: 0.85rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.points-badge {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    background: rgba(59, 130, 246, 0.08);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}
.points-badge:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
}
.points-badge .icon {
    color: #60a5fa;
    font-size: 0.95rem;
    line-height: 1;
}
.points-badge .label {
    color: #9ca3af;
    font-size: 0.75rem;
}
.points-badge .value {
    color: #93c5fd;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}
.gold-badge {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    background: rgba(251, 191, 36, 0.08);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(251, 191, 36, 0.35);
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}
.gold-badge:hover {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.6);
}
.gold-badge::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.25), transparent);
    animation: gold-shimmer 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes gold-shimmer {
    0%   { left: -100%; }
    50%  { left: 150%; }
    100% { left: 150%; }
}
.gold-badge .icon {
    color: #fbbf24;
    font-size: 0.95rem;
    line-height: 1;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.7);
    position: relative;
    z-index: 1;
}
.gold-badge .value {
    color: #fbbf24;
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}
.btn-login { background: var(--badge-user, #3b82f6); }
.btn-pay { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-pay:hover { opacity: 0.9; }

/* 导航栏内的独立小按钮（非 .btn 子类） */
.navbar-top .btn-small {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    transition: 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.navbar-top .btn-small:hover { opacity: 0.9; transform: translateY(-1px); }

/* 更多菜单 */
.dropdown-menu { position: relative; display: inline-block; z-index: 100; }
.menu-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e5e7eb;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}
.menu-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 10px;
    min-width: 160px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    z-index: 101;
    overflow: hidden;
}
.dropdown-content.show { display: block; }
.dropdown-content button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    background: none;
    border: none;
    color: #d1d5db;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
}
.dropdown-content button:hover { background: #374151; color: #fff; }
.btn-label { /* 充值按钮文字，小屏隐藏 */ }

@media (max-width: 767px) {
    .gold-badge { padding: 4px 8px; gap: 4px; }
    .gold-badge .label { display: none; }
    .points-badge .label { display: none; }
    .btn-label { display: none; }
    .avatar-nickname { display: none; }
}

/* 亮色主题下导航栏用户信息 */
[data-theme="light"] .user-info-compact .btn-small { border-color: rgba(100,140,220,0.2); color: #374151; }
[data-theme="light"] .points-badge { background: rgba(59,130,246,0.06); border-color: rgba(59,130,246,0.2); }
[data-theme="light"] .points-badge .value { color: #3b82f6; }
[data-theme="light"] .gold-badge { background: rgba(251,191,36,0.06); border-color: rgba(251,191,36,0.25); }
[data-theme="light"] .gold-badge .value { color: #b45309; }
[data-theme="light"] .menu-btn { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #374151; }
[data-theme="light"] .menu-btn:hover { background: rgba(0,0,0,0.08); }
[data-theme="light"] .dropdown-content { background: #fff; border-color: rgba(180,200,240,0.3); box-shadow: 0 8px 24px rgba(100,140,220,0.15); }
[data-theme="light"] .dropdown-content button { color: #374151; }
[data-theme="light"] .dropdown-content button:hover { background: #f1f5f9; color: #1e293b; }
[data-theme="light"] .avatar-nickname { color: #1e293b; }

.navbar-tabs {
    display: flex;
    gap: 5px;
    background: #1f2937;
    padding: 0 15px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.navbar-tabs::-webkit-scrollbar { display: none; }

.tab-short { display: none; }
.tab-full  { display: inline; }

.nav-tab {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-sub);
    border-radius: 8px 8px 0 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-tab:hover {
    background: rgba(251, 191, 36, 0.1);
    color: var(--text-main);
}
.nav-tab.active {
    background: var(--accent-char);
    color: #000;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════ */
/* 📱 响应式断点体系（与主站 sd-pxlsan 统一）                    */
/* ═══════════════════════════════════════════════════════════ */

/* 平板端 (< 968px) */
@media (max-width: 968px) {
    .navbar-wrapper {
        max-width: 100%;
    }
    .navbar-logo {
        font-size: 1.1rem;
    }
    .server-id-tag {
        display: none;
    }
    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* 移动端 (< 768px) */
@media (max-width: 768px) {
    body {
        padding: 10px 10px 0;
    }
    .navbar-wrapper {
        margin-bottom: 15px;
    }
    .navbar-top {
        padding: 10px 15px;
        flex-wrap: nowrap;
        gap: 6px;
    }
    .navbar-logo {
        font-size: 1.05rem;
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .navbar-logo a {
        font-size: 1rem !important;
    }
    .server-id-tag {
        display: none !important;
    }
    .navbar-right,
    .user-info-compact {
        flex-wrap: nowrap;
        flex: 0 0 auto;
        gap: 6px;
    }
    .btn-small {
        padding: 7px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    .navbar-tabs {
        padding: 0 12px;
        gap: 5px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        /* 右侧渐隐：暗示后面还有 tab 可滑动到 */
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
                mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    }
    .navbar-tabs::-webkit-scrollbar {
        display: none;
    }
    .nav-tab {
        padding: 10px 15px;
        font-size: 0.85rem;
        flex: 0 0 auto;
    }
    /* 手机端：短文字替换长文字 */
    .tab-full  { display: none !important; }
    .tab-short { display: inline !important; }
}

/* 中屏手机 (< 640px) */
@media (max-width: 640px) {
    .navbar-wrapper { border-radius: 0; margin: 0 0 14px; }
    .navbar-wrapper .navbar-top { border-radius: 0; }
    .navbar-wrapper .navbar-tabs { border-radius: 0; }
    .navbar-top { padding: 10px 14px; }
    .navbar-logo { font-size: 1.05rem; }
    .nav-tab { padding: 10px 14px; font-size: 0.85rem; }
}

/* 隐藏副标题 (< 600px) */
@media (max-width: 600px) {
    body { padding: 12px 12px 0; }
    .navbar-logo .logo-sub { display: none !important; }
    .navbar-logo .logo-slogan { display: none !important; }
}

/* 小屏手机 (< 480px) */
@media (max-width: 480px) {
    body {
        padding: 5px 5px 0;
    }
    .navbar-wrapper {
        border-radius: 8px;
    }
    .navbar-wrapper .navbar-top { border-radius: 8px 8px 0 0; }
    .navbar-wrapper .navbar-tabs { border-radius: 0 0 8px 8px; }
    .navbar-top {
        padding: 8px 10px;
        gap: 4px;
        flex-wrap: nowrap;
    }
    .navbar-logo {
        font-size: 0.95rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .navbar-right,
    .user-info-compact {
        gap: 4px;
    }
    .points-badge { padding: 4px 8px; }
    .gold-badge { padding: 4px 8px; gap: 4px; }
    .btn-small {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
    .navbar-tabs {
        padding: 0 8px;
    }
    .nav-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* 隐藏 Pro 标签 (< 400px) */
@media (max-width: 400px) {
    .navbar-logo .logo-pro { display: none !important; }
}

/* 极窄屏 (< 380px) */
@media (max-width: 380px) {
    .navbar-top {
        padding: 8px 8px;
        gap: 3px;
    }
    .navbar-right,
    .user-info-compact {
        gap: 3px;
    }
    .points-badge,
    .gold-badge {
        height: 26px;
        padding: 0 6px;
        border-radius: 13px;
    }
    .points-badge .value,
    .gold-badge .value {
        font-size: 0.72rem;
    }
    .points-badge .icon,
    .gold-badge .icon {
        font-size: 0.72rem;
    }
    .user-avatar-wrap .user-avatar {
        width: 26px;
        height: 26px;
        font-size: 0.7rem;
    }
    .btn-small {
        height: 26px;
        padding: 0 6px;
    }
    .navbar-logo {
        font-size: 0.88rem !important;
    }
}

/* 🌙/☀️ 主题切换按钮 */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px 8px;
    line-height: 1;
    transition: all 0.2s;
    color: var(--text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.25);
}

/* ════════════════════════════════════════ */
/* 🔘 通用按钮                                */
/* ════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    border-color: var(--accent-char);
    color: var(--accent-char);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--btn-mix), var(--accent-story));
    color: #fff !important;
    border: none;
    font-weight: 600;
}

.btn-primary:hover {
    filter: brightness(1.15);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-char), var(--warning));
    color: #000 !important;
    border: none;
    font-weight: 700;
}

.btn-accent:hover {
    filter: brightness(1.1);
    color: #000 !important;
}

.btn-outfit {
    background: linear-gradient(135deg, var(--accent-outfit), #ec4899);
    color: #fff !important;
    border: none;
    font-weight: 600;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1rem;
}

/* ════════════════════════════════════════ */
/* 🏷 标签 / 徽章                            */
/* ════════════════════════════════════════ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    vertical-align: middle;
}

.badge-new {
    background: var(--danger);
    color: #fff;
    animation: pulseBadge 2s ease-in-out infinite;
}

.badge-beta {
    background: var(--warning);
    color: #000;
}

.badge-hot {
    background: linear-gradient(135deg, #ef4444, #f59e0b);
    color: #fff;
}

@keyframes pulseBadge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.05); }
}

/* ════════════════════════════════════════ */
/* 🪙 像素点图标（沿用主站）                  */
/* ════════════════════════════════════════ */
.pixel-icon {
    display: inline-block;
    vertical-align: -3px;
    width: 1.2em;
    height: 1.2em;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    flex-shrink: 0;
}
.pixel-icon.gold {
    background-image: url('assets/gold_pixel.png');
}
.pixel-icon.normal {
    background-image: url('assets/normal_pixel.png');
}

/* ════════════════════════════════════════ */
/* 💬 Toast 提示                             */
/* ════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: rgba(31, 41, 55, 0.95);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    box-shadow: var(--shadow-hover);
    font-size: 0.9rem;
    animation: toastIn 0.25s ease-out;
    backdrop-filter: blur(8px);
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warning { border-left: 3px solid var(--warning); }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════ */
/* 🎭 Modal 遮罩                             */
/* ════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal {
    background: var(--card-bg);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: 24px;
    width: 100%;
    max-width: 500px;
    color: var(--text-main);
    box-shadow: var(--shadow-hover);
    animation: modalIn 0.25s ease-out;
}

.modal h2 {
    margin: 0 0 12px;
    font-size: 1.3rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ════════════════════════════════════════ */
/* 📱 响应式（移动端优化）                    */
/* ════════════════════════════════════════ */
@media (max-width: 640px) {
    .btn { padding: 7px 14px; font-size: 0.85rem; }
    .btn-large { padding: 10px 20px; font-size: 0.95rem; }
}

/* ════════════════════════════════════════ */
/* 🧭 滚动条美化                             */
/* ════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ════════════════════════════════════════ */
/* 🔗 通用链接                               */
/* ════════════════════════════════════════ */
a {
    color: var(--accent-story);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--accent-outfit);
}

/* ════════════════════════════════════════ */
/* 📦 通用布局容器                           */
/* ════════════════════════════════════════ */
.page-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sub { color: var(--text-sub); }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* ════════════════════════════════════════ */
/* 🧑 用户头像（简易）                        */
/* ════════════════════════════════════════ */
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-char), var(--accent-outfit));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 0.85rem;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 登录弹窗：登录方式分隔线（上方 Google，下方邮箱） */
.game-auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 14px;
    color: var(--text-muted);
    font-size: 0.72rem;
}
.game-auth-divider::before,
.game-auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-default, rgba(255,255,255,0.08));
}
.game-auth-divider span { flex-shrink: 0; }
