/* ===== LingVerse - 古风修仙主题 ===== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-card-hover: #22223a;
    --bg-panel: #15151f;
    --border-color: #2a2a3e;
    --border-gold: #8b7355;

    --text-primary: #e8e0d0;
    --text-secondary: #a09880;
    --text-muted: #6a6458;
    --text-gold: #d4a843;
    --text-jade: #5ec4b0;
    --text-red: #c94040;
    --text-blue: #5a9fd4;

    --accent-gold: #c9993a;
    --accent-jade: #3dab97;
    --accent-crimson: #b83030;
    --accent-purple: #8a6bbf;
    --accent-blue: #4a8fc4;

    --gradient-gold: linear-gradient(135deg, #c9993a 0%, #e8c068 50%, #c9993a 100%);
    --gradient-jade: linear-gradient(135deg, #2d8b7a 0%, #5ec4b0 100%);
    --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #12121a 50%, #0a0a12 100%);

    --font-serif: 'Noto Serif SC', 'STSong', 'SimSun', serif;
    --font-display: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-glow-gold: 0 0 20px rgba(201, 153, 58, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-serif);
    background: var(--gradient-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    color: var(--text-gold);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    box-shadow: var(--shadow-glow-gold);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    max-width: 320px;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ===== 隐藏 ===== */
.hidden {
    display: none !important;
}

/* ===== 登录页 ===== */
.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: auto;
    position: relative;
}

.login-bg-overlay {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 153, 58, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(61, 171, 151, 0.04) 0%, transparent 60%),
        var(--gradient-bg);
    z-index: 0;
}

.login-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.login-logo {
    text-align: center;
}

.logo-title {
    font-family: var(--font-display);
    font-size: 64px;
    color: var(--text-gold);
    text-shadow: 0 0 40px rgba(201, 153, 58, 0.3), 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 12px;
    margin-bottom: 4px;
}

.logo-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    letter-spacing: 6px;
    font-weight: 300;
}

.logo-tagline {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 4px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 40px;
    width: 380px;
    box-shadow: var(--shadow-md);
}

.card-title {
    text-align: center;
    font-size: 20px;
    color: var(--text-gold);
    margin-bottom: 28px;
    font-weight: 600;
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px rgba(201, 153, 58, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.input-with-btn {
    display: flex;
    gap: 8px;
}

.input-with-btn input {
    flex: 1;
}

.btn-send-code {
    padding: 10px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    color: var(--text-gold);
    font-family: var(--font-serif);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-send-code:hover {
    background: rgba(201, 153, 58, 0.15);
}

.btn-send-code:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--gradient-gold);
    border: none;
    border-radius: var(--radius-sm);
    color: #1a1a28;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 4px;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 8px;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-switch a {
    color: var(--text-jade);
    text-decoration: none;
    margin-left: 4px;
}

.form-switch a:hover {
    text-decoration: underline;
}

.form-switch .switch-sep {
    margin: 0 8px;
    color: var(--text-muted);
}

.card-desc {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.role-compare {
    margin-bottom: 16px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.compare-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.compare-item+.compare-item {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.compare-item.compare-highlight {
    background: rgba(201, 153, 58, 0.06);
}

.compare-label {
    flex-shrink: 0;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 56px;
}

.compare-highlight .compare-label {
    color: var(--text-gold);
}

.compare-list {
    color: var(--text-muted);
    line-height: 1.4;
}

.compare-highlight .compare-list {
    color: var(--text-secondary);
}

.form-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.form-divider span {
    padding: 0 12px;
}

.form-switch-btns {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.switch-link {
    color: var(--text-jade);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 14px;
    border: 1px solid rgba(61, 171, 151, 0.2);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
}

.switch-link:hover {
    background: rgba(61, 171, 151, 0.1);
    border-color: var(--accent-jade);
}

.btn-guest {
    background: var(--gradient-jade);
    letter-spacing: 6px;
}

.login-footer {
    position: fixed;
    bottom: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    z-index: 1;
}

/* ===== 游戏页 ===== */
.game-page {
    overflow: hidden;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* --- Header --- */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 52px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    font-family: var(--font-display);
    font-size: 24px;
    color: var(--text-gold);
    letter-spacing: 4px;
}

.header-realm {
    font-size: 13px;
    color: var(--text-jade);
    padding: 3px 10px;
    background: rgba(61, 171, 151, 0.1);
    border: 1px solid rgba(61, 171, 151, 0.2);
    border-radius: var(--radius-sm);
}

.header-gametime {
    font-size: 11px;
    color: var(--text-gold);
    padding: 2px 8px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}

.header-gametime.is-night {
    color: #a8b4ff;
    background: rgba(100, 120, 220, 0.15);
    border-color: rgba(100, 120, 220, 0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-player-name {
    font-size: 14px;
    color: var(--text-secondary);
    margin-right: 8px;
}

.btn-icon {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-serif);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--accent-gold);
    color: var(--text-gold);
}

.btn-icon.active {
    background: rgba(201, 153, 58, 0.1);
    border-color: var(--accent-gold);
    color: var(--text-gold);
}

.btn-logout {
    border-color: rgba(185, 48, 48, 0.3);
    color: var(--text-red);
}

.btn-logout:hover {
    border-color: var(--accent-crimson);
    background: rgba(185, 48, 48, 0.1);
    color: var(--text-red);
}

/* --- Body --- */
.game-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* --- Player Panel --- */
.player-panel {
    width: 220px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    padding: 16px;
    overflow-y: auto;
    flex-shrink: 0;
}

.panel-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.panel-section:last-child {
    border-bottom: none;
}

.panel-title {
    font-size: 13px;
    color: var(--text-gold);
    letter-spacing: 2px;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(201, 153, 58, 0.15);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.stat-label {
    color: var(--text-muted);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 600;
}

.realm-text {
    color: var(--text-jade);
}

.hp-text {
    color: #e06060;
}

.atk-text {
    color: #e0a040;
}

.def-text {
    color: #60a0e0;
}

.spirit-text {
    color: var(--accent-purple);
}

.luck-text {
    color: var(--accent-jade);
}

.gold-text {
    color: var(--text-gold);
}

.mp-text {
    color: #6090e0;
}

.stone-lower {
    color: #a0a0a0;
}

.stone-mid {
    color: #60c0e0;
}

.stone-upper {
    color: #e0a040;
}

.stone-supreme {
    color: #d050e0;
}

.progress-bar-container {
    position: relative;
    height: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.progress-bar {
    height: 100%;
    background: var(--gradient-jade);
    border-radius: 8px;
    width: 0%;
    transition: width 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

/* --- Main Panel --- */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.log-area {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.log-panel {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scroll-behavior: smooth;
}

/* 桌面端隐藏移动导航 */
.mobile-nav {
    display: none;
}

.log-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.log-content p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    padding: 2px 0;
}

.log-content p.log-welcome {
    color: var(--text-gold);
    font-size: 15px;
    margin-bottom: 8px;
}

.log-content p.log-system {
    color: var(--text-muted);
    font-style: italic;
}

.log-content p.log-cultivation {
    color: var(--text-jade);
}

.log-content p.log-breakthrough {
    color: var(--text-gold);
    font-weight: 600;
    font-size: 15px;
    text-shadow: 0 0 8px rgba(201, 153, 58, 0.2);
}

.log-content p.log-battle {
    color: var(--text-red);
}

.log-content p.log-reward {
    color: var(--accent-purple);
}

/* --- Action Bar --- */
.action-bar {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.btn-action:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-gold);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-action:active {
    transform: translateY(0);
}

.btn-action-icon {
    font-size: 16px;
    color: var(--text-gold);
}

.btn-meditate {
    border-color: rgba(61, 171, 151, 0.3);
}

.btn-meditate:hover {
    border-color: var(--accent-jade);
}

.btn-meditate .btn-action-icon {
    color: var(--text-jade);
}

.btn-breakthrough {
    border-color: rgba(201, 153, 58, 0.3);
}

.btn-breakthrough:hover {
    border-color: var(--accent-gold);
}

.btn-explore {
    border-color: rgba(138, 107, 191, 0.3);
}

.btn-explore:hover {
    border-color: var(--accent-purple);
}

.btn-explore .btn-action-icon {
    color: var(--accent-purple);
}

.btn-meditate.meditating {
    background: rgba(61, 171, 151, 0.15);
    border-color: var(--accent-jade);
    color: var(--text-jade);
    pointer-events: none;
}

/* --- Meditation Bar --- */
.meditation-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(61, 171, 151, 0.08);
    border-top: 1px solid rgba(61, 171, 151, 0.2);
}

.meditation-anim {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meditation-pulse {
    width: 16px;
    height: 16px;
    background: var(--accent-jade);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(61, 171, 151, 0.4);
    }

    50% {
        transform: scale(1.3);
        opacity: 1;
        box-shadow: 0 0 20px 5px rgba(61, 171, 151, 0.2);
    }
}

.meditation-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: var(--text-jade);
    flex: 1;
}

.meditation-info em {
    font-style: normal;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-stop-meditate {
    padding: 8px 24px;
    background: rgba(185, 48, 48, 0.15);
    border: 1px solid rgba(185, 48, 48, 0.3);
    border-radius: var(--radius-sm);
    color: var(--text-red);
    font-family: var(--font-serif);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-stop-meditate:hover {
    background: rgba(185, 48, 48, 0.25);
    border-color: var(--accent-crimson);
}

/* --- Side Panel --- */
.side-panel {
    width: 280px;
    background: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.side-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
}

.side-content .panel-title {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-panel-close {
    margin-left: auto;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-panel-close:hover {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Ranking */
.ranking-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.ranking-tab {
    flex: 1;
    padding: 6px 0;
    font-size: 12px;
    font-family: var(--font-serif);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.ranking-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.ranking-tab.active {
    background: var(--gradient-gold);
    border-color: var(--accent-gold);
    color: #1a1a28;
    font-weight: 600;
}

.ranking-list {
    flex: 1;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.ranking-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border-radius: 50%;
    font-size: 12px;
    color: var(--text-gold);
    font-weight: 700;
    flex-shrink: 0;
}

.ranking-rank.top-1 {
    background: var(--accent-gold);
    color: #1a1a28;
}

.ranking-rank.top-2 {
    background: #8a8a8a;
    color: #1a1a28;
}

.ranking-rank.top-3 {
    background: #a0603a;
    color: #1a1a28;
}

.ranking-name {
    flex: 1;
    color: var(--text-primary);
}

.ranking-realm {
    color: var(--text-jade);
    font-size: 12px;
}

.ranking-detail {
    width: 100%;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
    padding-left: 32px;
}

/* Chat */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}

.chat-msg {
    font-size: 13px;
    line-height: 1.6;
}

.chat-msg-name {
    color: var(--text-jade);
    font-weight: 600;
    margin-right: 6px;
}

.chat-msg-text {
    color: var(--text-secondary);
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.chat-input-bar input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 13px;
    outline: none;
}

.chat-input-bar input:focus {
    border-color: var(--accent-gold);
}

.btn-send {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    color: var(--text-gold);
    font-family: var(--font-serif);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send:hover {
    background: rgba(201, 153, 58, 0.15);
}

/* ===== 打字机效果 ===== */
.typing-cursor::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--text-gold);
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== 响应式 ===== */

/* 角色面板切换按钮 (仅移动端可见) */
.btn-toggle-player {
    display: none;
}

/* 移动端遮罩 */
.mobile-overlay {
    display: none;
}

@media (max-width: 768px) {
    body {
        overflow: hidden;
    }

    /* --- Header 紧凑化 --- */
    .game-header {
        padding: 0 10px;
        height: 44px;
    }

    .header-left {
        gap: 8px;
    }

    .header-logo {
        font-size: 18px;
        letter-spacing: 2px;
    }

    .header-realm {
        font-size: 11px;
        padding: 2px 6px;
    }

    .header-right {
        gap: 4px;
    }

    .header-right .btn-icon:not(.btn-logout) {
        display: none;
    }

    .header-player-name {
        display: none;
    }

    .btn-icon {
        padding: 4px 8px;
        font-size: 12px;
    }

    /* --- 移动端右侧竖排导航 --- */
    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 6px 4px;
        background: var(--bg-card);
        border-left: 1px solid var(--border-color);
        overflow-y: auto;
    }

    .mobile-nav-btn {
        padding: 8px 6px;
        font-size: 11px;
        background: transparent;
        color: var(--text-muted);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        cursor: pointer;
        font-family: inherit;
        white-space: nowrap;
        transition: all 0.2s;
        writing-mode: horizontal-tb;
    }

    .mobile-nav-btn:hover,
    .mobile-nav-btn:active {
        color: var(--accent-gold);
        border-color: var(--accent-gold);
        background: rgba(201, 164, 72, 0.1);
    }

    /* --- 角色面板切换按钮 --- */
    .btn-toggle-player {
        display: flex;
    }

    /* --- 角色面板变为左侧抽屉 --- */
    .player-panel {
        position: fixed;
        top: 44px;
        left: 0;
        bottom: 0;
        width: 220px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        border-right: 1px solid var(--border-color);
    }

    .player-panel.mobile-open {
        transform: translateX(0);
    }

    /* --- 遮罩层 --- */
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: 44px;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }

    .mobile-overlay.active {
        display: block;
    }

    /* --- 主面板全宽 --- */
    .game-body {
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
    }

    .main-panel {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    /* --- 身份码标签 (header 内移动端显示) --- */
    .header-identity-code {
        display: inline-block;
        font-size: 11px;
        color: var(--text-gold);
        background: rgba(201, 153, 58, 0.12);
        border: 1px solid rgba(201, 153, 58, 0.25);
        border-radius: var(--radius-sm);
        padding: 2px 6px;
        font-family: monospace;
        letter-spacing: 2px;
    }

    .log-panel {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 10px 12px;
    }

    .log-content p {
        font-size: 13px;
        line-height: 1.6;
    }

    /* --- 操作栏紧凑化 --- */
    .action-bar {
        flex-shrink: 0;
        padding: 4px 6px;
        gap: 3px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .btn-action {
        padding: 5px 8px;
        font-size: 11px;
        gap: 2px;
        flex: 0 0 auto;
    }

    .btn-action-icon {
        font-size: 12px;
    }

    /* --- 冥想栏紧凑化 --- */
    .meditation-bar {
        padding: 8px 10px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .meditation-info {
        gap: 10px;
        font-size: 12px;
        flex: 1;
        min-width: 0;
    }

    .meditation-anim {
        width: 24px;
        height: 24px;
    }

    .meditation-pulse {
        width: 12px;
        height: 12px;
    }

    .btn-stop-meditate {
        padding: 6px 16px;
        font-size: 12px;
    }

    /* --- 右侧面板变为全屏覆盖 --- */
    .side-panel {
        position: fixed;
        top: 44px;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        z-index: 100;
        border-left: none;
    }

    .side-content {
        padding: 12px;
    }

    /* --- 登录页自适应 --- */
    .login-card {
        width: calc(100vw - 32px);
        max-width: 380px;
        padding: 24px 20px;
    }

    .logo-title {
        font-size: 42px;
        letter-spacing: 8px;
    }

    .logo-subtitle {
        font-size: 14px;
        letter-spacing: 4px;
    }

    .logo-tagline {
        font-size: 12px;
    }

    .login-container {
        gap: 20px;
    }

    /* --- Toast --- */
    .toast-container {
        top: 50px;
        right: 10px;
        left: 10px;
    }

    .toast {
        max-width: 100%;
        font-size: 13px;
        padding: 10px 14px;
    }

    /* --- 背包/商店/兑换弹窗 --- */
    .exchange-modal-overlay {
        padding: 10px;
    }

    .exchange-modal {
        width: 100%;
        max-width: 340px;
    }

    .inventory-item {
        padding: 8px;
    }

    .shop-item {
        padding: 8px;
    }

    /* --- 死亡/逮捕覆盖层 --- */
    .death-overlay,
    .arrest-overlay {
        padding: 20px;
    }

    .death-content,
    .arrest-content {
        max-width: 100%;
    }
}

/* ===== 地图 ===== */
.map-current-area {
    font-size: 12px;
    color: var(--text-jade);
    font-weight: normal;
}

.map-container {
    flex: 1;
    overflow: hidden;
}

.map-canvas {
    position: relative;
    width: 100%;
    height: 350px;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(61, 171, 151, 0.06) 0%, transparent 60%),
        var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.map-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.map-node {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
    z-index: 2;
}

.map-node-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-jade);
    border: 2px solid rgba(61, 171, 151, 0.4);
    transition: all 0.3s;
}

.map-node-name {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.map-node-badge {
    font-size: 9px;
    background: var(--accent-jade);
    color: #fff;
    padding: 1px 6px;
    border-radius: 8px;
}

/* 当前位置 */
.map-node-current .map-node-dot {
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
    animation: nodePulse 2s ease-in-out infinite;
}

.map-node-current .map-node-name {
    color: var(--gold);
    font-weight: 600;
}

/* 可前往 */
.map-node-open {
    cursor: pointer;
}

.map-node-open:hover .map-node-dot {
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(61, 171, 151, 0.5);
}

.map-node-open .map-node-name {
    color: var(--text-jade);
}

/* 未开放 - 雾气笼罩 */
.map-node-fog {
    opacity: 0.35;
    filter: blur(1px);
}

.map-node-fog .map-node-dot {
    background: #555;
    border-color: #444;
}

.map-node-fog .map-node-name {
    color: #666;
    font-style: italic;
}

/* 不可前往(已开放但不相邻) */
.map-node-locked .map-node-dot {
    background: #666;
    border-color: #555;
}

@keyframes nodePulse {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
    }

    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.7);
    }
}

/* ===== 探索日志类型 ===== */
.log-explore {
    color: var(--text-jade);
}

.log-move {
    color: #8ba4b4;
}

.log-death {
    color: #e85454;
    font-weight: 600;
}

.log-revive {
    color: var(--gold);
}

.log-rest {
    color: #7ec8a0;
}

/* ===== 死亡遮罩 ===== */
.death-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.death-content {
    text-align: center;
    max-width: 360px;
    padding: 40px;
}

.death-title {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 36px;
    color: #e85454;
    margin-bottom: 16px;
    text-shadow: 0 0 20px rgba(232, 84, 84, 0.5);
}

.death-msg {
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

.death-cost {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 14px;
}

.btn-revive {
    background: linear-gradient(135deg, var(--accent-jade), #2d8872);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-revive:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(61, 171, 151, 0.4);
}

.death-guest-hint {
    color: #e8a554;
    font-size: 13px;
    margin-top: 16px;
    line-height: 1.6;
}

/* ===== 逮捕弹窗 ===== */
.arrest-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(20, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(6px);
}

.arrest-content {
    text-align: center;
    max-width: 340px;
    padding: 40px 36px;
    border: 2px solid #8b2020;
    border-radius: 8px;
    background: linear-gradient(180deg, #1a0808 0%, #0d0404 100%);
    box-shadow: 0 0 40px rgba(139, 32, 32, 0.4), inset 0 0 30px rgba(139, 32, 32, 0.1);
    position: relative;
}

.arrest-seal {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 14px;
    color: #8b4040;
    letter-spacing: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #3a1515;
    padding-bottom: 12px;
}

.arrest-title {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 32px;
    color: #c44040;
    margin-bottom: 24px;
    letter-spacing: 12px;
    text-shadow: 0 0 20px rgba(196, 64, 64, 0.5);
}

.arrest-body {
    color: #b8a090;
    font-size: 15px;
    line-height: 2;
    margin-bottom: 20px;
}

.arrest-body strong {
    color: #e85454;
}

.arrest-highlight {
    font-size: 18px;
    color: #e85454;
    font-weight: 600;
    margin-top: 12px;
    animation: arrestPulse 1.5s ease-in-out infinite;
}

.arrest-sub {
    font-size: 13px;
    color: #8b6060;
    margin-top: 4px;
}

.arrest-stamp {
    position: absolute;
    right: 24px;
    bottom: 60px;
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 16px;
    color: rgba(196, 64, 64, 0.4);
    border: 2px solid rgba(196, 64, 64, 0.3);
    padding: 6px 10px;
    border-radius: 4px;
    transform: rotate(-15deg);
}

.btn-arrest-close {
    background: transparent;
    color: #8b6060;
    border: 1px solid #3a1515;
    padding: 8px 24px;
    border-radius: 4px;
    margin-top: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-arrest-close:hover {
    color: #c44040;
    border-color: #8b2020;
}

@keyframes arrestPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== 背包 ===== */
.inventory-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
    max-height: 500px;
    overflow-y: auto;
}

.inventory-empty {
    color: var(--text-dim);
    text-align: center;
    padding: 30px 0;
}

.inventory-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.item-name {
    font-weight: 600;
    font-size: 13px;
}

.item-rarity {
    font-size: 11px;
    color: var(--text-dim);
}

.item-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.item-actions {
    display: flex;
    gap: 6px;
}

.item-actions button {
    padding: 2px 10px;
    font-size: 11px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.item-actions button:hover {
    background: var(--bg-panel);
    color: var(--text-primary);
}

.btn-exchange-small {
    font-size: 11px;
    padding: 2px 8px;
    margin-left: 8px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border-color);
    color: var(--text-gold);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-exchange-small:hover {
    background: var(--bg-panel);
}

/* ===== 兑换弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px 24px;
    min-width: 300px;
}

.modal-content h3 {
    color: var(--text-gold);
    margin-bottom: 16px;
    text-align: center;
}

.exchange-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;
}

.exchange-row select,
.exchange-row input {
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
    font-size: 13px;
}

.exchange-row input {
    width: 80px;
}

.exchange-arrow {
    color: var(--text-gold);
    font-weight: bold;
}

.exchange-row button {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.exchange-row button:first-child {
    background: rgba(var(--accent-jade-rgb, 100, 200, 150), 0.15);
    color: var(--accent-jade);
}

.exchange-row button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.log-loot {
    color: var(--text-gold);
}

.log-item {
    color: #7ec8a0;
}

.log-trade {
    color: #60c0e0;
}

.log-exchange {
    color: var(--text-gold);
}

/* ===== 商店 ===== */
.shop-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 0;
    max-height: 500px;
    overflow-y: auto;
}

.shop-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 10px;
}

.shop-item.locked {
    opacity: 0.5;
}

.shop-price {
    font-size: 12px;
    color: var(--text-gold);
}

.locked-text {
    font-size: 11px;
    color: #e06060;
}

.btn-shop {
    background: linear-gradient(135deg, rgba(96, 192, 224, 0.15), rgba(96, 192, 224, 0.05));
    border-color: rgba(96, 192, 224, 0.3);
}

.btn-inventory {
    background: linear-gradient(135deg, rgba(160, 160, 160, 0.15), rgba(160, 160, 160, 0.05));
    border-color: rgba(160, 160, 160, 0.3);
}

/* ===== 神庭面板 ===== */
.court-info {
    padding: 12px 0;
}

.court-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.court-label {
    color: var(--text-muted);
    font-size: 13px;
}

.court-value {
    color: var(--text-gold);
    font-size: 14px;
    font-weight: 500;
}

.btn-court-salary {
    background: linear-gradient(135deg, rgba(201, 153, 58, 0.2), rgba(201, 153, 58, 0.08));
    border: 1px solid rgba(201, 153, 58, 0.35);
    color: var(--text-gold);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-court-salary:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(201, 153, 58, 0.3), rgba(201, 153, 58, 0.15));
    transform: translateY(-1px);
}

.btn-court-salary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.court-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.6;
}

/* ===== 装备样式 ===== */
.inventory-item.equipped {
    border-color: rgba(201, 153, 58, 0.4);
    background: rgba(201, 153, 58, 0.06);
}

.equip-badge {
    font-size: 11px;
    color: var(--text-gold);
    margin-left: 6px;
}

/* ===== 功法与技能 ===== */
.technique-section {
    margin-bottom: 20px;
}

.technique-section-title {
    font-size: 13px;
    color: var(--text-gold);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(201, 153, 58, 0.2);
}

.technique-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.technique-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px 12px;
    transition: border-color 0.2s;
}

.technique-item.technique-active {
    border-color: rgba(201, 153, 58, 0.4);
    background: rgba(201, 153, 58, 0.06);
}

.technique-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.technique-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.technique-grade {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.grade-凡 {
    background: rgba(160, 160, 160, 0.2);
    color: #a0a0a0;
}

.grade-黄 {
    background: rgba(96, 192, 224, 0.15);
    color: #60c0e0;
}

.grade-玄 {
    background: rgba(224, 160, 64, 0.15);
    color: #e0a040;
}

.grade-地 {
    background: rgba(208, 80, 224, 0.15);
    color: #d050e0;
}

.grade-天 {
    background: rgba(255, 96, 64, 0.15);
    color: #ff6040;
}

.technique-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 4px;
    line-height: 1.4;
}

.technique-bonuses {
    font-size: 11px;
    color: #8fcf8f;
    margin-bottom: 6px;
}

.technique-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.technique-badge {
    font-size: 11px;
    color: var(--text-gold);
    background: rgba(201, 153, 58, 0.12);
    padding: 2px 8px;
    border-radius: 3px;
}

.btn-sm {
    padding: 3px 10px;
    font-size: 11px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-technique {
    background: rgba(96, 192, 224, 0.2);
    color: #60c0e0;
}

.btn-technique:hover {
    background: rgba(96, 192, 224, 0.35);
}

.btn-technique-off {
    background: rgba(201, 153, 58, 0.15);
    color: var(--text-gold);
}

.btn-technique-off:hover {
    background: rgba(201, 153, 58, 0.3);
}

.technique-empty {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
}

/* ===== 浅色模式 - 自动跟随系统设置 ===== */
@media (prefers-color-scheme: light) {
    :root {
        --bg-primary: #f5f0e8;
        --bg-secondary: #ebe5d8;
        --bg-card: #fff8ee;
        --bg-card-hover: #f0e8d8;
        --bg-panel: #f8f2e8;
        --border-color: #d4c8b0;
        --border-gold: #c9993a;

        --text-primary: #2a2520;
        --text-secondary: #6a5f50;
        --text-muted: #9a9080;
        --text-gold: #a07828;
        --text-jade: #1a7a68;
        --text-red: #b83030;
        --text-blue: #2a6a9a;

        --accent-gold: #b88830;
        --accent-jade: #2a8a78;
        --accent-crimson: #a82020;
        --accent-purple: #6a4a9a;
        --accent-blue: #3a7aaa;

        --gradient-gold: linear-gradient(135deg, #c9993a 0%, #e8c068 50%, #c9993a 100%);
        --gradient-jade: linear-gradient(135deg, #2a8a78 0%, #4aaa98 100%);
        --gradient-bg: linear-gradient(180deg, #f5f0e8 0%, #ebe5d8 50%, #f0ead8 100%);

        --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
        --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
        --shadow-glow-gold: 0 0 20px rgba(201, 153, 58, 0.12);
    }

    /* 登录页 */
    .login-page {
        background: var(--gradient-bg);
    }

    .login-bg-overlay {
        background: rgba(245, 240, 232, 0.6);
    }

    /* 按钮文字颜色 */
    .btn-primary {
        color: #fff;
    }

    /* 输入框 */
    input[type="text"],
    input[type="email"],
    input[type="password"] {
        background: #fff;
        border-color: var(--border-color);
        color: var(--text-primary);
    }

    input[type="text"]::placeholder,
    input[type="email"]::placeholder,
    input[type="password"]::placeholder {
        color: var(--text-muted);
    }

    /* 游戏页面 */
    .game-page {
        background: var(--gradient-bg);
    }

    /* 探索日志文字颜色覆盖 */
    .log-combat {
        color: #b83030;
    }

    .log-warning {
        color: #b07020;
    }

    .log-info {
        color: #2a6a9a;
    }

    .log-system {
        color: #2a6a9a;
    }

    .log-gray {
        color: #8a8070;
    }

    .log-spirit {
        color: #1a7a68;
    }

    .log-gold {
        color: #a07828;
    }

    .log-purple {
        color: #6a4a9a;
    }

    /* 地图 SVG */
    .map-container svg text {
        fill: var(--text-primary);
    }

    /* 聊天消息 */
    .chat-msg {
        border-color: var(--border-color);
    }

    /* 死亡界面 */
    .death-overlay {
        background: linear-gradient(180deg, #e8d8c8 0%, #f0e4d4 100%);
    }

    .death-title {
        color: #a82020;
    }

    .death-subtitle {
        color: #6a5040;
    }

    .death-info {
        color: #8a7060;
    }

    .death-cause {
        color: #a82020;
    }

    .death-stat-label {
        color: #6a5a50;
    }

    .death-stat-value {
        color: #a82020;
    }

    .death-separator {
        border-color: #c4a888;
    }

    .btn-revive {
        color: #fff;
    }

    /* 品质颜色浅色适配 */
    .quality-common {
        color: #6a6050;
    }

    .quality-uncommon {
        color: #1a7a68;
    }

    .quality-rare {
        color: #2a6a9a;
    }

    .quality-epic {
        color: #6a4a9a;
    }

    .quality-legendary {
        color: #b87020;
    }

    /* 装备栏 */
    .equip-slot {
        border-color: var(--border-color);
        background: var(--bg-card);
    }

    /* 商铺 */
    .shop-item {
        border-color: var(--border-color);
    }

    /* 底部操作栏 */
    .bottom-action-bar {
        background: rgba(248, 242, 232, 0.95);
        border-top-color: var(--border-color);
    }

    /* 游戏时间 */
    .game-time-display.night {
        color: #6a4a9a;
        background: rgba(106, 74, 154, 0.1);
    }

    /* 排行榜 */
    .rank-gold {
        color: #a07828;
    }

    .rank-silver {
        color: #6a6a70;
    }

    .rank-bronze {
        color: #8a6a40;
    }

    /* 滚动条 */
    ::-webkit-scrollbar-track {
        background: var(--bg-secondary);
    }

    ::-webkit-scrollbar-thumb {
        background: #c4b8a0;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #a89880;
    }
}

/* ===== 天策司任务 ===== */
.court-task-section {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.panel-subtitle {
    font-size: 15px;
    color: var(--accent-gold);
    margin: 0 0 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.task-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.task-tab {
    flex: 1;
    padding: 6px 0;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.2s;
}

.task-tab:hover {
    border-color: var(--accent-gold);
    color: var(--text-color);
}

.task-tab.active {
    background: linear-gradient(135deg, var(--accent-gold), #c9a448);
    color: #1a1410;
    border-color: transparent;
    font-weight: 600;
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.task-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    padding: 20px 0;
}

.task-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    transition: border-color 0.2s;
}

.task-card:hover {
    border-color: var(--accent-jade);
}

.task-card.task-completed {
    border-color: var(--accent-gold);
    background: rgba(201, 164, 72, 0.08);
}

.task-card.task-claimed {
    opacity: 0.5;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.task-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.task-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.task-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-jade), var(--accent-gold));
    border-radius: 2px;
    transition: width 0.3s;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
}

.task-progress-text {
    color: var(--text-muted);
}

.task-reward {
    color: var(--accent-gold);
}

.btn-task-claim {
    padding: 2px 10px;
    font-size: 11px;
    background: linear-gradient(135deg, var(--accent-gold), #c9a448);
    color: #1a1410;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
}

.btn-task-claim:hover {
    filter: brightness(1.1);
}

.task-claimed-tag {
    font-size: 11px;
    color: var(--text-muted);
}

/* ===== 公告弹窗 ===== */
.announce-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: announceFadeIn 0.3s ease;
}

.announce-overlay.hidden {
    display: none;
}

@keyframes announceFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.announce-modal {
    background: var(--bg-card);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    max-width: 420px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: announceSlideIn 0.3s ease;
}

@keyframes announceSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.announce-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-color);
}

.announce-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-gold);
    font-family: 'ZCOOL XiaoWei', serif;
    letter-spacing: 2px;
}

.announce-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    padding: 0 4px;
    font-family: inherit;
}

.announce-close:hover {
    color: var(--text-color);
}

.announce-counter {
    font-size: 12px;
    color: var(--text-muted);
}

.announce-body {
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-color);
}

.announce-body h3 {
    font-size: 15px;
    color: var(--accent-gold);
    margin: 0 0 8px;
    text-align: center;
}

.announce-body p {
    margin: 6px 0;
}

.announce-body ul {
    padding-left: 18px;
    margin: 8px 0;
}

.announce-body li {
    margin: 4px 0;
    color: var(--text-muted);
}

.announce-warn {
    color: #e8a838;
    font-size: 12px;
    background: rgba(232, 168, 56, 0.1);
    padding: 6px 10px;
    border-radius: 4px;
    border-left: 3px solid #e8a838;
}

.announce-confirm {
    display: block;
    width: calc(100% - 32px);
    margin: 4px 16px 14px;
    padding: 10px;
    background: linear-gradient(135deg, var(--accent-gold), #c9a448);
    color: #1a1410;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    font-family: 'ZCOOL XiaoWei', serif;
    letter-spacing: 2px;
    transition: filter 0.2s;
}

.announce-confirm:hover {
    filter: brightness(1.1);
}