/* ========== RESET & 宣纸基底 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
body {
    font-family: 'Noto Serif SC', '宋体', serif;
    background: #FDF8E6 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100" opacity="0.06"><path fill="none" stroke="%238B6B4A" stroke-width="0.4" d="M20 30 Q 60 10, 100 25 T 180 20 M10 70 Q 50 50, 90 65 T 170 60"/></svg>');
    background-repeat: repeat;
    color: #3A3226;
    line-height: 1.5;
    overflow-x: hidden;
    min-height: 100vh;
}
.container { max-width: 1400px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 5; }

/* ========== 玻璃态组件 ========== */
.glass-card {
    background: rgba(255, 249, 239, 0.75);
    backdrop-filter: blur(16px);
    border-radius: 32px;
    border: 1px solid rgba(199, 130, 90, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    transition: transform 0.25s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 32px -8px rgba(139, 30, 45, 0.12);
    border-color: rgba(199, 130, 90, 0.6);
}

/* ========== HEADER ========== */
.site-header, .site-footer {
    background: #1A1612;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 100;
}
.site-header {
    border-bottom: 1px solid rgba(217, 180, 139, 0.3);
}
.site-footer {
    border-top: 1px solid rgba(217, 180, 139, 0.3);
    padding: 30px 0;
    margin-top: 60px;
}
.site-header::before, .site-footer::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, #8B1E2D, transparent);
}
.site-header::before { top: 0; }
.site-footer::before { top: -3px; }
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    max-width: 1400px;
    margin: 0 auto;
}
.logo a {
    font-size: 26px;
    font-weight: 700;
    color: #F0E2C5;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    text-decoration: none;
}
.main-nav { position: absolute; left: 50%; transform: translateX(-50%); }
.nav-list { display: flex; list-style: none; gap: 42px; }
.nav-link {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #E8DDD0;
    padding: 6px 0;
    position: relative;
    text-decoration: none;
}
.nav-link i { font-size: 16px; color: #D9B48B; transition: color 0.2s; }
.nav-link:hover i { color: #F0E2C5; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 2px;
    background: #C77A5A;
    transition: width 0.25s;
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: #F0E2C5; }
.menu-toggle { display: none; flex-direction: column; cursor: pointer; z-index: 10; }
.menu-toggle span { width: 26px; height: 2px; background: #ECE3D8; margin: 5px 0; transition: 0.3s; }

@media (max-width: 768px) {
    .main-nav { position: static; transform: none; }
    .nav-list {
        position: fixed; top: 70px; left: -100%;
        width: 75%; height: calc(100vh - 70px);
        background: #2A241E;
        flex-direction: column;
        align-items: center;
        padding-top: 50px;
        transition: left 0.3s;
        gap: 28px;
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
        z-index: 99;
        border-left: 3px solid #8B1E2D;
    }
    .nav-list.show { left: 0; }
    .menu-toggle { display: flex; }
    .header-container { justify-content: space-between; }
}

/* ========== 主游戏区 ========== */
.game-container {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 40px 0;
}
.map-area {
    flex: 2.2; min-width: 500px;
    background: rgba(255, 249, 239, 0.75);
    backdrop-filter: blur(16px);
    border-radius: 48px 16px 48px 16px;
    padding: 18px;
    border: 1px solid rgba(199, 130, 90, 0.3);
    box-shadow: 0 20px 30px -8px rgba(0, 0, 0, 0.08);
    position: relative;
}
.map-area::before {
    content: "⚔️ 江湖行 · 恩怨情仇 ⚔️";
    position: absolute;
    top: -14px; left: 30px;
    background: #FDF8E6;
    padding: 0 18px;
    color: #8B1E2D;
    font-size: 14px;
    letter-spacing: 4px;
    border-radius: 30px;
    border: 1px solid #D9B48B;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
canvas {
    width: 100%; height: auto;
    background: #E8DDD0;
    border-radius: 24px;
    display: block;
    cursor: pointer;
    border: 2px solid #D9B48B;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.03);
    transition: filter 0.3s;
}
.info-area {
    flex: 1.4; min-width: 300px;
    background: rgba(255, 249, 239, 0.75);
    backdrop-filter: blur(16px);
    border-radius: 32px 48px 32px 48px;
    padding: 24px 20px;
    border: 1px solid rgba(199, 130, 90, 0.3);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    color: #3A3226;
}
.stat-panel { margin-bottom: 16px; }
.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(139, 30, 45, 0.2);
    font-size: 1.05rem;
}
.stat-item i { color: #8B1E2D; width: 24px; }
.progress-bar {
    background: rgba(0,0,0,0.08);
    border-radius: 30px;
    height: 10px;
    overflow: hidden;
    margin: 10px 0 20px;
    border: 1px solid #D9B48B;
}
.progress-fill {
    background: linear-gradient(90deg, #D9B48B, #E6C27A);
    width: 0%; height: 100%;
    box-shadow: 0 0 6px rgba(199, 122, 90, 0.3);
    transition: width 0.3s;
}
.scene-card {
    background: rgba(255, 245, 230, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 28px;
    padding: 20px 16px;
    margin: 16px 0;
    border-left: 6px solid #8B1E2D;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.scene-title {
    font-size: 1.4rem;
    color: #8B1E2D;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.btn {
    background: #8B1E2D;
    border: 1px solid #D9B48B;
    padding: 12px 16px;
    border-radius: 60px;
    color: #FDF8E6;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    margin-top: 12px;
    width: 100%;
    letter-spacing: 2px;
    box-shadow: 0 4px 0 #5A121C;
}
.btn i { margin-right: 8px; color: #F0E2C5; }
.btn:hover {
    background: #A82F3D;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #5A121C, 0 0 12px rgba(139,30,45,0.3);
}
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #5A121C; }
.btn-secondary { background: #6A4E2E; border-color: #C2A060; box-shadow: 0 4px 0 #4A3620; }
.btn-secondary:hover { background: #8B6B4A; }

.quest-log {
    background: rgba(255, 245, 230, 0.8);
    border-radius: 24px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #D9B48B;
    max-height: 220px;
    overflow-y: auto;
}
.quest-log h4 {
    color: #8B1E2D;
    margin-bottom: 12px;
    border-bottom: 1px dashed #D9B48B;
    padding-bottom: 6px;
}
.quest-item {
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid #D9B48B;
    font-size: 0.9rem;
}
.quest-item.active { border-left-color: #8B1E2D; }
.event-log {
    height: 120px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: #5A4A3A;
    margin-top: 12px;
    border-top: 1px solid rgba(139,30,45,0.2);
    padding-top: 12px;
}
.log-entry {
    margin-bottom: 10px;
    padding-left: 12px;
    border-left: 3px solid #D9B48B;
    font-style: italic;
}
.archive-panel {
    background: rgba(255, 245, 230, 0.8);
    border-radius: 20px;
    padding: 12px;
    margin-top: 12px;
    border: 1px solid #D9B48B;
    font-size: 0.9rem;
}
.archive-title { color: #8B1E2D; margin-bottom: 6px; font-weight: bold; }

/* 模态框 (浅色) */
.dialog-modal, .modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(12px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.dialog-content, .modal-content {
    background: #FFF9EF;
    color: #3A3226;
    max-width: 600px;
    width: 90%;
    border-radius: 48px 24px 48px 24px;
    border: 3px solid #D9B48B;
    box-shadow: 0 30px 50px rgba(0,0,0,0.2);
    padding: 28px;
}
.dialog-header {
    font-size: 2rem;
    color: #8B1E2D;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dialog-text { font-size: 1.2rem; margin: 24px 0; line-height: 1.6; }
.dialog-options { display: flex; flex-direction: column; gap: 12px; }
.dialog-btn {
    background: #8B1E2D;
    border: 1px solid #D9B48B;
    padding: 14px;
    border-radius: 60px;
    color: #FDF8E6;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
    text-align: left;
    padding-left: 24px;
}
.dialog-btn:hover { background: #A82F3D; }
.close-dialog, .close-modal {
    margin-top: 24px;
    background: transparent;
    border: 1px solid #8B1E2D;
    padding: 8px 24px;
    border-radius: 60px;
    color: #8B1E2D;
    cursor: pointer;
}
.modal-header {
    font-size: 2.2rem;
    color: #8B1E2D;
    margin-bottom: 20px;
    font-weight: 600;
    text-align: center;
}
.task-options { display: flex; flex-direction: column; gap: 14px; margin: 24px 0; }
.task-btn {
    background: #8B1E2D;
    border: 1px solid #D9B48B;
    padding: 12px;
    border-radius: 60px;
    cursor: pointer;
    font-weight: 600;
    color: #FDF8E6;
    transition: 0.15s;
}
.task-btn:hover { background: #A82F3D; }
input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 60px;
    border: 1px solid #D9B48B;
    margin: 16px 0;
    background: #FDF8E6;
    color: #3A3226;
}
.battle-card {
    background: rgba(255, 245, 230, 0.9);
    border-radius: 30px;
    padding: 15px;
    border: 1px solid #D9B48B;
}
.hp-bar {
    background: #E8DDD0;
    height: 12px;
    border-radius: 20px;
    overflow: hidden;
    margin: 8px 0;
}
.hp-fill {
    background: #C77A5A;
    height: 100%;
    width: 100%;
    transition: width 0.3s;
}
.card-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 20px 0;
}
.skill-card {
    background: #8B1E2D;
    border: 1px solid #D9B48B;
    border-radius: 24px;
    padding: 16px 8px;
    flex: 1;
    text-align: center;
    cursor: pointer;
    color: #FDF8E6;
    transition: 0.1s;
}
.skill-card:hover { background: #A82F3D; transform: scale(1.02); }
.skill-card i { font-size: 24px; color: #F0E2C5; margin-bottom: 8px; }

/* 页脚精简 */
.footer-copyright {
    text-align: center;
    font-size: 13px;
    color: #8A7E6E;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .map-area { min-width: 280px; }
}