        :root {
            --gold: #D4AF37;
            --gold-dim: #aa8c2c;
            --brown: #8B4513;
            --dark-bg: #0a0a0a;
            --panel-bg: rgba(15, 15, 15, 0.95);
            --text-color: #f0e6d2;
            --highlight: #ff4500;
        }

        * { box-sizing: border-box; user-select: none; }
        body {
            margin: 0; padding: 0;
            background-color: #000;
            color: var(--text-color);
            font-family: "STKaiti", "华文楷体", "KaiTi", "楷体", "Noto Serif SC", "SimSun", "宋体", serif;
            overflow: hidden;
            width: 100vw;
            height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .btn {
            background: linear-gradient(to bottom, var(--gold), var(--brown));
            border: 2px solid var(--gold);
            color: #fff;
            padding: clamp(8px, 1.2vh, 12px) clamp(16px, 2.5vw, 24px);
            font-size: clamp(15px, 2vh, 20px);
            font-family: "STKaiti", "华文楷体", "KaiTi", "楷体", "Noto Serif SC", serif;
            cursor: pointer;
            transition: all 0.3s;
            text-shadow: 1px 1px 2px black;
            border-radius: 6px;
            min-width: 80px;
        }

        .btn:hover { transform: scale(1.05); box-shadow: 0 0 15px var(--gold); }
        .btn:disabled { filter: grayscale(1); cursor: not-allowed; }

        #game-container { width: 100vw; height: 100vh; position: relative; overflow: hidden; }
        .screen { position: absolute; width: 100%; height: 100%; display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 10; overflow: hidden; }
        .screen.active { display: flex; }

        /* 音乐控制按钮 - 左上角 */
        #music-btn {
            position: fixed;
            top: clamp(10px, 2vh, 20px);
            left: clamp(10px, 2vw, 20px);
            width: clamp(36px, 5vw, 44px);
            height: clamp(36px, 5vw, 44px);
            border-radius: 50%;
            background: linear-gradient(135deg, rgba(30,25,15,0.9), rgba(50,40,20,0.9));
            border: 2px solid var(--gold);
            color: var(--gold);
            font-size: clamp(16px, 2vw, 20px);
            cursor: pointer;
            z-index: 9999;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            box-shadow: 0 0 10px rgba(212,175,55,0.3);
        }
        #music-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 0 20px rgba(212,175,55,0.5);
        }
        #music-btn.playing {
            animation: musicPulse 2s ease-in-out infinite;
        }
        @keyframes musicPulse {
            0%, 100% { box-shadow: 0 0 10px rgba(212,175,55,0.3); }
            50% { box-shadow: 0 0 25px rgba(212,175,55,0.6); }
        }

        /* 倒计时数字 - 简洁古风 */
        #hourglass-timer {
            position: absolute;
            top: 12%;
            left: 50%;
            transform: translateX(-50%);
            z-index: 100;
            display: none;
            pointer-events: none;
        }
        #hourglass-timer.visible {
            display: block;
            animation: timerFadeIn 0.3s ease-out;
        }
        @keyframes timerFadeIn {
            from { opacity: 0; transform: translateX(-50%) scale(0.8); }
            to { opacity: 1; transform: translateX(-50%) scale(1); }
        }
        #hourglass-timer .hg-time {
            font-size: clamp(48px, 8vw, 72px);
            font-weight: bold;
            color: var(--gold);
            text-shadow:
                0 0 30px rgba(212,175,55,0.9),
                0 0 60px rgba(212,175,55,0.5),
                0 4px 8px rgba(0,0,0,0.8);
            font-family: "STKaiti", "华文楷体", serif;
        }
        /* 数字跳动动画 */
        #hourglass-timer .hg-time.tick {
            animation: numberTick 0.4s ease-out;
        }
        @keyframes numberTick {
            0% { transform: scale(1.4); opacity: 0.6; }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); opacity: 1; }
        }
        /* 警告状态 */
        #hourglass-timer .hg-time.warning {
            color: #FF4500;
            text-shadow:
                0 0 30px rgba(255,69,0,0.9),
                0 0 60px rgba(255,69,0,0.5),
                0 4px 8px rgba(0,0,0,0.8);
            animation: warningPulse 0.5s ease-in-out infinite;
        }
        @keyframes warningPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }

        /* 选角倒计时器 — 复用沙漏计时器风格 */
        #char-select-timer {
            display: none;
            text-align: center;
            margin: 2px 0;
            pointer-events: none;
        }
        #char-select-timer.visible {
            display: block;
            animation: timerFadeIn 0.3s ease-out;
        }
        #char-select-timer .cst-time {
            font-size: clamp(36px, 6vw, 56px);
            font-weight: bold;
            color: var(--gold);
            text-shadow:
                0 0 20px rgba(212,175,55,0.8),
                0 0 40px rgba(212,175,55,0.4),
                0 3px 6px rgba(0,0,0,0.7);
            font-family: "STKaiti", "华文楷体", serif;
            line-height: 1;
        }
        #char-select-timer .cst-time.tick {
            animation: numberTick 0.4s ease-out;
        }
        #char-select-timer .cst-time.warning {
            color: #FF4500;
            text-shadow:
                0 0 20px rgba(255,69,0,0.8),
                0 0 40px rgba(255,69,0,0.4),
                0 3px 6px rgba(0,0,0,0.7);
            animation: warningPulse 0.5s ease-in-out infinite;
        }
        #char-select-timer .cst-label {
            font-size: clamp(10px, 1.2vw, 14px);
            color: #c9b896;
            margin-top: 2px;
        }

        /* 主菜单模式选择 */
        .menu-modes {
            display: flex; gap: clamp(20px, 4vw, 40px);
            margin-top: clamp(8px, 1.5vh, 15px);
        }
        .menu-modes-sm { gap: clamp(12px, 2.5vw, 24px); }
        /* 模式按钮底部定位 */
        .menu-modes-bottom {
            margin-top: clamp(6px, 1vh, 12px);
            margin-bottom: clamp(4px, 0.6vh, 8px);
        }
        .mode-card {
            width: clamp(200px, 22vw, 280px);
            background: linear-gradient(135deg, rgba(25,20,10,0.9), rgba(40,30,15,0.9));
            border: 2px solid var(--gold-dim);
            border-radius: 16px;
            padding: clamp(20px, 3vw, 35px) clamp(15px, 2vw, 25px);
            cursor: pointer;
            transition: all 0.3s ease;
            text-align: center;
        }
        .mode-card:hover {
            border-color: var(--gold);
            transform: translateY(-4px);
            box-shadow: 0 8px 30px rgba(212,175,55,0.3);
        }
        .mode-card .mode-icon { font-size: clamp(36px, 5vw, 56px); display: block; margin-bottom: 10px; }
        .mode-card .mode-title { font-size: clamp(20px, 2.8vw, 28px); color: var(--gold); font-weight: bold; display: block; margin-bottom: 8px; }
        .mode-card .mode-desc { font-size: clamp(13px, 1.5vw, 16px); color: #aaa; line-height: 1.6; }
        /* 缩小版模式卡片 */
        .mode-card-sm {
            width: clamp(130px, 14vw, 170px) !important;
            padding: clamp(10px, 1.5vw, 18px) clamp(10px, 1.5vw, 16px) !important;
            border-radius: 12px !important;
        }
        .mode-card-sm .mode-icon { font-size: clamp(26px, 3.2vw, 38px) !important; margin-bottom: 4px !important; }
        .mode-card-sm .mode-title { font-size: clamp(15px, 2vw, 20px) !important; margin-bottom: 0 !important; }
        /* 缩小版按钮 */
        .btn-sm {
            padding: clamp(5px, 0.8vh, 8px) clamp(10px, 1.8vw, 16px) !important;
            font-size: clamp(13px, 1.6vh, 17px) !important;
        }

        /* ==== 启动界面图鉴区域 ==== */
        .menu-guide {
            display: flex;
            gap: clamp(10px, 1.5vw, 20px);
            width: 90%;
            max-width: 920px;
            max-height: clamp(280px, 42vh, 420px);
            margin: clamp(4px, 1vh, 10px) auto;
        }
        .guide-col {
            flex: 1;
            background: linear-gradient(135deg, rgba(15,12,5,0.85), rgba(30,25,10,0.85));
            border: 1px solid var(--gold-dim);
            border-radius: 10px;
            padding: clamp(6px, 1vw, 12px);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .guide-title {
            color: var(--gold);
            font-size: clamp(14px, 1.8vw, 19px);
            font-weight: bold;
            text-align: center;
            margin-bottom: clamp(4px, 0.6vh, 8px);
            flex-shrink: 0;
        }
        .guide-scroll {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: thin;
            scrollbar-color: var(--gold-dim) transparent;
        }
        .guide-scroll::-webkit-scrollbar { width: 4px; }
        .guide-scroll::-webkit-scrollbar-track { background: transparent; }
        .guide-scroll::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

        .guide-item {
            padding: clamp(4px, 0.6vh, 7px) clamp(6px, 0.8vw, 10px);
            border-bottom: 1px solid rgba(212,175,55,0.15);
            cursor: pointer;
            transition: background 0.2s;
            border-radius: 4px;
        }
        .guide-item:hover { background: rgba(212,175,55,0.1); }
        .guide-item:last-child { border-bottom: none; }
        .guide-item-icon { font-size: clamp(15px, 1.8vw, 20px); margin-right: 4px; }
        .guide-item-name {
            font-size: clamp(13px, 1.5vw, 17px);
            color: #f0e6d2;
            font-weight: bold;
        }
        .guide-item-tag {
            font-size: clamp(10px, 1.1vw, 13px);
            padding: 1px 5px;
            border-radius: 3px;
            margin-left: 4px;
            vertical-align: middle;
        }
        .guide-item-tag.supreme { background: rgba(255,215,0,0.25); color: #FFD700; border: 1px solid rgba(255,215,0,0.4); }
        .guide-item-tag.elite { background: rgba(147,112,219,0.25); color: #DDA0DD; border: 1px solid rgba(147,112,219,0.4); }
        .guide-item-tag.event { background: rgba(100,200,100,0.2); color: #90EE90; border: 1px solid rgba(100,200,100,0.3); }
        .guide-item-desc {
            font-size: clamp(11px, 1.2vw, 14px);
            color: #999;
            margin-top: 2px;
            line-height: 1.4;
        }
        .guide-item-detail {
            display: none;
            font-size: clamp(11px, 1.2vw, 14px);
            color: #c9b896;
            margin-top: 3px;
            padding: 4px 6px;
            background: rgba(0,0,0,0.3);
            border-radius: 4px;
            line-height: 1.5;
        }
        .guide-item.expanded .guide-item-detail { display: block; }

        /* 神兽图鉴卡片 */
        .guide-beast-card {
            padding: clamp(5px, 0.7vh, 8px) clamp(6px, 0.8vw, 10px);
            border-bottom: 1px solid rgba(212,175,55,0.15);
            cursor: pointer;
            transition: background 0.2s;
            border-radius: 4px;
        }
        .guide-beast-card:hover { background: rgba(212,175,55,0.1); }
        .guide-beast-card:last-child { border-bottom: none; }
        .guide-beast-header {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .guide-beast-name {
            font-size: clamp(14px, 1.6vw, 18px);
            font-weight: bold;
        }
        .guide-beast-type {
            font-size: clamp(10px, 1.1vw, 13px);
            padding: 1px 5px;
            border-radius: 3px;
            background: rgba(100,100,100,0.3);
            color: #ccc;
            border: 1px solid rgba(150,150,150,0.3);
        }
        .guide-beast-ability {
            font-size: clamp(11px, 1.2vw, 14px);
            color: #aaa;
            margin-top: 2px;
        }
        .guide-beast-detail {
            display: none;
            font-size: clamp(11px, 1.2vw, 14px);
            color: #c9b896;
            margin-top: 4px;
            padding: 5px 7px;
            background: rgba(0,0,0,0.3);
            border-radius: 4px;
            line-height: 1.5;
        }
        .guide-beast-card.expanded .guide-beast-detail { display: block; }

        /* 底部古朴描述 */
        .menu-lore {
            color: rgba(200,184,150,0.8);
            font-size: clamp(12px, 1.4vw, 16px);
            text-align: center;
            max-width: 700px;
            margin: clamp(4px, 0.8vh, 8px) auto;
            line-height: 1.7;
            letter-spacing: 1px;
        }
        /* 底部版本文字加粗 */
        .menu-lore-bottom {
            font-weight: bold;
            margin: clamp(2px, 0.4vh, 5px) auto;
        }

        /* 玩法精髓提示 */
        .menu-tips {
            color: rgba(255,215,100,0.85);
            font-size: clamp(11px, 1.2vw, 14px);
            text-align: center;
            max-width: 680px;
            margin: clamp(2px, 0.5vh, 6px) auto;
            line-height: 1.6;
            letter-spacing: 0.5px;
            font-style: italic;
            padding: 4px 12px;
            background: rgba(255,215,0,0.06);
            border-radius: 8px;
            border: 1px solid rgba(255,215,0,0.15);
        }
        /* 底部版本提示加粗 */
        .menu-tips-bottom {
            font-weight: bold;
            font-style: normal;
            margin: clamp(1px, 0.3vh, 4px) auto;
        }

        /* 子菜单面板 */
        .sub-menu {
            display: none;
            flex-direction: column;
            align-items: center;
            gap: clamp(6px, 1vh, 12px);
            margin-top: clamp(6px, 1.2vh, 12px);
            animation: fadeSlideUp 0.3s ease-out;
        }
        .sub-menu.active { display: flex; }
        @keyframes fadeSlideUp {
            from { opacity: 0; transform: translateY(15px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .sub-menu .sub-title {
            font-size: clamp(16px, 2vw, 22px);
            color: var(--gold);
            margin-bottom: 5px;
        }
        .sub-menu .btn-row {
            display: flex; flex-wrap: wrap; justify-content: center;
            gap: clamp(8px, 1.2vw, 14px);
        }

        /* 多人模式配置面板 */
        #multi-config-screen {
            overflow-y: auto;
        }
        .multi-config-panel {
            background: linear-gradient(135deg, rgba(25,20,10,0.95), rgba(40,30,15,0.95));
            border: 2px solid var(--gold);
            border-radius: 16px;
            padding: clamp(20px, 3vw, 35px);
            max-width: 1200px;
            width: 95%;
            position: relative;
            z-index: 1;
            display: flex;
            gap: 20px;
        }
        .multi-config-panel h2 {
            text-align: center;
            color: var(--gold);
            font-size: clamp(22px, 3.5vw, 32px);
            margin-bottom: 20px;
        }
        
        /* 房间列表面板 */
        .room-list-panel {
            flex: 1;
            min-width: 300px;
            display: flex;
            flex-direction: column;
        }
        .room-list-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(212,175,55,0.3);
        }
        .room-list-header h3 {
            color: var(--gold);
            font-size: clamp(16px, 2vw, 20px);
            margin: 0;
        }
        /* 模式筛选栏 */
        .mode-filter-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 12px;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(212,175,55,0.15);
        }
        .mode-filter-btn {
            padding: 5px 12px;
            font-size: 12px;
            color: #aaa;
            background: rgba(0,0,0,0.3);
            border: 1px solid rgba(212,175,55,0.2);
            border-radius: 16px;
            cursor: pointer;
            transition: all 0.2s;
            font-family: inherit;
        }
        .mode-filter-btn:hover {
            color: var(--gold);
            border-color: rgba(212,175,55,0.5);
            background: rgba(212,175,55,0.1);
        }
        .mode-filter-btn.active {
            color: #fff;
            background: linear-gradient(135deg, rgba(180,140,40,0.6), rgba(120,90,20,0.6));
            border-color: var(--gold);
        }
        .room-list-container {
            flex: 1;
            overflow-y: auto;
            max-height: 400px;
        }
        .room-card {
            background: rgba(0,0,0,0.4);
            border: 1px solid rgba(212,175,55,0.3);
            border-radius: 10px;
            padding: 12px 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
        }
        .room-card:hover {
            border-color: var(--gold);
            background: rgba(212,175,55,0.1);
        }
        .room-card.full {
            opacity: 0.7;
        }
        .room-card .room-name {
            color: var(--gold);
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 8px;
        }
        .room-card .room-info {
            display: flex;
            justify-content: space-between;
            font-size: 13px;
            color: #aaa;
        }
        .room-card .room-players {
            display: flex;
            gap: 5px;
            margin-top: 8px;
        }
        .room-card .player-slot {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.3);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 10px;
        }
        .room-card .player-slot.blue { border-color: #4FC3F7; background: rgba(79,195,247,0.2); }
        .room-card .player-slot.red { border-color: #EF5350; background: rgba(239,83,80,0.2); }
        .room-card .player-slot.filled { background: rgba(255,255,255,0.3); }
        .room-card .player-slot.ai { background: rgba(255,255,255,0.1); }
        
        /* 房间配置面板 */
        .room-config-panel {
            flex: 1;
            min-width: 350px;
            background: rgba(0,0,0,0.3);
            border-radius: 12px;
            padding: 15px;
        }
        .room-config-panel h3 {
            color: var(--gold);
            font-size: clamp(16px, 2vw, 20px);
            margin: 0 0 15px 0;
            text-align: center;
            padding-bottom: 10px;
            border-bottom: 1px solid rgba(212,175,55,0.3);
        }
        
        .config-section {
            margin-bottom: 18px;
        }
        .config-section label {
            display: block;
            color: var(--gold);
            font-size: clamp(14px, 1.5vw, 18px);
            margin-bottom: 8px;
        }
        .team-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 10px 14px;
            margin-bottom: 8px;
            background: rgba(0,0,0,0.3);
            border-radius: 8px;
            border: 1px solid rgba(212,175,55,0.2);
        }
        .team-row .team-label {
            font-size: clamp(14px, 1.5vw, 17px);
            color: #e0d4b8;
            font-weight: bold;
            min-width: 60px;
        }
        .team-row .team-slots {
            display: flex; gap: 8px; align-items: center;
        }
        .slot-control {
            display: flex; align-items: center; gap: 6px;
            background: rgba(0,0,0,0.3);
            border-radius: 6px;
            padding: 4px 10px;
        }
        .slot-control span { color: #ccc; font-size: 13px; }
        .slot-control .num {
            font-size: 18px; font-weight: bold; color: var(--gold);
            min-width: 20px; text-align: center;
        }
        .slot-btn {
            width: 24px; height: 24px; border-radius: 50%;
            border: 1px solid var(--gold-dim);
            background: rgba(212,175,55,0.15);
            color: var(--gold); font-size: 16px;
            cursor: pointer; display: flex;
            align-items: center; justify-content: center;
            transition: all 0.2s;
        }
        .slot-btn:hover { background: rgba(212,175,55,0.3); }
        .slot-btn:disabled { opacity: 0.3; cursor: not-allowed; }
        .team-vs {
            font-size: clamp(20px, 3vw, 30px);
            color: #FF4500;
            font-weight: bold;
            text-shadow: 0 0 10px rgba(255,69,0,0.5);
            text-align: center;
            margin: 5px 0;
        }
        .config-summary {
            text-align: center;
            padding: 10px;
            background: rgba(0,0,0,0.3);
            border-radius: 8px;
            border: 1px solid rgba(212,175,55,0.2);
            margin-top: 12px;
            color: #c9b896;
            font-size: 14px;
        }

        /* 美化弹窗 v5.1 */
        .nickname-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(4px);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2000;
        }
        .nickname-modal-content {
            background: linear-gradient(145deg, rgba(30, 25, 15, 0.92), rgba(45, 35, 20, 0.88));
            border: 2px solid rgba(212, 175, 55, 0.7);
            border-radius: 20px;
            padding: clamp(28px, 4vw, 45px);
            width: 90%;
            max-width: 420px;
            text-align: center;
            box-shadow:
                0 0 40px rgba(212, 175, 55, 0.15),
                0 10px 40px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(10px);
        }
        .nickname-modal-content h3 {
            color: var(--gold);
            font-size: clamp(22px, 3vw, 28px);
            margin: 0 0 20px 0;
            text-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
        }
        .nickname-modal-content p {
            color: #bbb;
            font-size: 15px;
            margin-bottom: 18px;
        }
        .nickname-input {
            width: 100%;
            padding: 14px 18px;
            background: rgba(0, 0, 0, 0.4);
            border: 2px solid rgba(212, 175, 55, 0.4);
            border-radius: 10px;
            color: #f0e6d2;
            font-size: 18px;
            font-family: "STKaiti", "华文楷体", serif;
            text-align: center;
            outline: none;
            transition: all 0.3s;
        }
        .nickname-input:focus {
            border-color: var(--gold);
            box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
            background: rgba(0, 0, 0, 0.5);
        }
        .nickname-input::placeholder {
            color: #777;
        }
        .nickname-error {
            color: #FF6347;
            font-size: 13px;
            margin-top: 12px;
            min-height: 20px;
        }
        .mode-btn {
            width: 100%;
            padding: 14px 24px;
            font-size: 16px;
            border-radius: 10px;
            transition: all 0.3s;
        }
        .mode-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
        }
        .mode-tag {
            background: rgba(255, 200, 100, 0.25);
            color: #ffd700;
            padding: 3px 10px;
            border-radius: 6px;
            font-size: 12px;
            border: 1px solid rgba(255, 200, 100, 0.3);
        }
        
        /* 房间内玩家列表 */
        .room-players-list {
            margin-top: 15px;
        }
        .room-player-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            background: rgba(0,0,0,0.2);
            border-radius: 6px;
            margin-bottom: 6px;
            border: 1px solid rgba(212,175,55,0.2);
        }
        .room-player-item .player-name {
            color: #f0e6d2;
            font-size: 14px;
        }
        .room-player-item .player-actions {
            display: flex;
            gap: 5px;
        }
        .room-player-item .player-actions button {
            padding: 4px 8px;
            font-size: 11px;
            border-radius: 4px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .room-player-item.is-host .player-name::after {
            content: '👑';
            margin-left: 5px;
        }
        .room-player-item.is-you {
            border-color: var(--gold);
            background: rgba(212,175,55,0.1);
        }
        
        /* 观战者列表 */
        .spectator-section {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px dashed rgba(212,175,55,0.3);
        }
        .spectator-section h4 {
            color: #aaa;
            font-size: 14px;
            margin: 0 0 10px 0;
        }
        .spectator-list {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .spectator-item {
            padding: 4px 10px;
            background: rgba(100,100,100,0.3);
            border-radius: 12px;
            font-size: 12px;
            color: #888;
        }
        
        /* 观战模式提示 */
        .spectator-notice {
            background: rgba(100,100,100,0.3);
            border: 1px solid #666;
            border-radius: 8px;
            padding: 10px;
            text-align: center;
            color: #aaa;
            font-size: 13px;
            margin-bottom: 15px;
        }

        #menu-screen {
            background: url('../assets/bg.jpg') no-repeat center center;
            background-size: cover;
        }
        #menu-screen::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: -1; }

        #game-screen {
            flex-direction: row; justify-content: flex-start; align-items: stretch; padding: 0;
            background: url('../assets/bg.jpg') center center/cover no-repeat fixed;
            gap: 0;
            position: relative;
            overflow: hidden;
        }
        /* 游戏界面遮罩层，让背景稍暗，突出前景内容 */
        #game-screen::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 0;
            pointer-events: none;
        }
        #canvas-wrapper { 
            position: relative; 
            flex: 1; 
            min-width: 0;
            height: 100vh; 
            overflow: hidden;  /* v6.5: 恢复hidden，clearRect已用setTransform修复 */
            border-left: 3px solid var(--gold); 
            border-right: 3px solid var(--gold); 
            box-shadow: 0 0 30px #000;
            z-index: 10;
            background: radial-gradient(ellipse at center, rgba(30, 25, 15, 0.3) 0%, rgba(10, 10, 10, 0.5) 100%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }
        
        /* v6.4: 棋盘框与侧栏连接 - 沉浸式边框 */
        #sidebar-left {
            border-right: 3px solid var(--gold);
        }
        #sidebar-right {
            border-left: 3px solid var(--gold);
        }
        
        /* v6.4: 折叠时棋盘框自动延伸填满空间 */
        #game-screen.sidebar-left-folded #canvas-wrapper {
            border-left: none;
        }
        #game-screen.sidebar-right-folded #canvas-wrapper {
            border-right: none;
        }
        
        /* 折叠时侧栏边框也消失 */
        #game-screen.sidebar-left-folded #sidebar-left {
            border-right: none;
        }
        #game-screen.sidebar-right-folded #sidebar-right {
            border-left: none;
        }
        
        /* v6.4: 棋盘框发光效果 */
        #canvas-wrapper::before {
            content: '';
            position: absolute;
            top: 0;
            left: -3px;
            right: -3px;
            bottom: 0;
            border: 3px solid var(--gold);
            border-left: none;
            border-right: none;
            pointer-events: none;
            box-shadow: 
                0 0 20px rgba(212, 175, 55, 0.3),
                inset 0 0 30px rgba(212, 175, 55, 0.1);
            z-index: 0;
        }
        
        /* 折叠时顶部和底部边框延伸 */
        #game-screen.sidebar-left-folded #canvas-wrapper::before {
            left: 0;
            border-left: 3px solid var(--gold);
        }
        #game-screen.sidebar-right-folded #canvas-wrapper::before {
            right: 0;
            border-right: 3px solid var(--gold);
        }
        canvas { 
            /* v6.7: canvas填满整个wrapper，棋盘居中由渲染引擎处理 */
            width: 100%;
            height: 100%;
            background: transparent; 
            border: none;
            border-radius: 0;
            box-shadow: none;
            display: block;
            /* v6.1: 棋盘层级提升，确保不被遮挡 */
            position: relative;
            z-index: 50;
        }

        /* 底部操作栏 - 跨越整个game-screen底部 */
        #action-bar {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: clamp(60px, 8vh, 80px);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: clamp(6px, 1vw, 12px);
            z-index: 100;
            background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.3));
            padding: 0 clamp(10px, 2vw, 20px);
        }

        /* 右下角系统按钮组 */
        #system-btns {
            position: absolute;
            right: 0;
            bottom: clamp(10px, 1.5vh, 15px);
            width: clamp(180px, 15vw, 280px);
            display: flex;
            justify-content: center;
            gap: clamp(6px, 0.8vw, 10px);
            z-index: 101;
        }

        /* 统一游戏操作按钮样式 */
        .game-btn {
            background: linear-gradient(to bottom, var(--gold), var(--brown));
            border: 2px solid var(--gold);
            color: #fff;
            width: clamp(60px, 6vw, 80px);
            height: clamp(38px, 5vh, 50px);
            font-size: clamp(14px, 1.7vh, 18px);
            font-family: "STKaiti", "华文楷体", "KaiTi", "楷体", "Noto Serif SC", serif;
            cursor: pointer;
            transition: all 0.3s;
            text-shadow: 1px 1px 2px black;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0;
        }
        .game-btn:hover { transform: scale(1.05); box-shadow: 0 0 15px var(--gold); }
        .game-btn:disabled { filter: grayscale(1); cursor: not-allowed; transform: none; box-shadow: none; }
        .game-btn.secondary {
            background: linear-gradient(to bottom, #555, #333);
            border-color: #888;
        }
        .game-btn.secondary:hover { box-shadow: 0 0 10px #888; }

        /* 技能按钮容器 */
        #skill-buttons {
            display: flex;
            gap: clamp(6px, 0.8vw, 10px);
            align-items: center;
        }
        .game-btn .skill-cd {
            font-size: clamp(10px, 1.2vh, 13px);
            opacity: 0.7;
            margin-left: 2px;
        }
        /* 被动技能标签 - 与game-btn统一大小形状 */
        .passive-skill-tag {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            background: linear-gradient(to bottom, rgba(155,89,182,0.6), rgba(100,50,150,0.5));
            border: 2px solid rgba(155,89,182,0.7);
            border-radius: 8px;
            width: clamp(60px, 6vw, 80px);
            height: clamp(38px, 5vh, 50px);
            color: #E0B0FF;
            font-size: clamp(13px, 1.5vh, 16px);
            white-space: nowrap;
            cursor: default;
            user-select: none;
            position: relative;
            padding: 0 4px;
        }
        .passive-skill-tag .passive-icon {
            font-size: clamp(13px, 1.5vh, 16px);
        }
        .passive-skill-tag .passive-lv {
            color: #F1C40F;
            font-weight: bold;
            font-size: clamp(10px, 1.2vh, 13px);
        }
        .passive-skill-tag:hover .passive-tooltip {
            display: block;
        }
        .passive-tooltip {
            display: none;
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%);
            background: rgba(20,10,40,0.95);
            border: 2px solid rgba(155,89,182,0.6);
            border-radius: 8px;
            padding: 8px 12px;
            color: #E0B0FF;
            font-size: 13px;
            white-space: nowrap;
            z-index: 200;
            pointer-events: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
        }
        .passive-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: rgba(155,89,182,0.6);
        }
        /* 主动技能提示 */
        .skill-btn-wrapper {
            position: relative;
            display: inline-flex;
        }
        .skill-btn-wrapper:hover .skill-tooltip {
            display: block;
        }
        .skill-tooltip {
            display: none;
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%);
            background: rgba(15,10,35,0.96);
            border: 2px solid rgba(212,175,55,0.6);
            border-radius: 8px;
            padding: 8px 12px;
            color: #f0e6d2;
            font-size: 13px;
            white-space: nowrap;
            z-index: 200;
            pointer-events: none;
            box-shadow: 0 4px 15px rgba(0,0,0,0.5);
            max-width: 280px;
        }
        .skill-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border: 6px solid transparent;
            border-top-color: rgba(212,175,55,0.6);
        }
        .skill-tooltip .st-name {
            color: #FFD700;
            font-weight: bold;
            margin-bottom: 4px;
        }
        .skill-tooltip .st-lv {
            color: #F1C40F;
            font-size: 12px;
        }
        .skill-tooltip .st-desc {
            color: #ccc;
            margin-top: 3px;
        }
        .skill-tooltip .st-cd {
            color: #888;
            font-size: 12px;
            margin-top: 4px;
        }
        /* 玩家卡片被动技能 */
        .player-passive {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: clamp(11px, 1.3vh, 14px);
            color: #C39BD3;
            margin-top: 2px;
            padding: 2px 6px;
            background: rgba(155,89,182,0.1);
            border-radius: 4px;
            border-left: 2px solid rgba(155,89,182,0.4);
        }
        .player-passive .pp-lv {
            color: #F1C40F;
            font-weight: bold;
        }
        /* 玩家卡片Buff标记 */
        .buff-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 2px 4px;
            margin-top: 3px;
        }
        .buff-tag {
            font-size: clamp(10px, 1.2vh, 13px);
            padding: 1px 5px;
            border-radius: 3px;
            white-space: nowrap;
            animation: buffPulse 2s ease-in-out infinite;
        }
        .buff-good {
            color: #7DCEA0;
            background: rgba(125,206,160,0.12);
            border: 1px solid rgba(125,206,160,0.3);
        }
        .buff-bad {
            color: #F1948A;
            background: rgba(241,148,138,0.12);
            border: 1px solid rgba(241,148,138,0.3);
        }
        @keyframes buffPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .sidebar { 
            width: clamp(200px, 18vw, 280px); 
            min-width: 180px;
            height: 100vh;
            background: rgba(15, 15, 15, 0.25); 
            border: none; 
            display: flex; 
            flex-direction: column; 
            padding: clamp(8px, 1.2vw, 15px);
            padding-bottom: clamp(70px, 9vh, 90px);
            z-index: 1;
            position: relative;
            flex-shrink: 0;
            overflow: hidden;
            transition: width 0.3s ease, min-width 0.3s ease, padding 0.3s ease;
        }
        
        /* v6.5: 折叠按钮样式 — 固定在game-screen层级，始终可点击 */
        .sidebar-fold-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 28px;
            height: 72px;
            background: linear-gradient(135deg, rgba(30, 25, 15, 0.95), rgba(45, 35, 20, 0.9));
            border: 2px solid var(--gold-dim);
            color: var(--gold);
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            z-index: 200;
            border-radius: 6px;
        }
        .sidebar-fold-btn:hover {
            background: linear-gradient(135deg, rgba(40, 35, 20, 0.95), rgba(55, 45, 30, 0.9));
            border-color: var(--gold);
            box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
            transform: translateY(-50%) scale(1.1);
        }
        
        /* v6.5: 左侧折叠按钮 — 紧贴左侧栏右边缘 */
        .sidebar-fold-left {
            left: clamp(200px, 18vw, 280px);
            margin-left: -14px;
            transition: left 0.3s ease, transform 0.3s ease;
        }
        
        /* v6.5: 右侧折叠按钮 — 紧贴右侧栏左边缘 */
        .sidebar-fold-right {
            right: clamp(200px, 18vw, 280px);
            margin-right: -14px;
            transition: right 0.3s ease, transform 0.3s ease;
        }
        
        /* v6.5: 折叠后按钮移到屏幕边缘 */
        #game-screen.sidebar-left-folded .sidebar-fold-left {
            left: 0;
            margin-left: 0;
            border-top-left-radius: 0;
            border-bottom-left-radius: 0;
        }
        #game-screen.sidebar-right-folded .sidebar-fold-right {
            right: 0;
            margin-right: 0;
            border-top-right-radius: 0;
            border-bottom-right-radius: 0;
        }
        
        /* 折叠状态 */
        .sidebar.folded {
            width: 0 !important;
            min-width: 0 !important;
            padding: 0 !important;
            overflow: visible;
            border: none !important;
        }
        .sidebar.folded h3,
        .sidebar.folded #player-list,
        .sidebar.folded #log-panel {
            display: none;
        }
        .log-panel { flex: 1; overflow-y: auto; font-size: clamp(12px, 1.5vh, 15px); background: rgba(0,0,0,0.15); padding: clamp(4px, 0.6vw, 8px); border: 1px solid #444; }
        .log-panel::-webkit-scrollbar { width: 6px; }
        .log-panel::-webkit-scrollbar-thumb { background: rgba(212,175,55,0.3); border-radius: 3px; }
        .log-panel::-webkit-scrollbar-track { background: transparent; }
        .log-year-header {
            text-align: center; color: #D4AF37; font-size: 17px; font-weight: bold;
            padding: 8px 0 4px; margin: 8px 0 6px;
            border-top: 2px solid rgba(212,175,55,0.4);
            border-bottom: 1px solid rgba(212,175,55,0.2);
            text-shadow: 0 0 8px rgba(212,175,55,0.3);
            letter-spacing: 2px;
        }
        .log-year-header:first-child { border-top: none; margin-top: 0; padding-top: 2px; }
        .log-turn-header {
            color: #8B7355; font-size: 13px; font-weight: bold;
            padding: 4px 8px; margin: 6px 0 4px;
            background: rgba(139,115,85,0.1);
            border-left: 3px solid rgba(139,115,85,0.5);
            border-radius: 0 4px 4px 0;
        }
        .log-turn-group { margin-bottom: 4px; }
        .log-item { 
            margin-bottom: 3px; padding: 3px 6px 3px 12px; 
            line-height: 1.4; font-size: 14px;
            border-left: 2px solid transparent;
            transition: background 0.3s;
        }
        .log-item:hover { background: rgba(255,255,255,0.05); }
        .log-item.log-good { color: #32CD32; border-left-color: #32CD32; }
        .log-item.log-bad { color: #FF4500; border-left-color: #FF4500; }
        .log-item.log-skill { color: #9B59B6; border-left-color: #9B59B6; }
        .log-item.log-move { color: #87CEEB; border-left-color: #87CEEB; }
        .log-item.log-neutral { color: #aaa; }
        .log-item .log-player { font-weight: bold; }
        .log-item .log-dice { color: #FFD700; font-weight: bold; }
        .log-item .log-location { color: #87CEEB; }

        .player-card { display: flex; align-items: flex-start; padding: clamp(6px, 1vh, 12px); margin-bottom: clamp(6px, 1vh, 12px); background: rgba(0,0,0,0.6); border-radius: 8px; overflow: hidden; border: 2px solid rgba(255,255,255,0.6); }
        .player-card.active { border: 2px solid var(--gold); background: rgba(212, 175, 55, 0.15); }
        
        /* 角色选择界面按钮居中 */
        #start-btn { margin: 0; display: inline-flex; align-items: center; justify-content: center; }

        /* 角色选择Tooltip样式 */
        #char-tooltip {
            display: none;
            position: fixed;
            z-index: 2000;
            background: linear-gradient(135deg, rgba(20,15,10,0.97), rgba(35,25,15,0.97));
            border: 2px solid var(--gold);
            border-radius: 12px;
            padding: 15px;
            max-width: 320px;
            min-width: 260px;
            box-shadow: 0 0 25px rgba(212,175,55,0.4), inset 0 0 15px rgba(0,0,0,0.5);
            font-family: "STKaiti", "华文楷体", "KaiTi", "楷体", "Noto Serif SC", serif;
            pointer-events: none;
        }
        #char-tooltip .ct-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(212,175,55,0.3);
        }
        #char-tooltip .ct-icon {
            font-size: 36px;
        }
        #char-tooltip .ct-name {
            font-size: 20px;
            font-weight: bold;
        }
        #char-tooltip .ct-lore {
            font-size: 13px;
            color: #c9b896;
            line-height: 1.6;
            margin-bottom: 12px;
            padding: 8px;
            background: rgba(0,0,0,0.3);
            border-radius: 6px;
            border-left: 3px solid var(--gold);
        }
        #char-tooltip .ct-section-title {
            font-size: 14px;
            color: var(--gold);
            margin: 10px 0 6px 0;
            font-weight: bold;
        }
        #char-tooltip .ct-skill {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            padding: 6px 8px;
            margin-bottom: 4px;
            background: rgba(0,0,0,0.2);
            border-radius: 6px;
        }
        #char-tooltip .ct-skill-type {
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: bold;
            white-space: nowrap;
            flex-shrink: 0;
        }
        #char-tooltip .ct-skill-type.passive { background: #4a4a4a; color: #ccc; }
        #char-tooltip .ct-skill-type.active { background: #2d5a2d; color: #90EE90; }
        #char-tooltip .ct-skill-type.ultimate { background: #5a2d2d; color: #FFB6C1; }
        #char-tooltip .ct-skill-name { font-size: 13px; font-weight: bold; color: #fff; }
        #char-tooltip .ct-skill-desc { font-size: 11px; color: #aaa; margin-top: 2px; }
        #char-tooltip .ct-skill-unlock { font-size: 10px; color: #888; margin-top: 2px; }

        .player-avatar { width: clamp(36px, 4.5vh, 50px); height: clamp(36px, 4.5vh, 50px); border-radius: 50%; margin-right: clamp(8px, 1vw, 12px); border: 2px solid var(--gold); }
        .player-name { font-size: clamp(15px, 2vh, 22px); font-weight: bold; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .player-level { font-size: clamp(12px, 1.5vh, 16px); color: #9B59B6; margin-bottom: 3px; font-weight: bold; }
        .player-level .lv-num { color: #FFD700; font-size: clamp(13px, 1.6vh, 18px); }
        .player-money { font-size: clamp(14px, 1.8vh, 20px); color: #FFD700; margin-bottom: 4px; }
        .exp-bar-container {
            width: 100%; height: clamp(10px, 1.4vh, 14px); background: rgba(0,0,0,0.5);
            border-radius: 7px; overflow: hidden; margin-bottom: 4px;
            border: 1px solid rgba(155,89,182,0.4);
            position: relative;
        }
        .exp-bar-fill {
            height: 100%; border-radius: 7px;
            background: linear-gradient(90deg, #8E44AD, #C39BD3, #F1C40F);
            transition: width 0.5s ease-out;
            box-shadow: 0 0 6px rgba(155,89,182,0.5);
        }
        .exp-bar-text {
            position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            display: flex; align-items: center; justify-content: center;
            font-size: clamp(9px, 1.1vh, 12px); color: #fff; text-shadow: 0 0 3px #000;
            pointer-events: none;
        }
        .player-assets { font-size: clamp(12px, 1.4vh, 15px); color: #aaa; line-height: 1.4; }
        .player-assets .asset-item { color: #8B4513; margin-left: 8px; }
        
        /* 麒麟专属动画 */
        @keyframes kirin_glow {
            0% { box-shadow: 0 0 10px #FFD700; }
            50% { box-shadow: 0 0 30px #FFD700, 0 0 50px #FFA500; }
            100% { box-shadow: 0 0 10px #FFD700; }
        }
        @keyframes kirin_blessing {
            0% { transform: scale(0); opacity: 0; }
            50% { transform: scale(1.2); opacity: 1; }
            100% { transform: scale(1); opacity: 0; }
        }
        @keyframes golden_rain {
            0% { transform: translateY(-50px); opacity: 1; }
            100% { transform: translateY(100vh); opacity: 0; }
        }
        @keyframes divine_descend {
            0% { transform: scale(0) rotate(0deg); opacity: 0; }
            50% { transform: scale(1.5) rotate(180deg); opacity: 1; }
            100% { transform: scale(1) rotate(360deg); opacity: 0; }
        }
        /* 青龙专属动画 */
        @keyframes dragon_rain {
            0% { transform: translateY(-50px) rotate(0deg); opacity: 1; }
            100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
        }
        @keyframes cloud_rise {
            0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
            50% { transform: translateY(-20vh) scale(1.2); opacity: 1; }
            100% { transform: translateY(-50vh) scale(0.8); opacity: 0; }
        }
        @keyframes dragon_ascending {
            0% { transform: scale(0) translateY(50px); opacity: 0; }
            30% { transform: scale(0.8) translateY(-20px); opacity: 1; }
            60% { transform: scale(1.1) translateY(-40px); opacity: 1; }
            100% { transform: scale(1.3) translateY(-60px); opacity: 0; }
        }
        @keyframes dragon_lightning {
            0%, 100% { opacity: 0; }
            10%, 30%, 50% { opacity: 1; }
            20%, 40% { opacity: 0.5; }
        }
            /* 玄武专属动画 */
        @keyframes turtle_shell {
            0% { box-shadow: 0 0 10px #00CED1; }
            50% { box-shadow: 0 0 30px #00CED1, 0 0 50px #4682B4; }
            100% { box-shadow: 0 0 10px #00CED1; }
        }
        @keyframes ice_shield {
            0% { transform: scale(0); opacity: 0; }
            50% { transform: scale(1.2); opacity: 1; background: rgba(0, 206, 209, 0.3); }
            100% { transform: scale(1); opacity: 0; }
        }
        @keyframes life_recovery {
            0% { transform: scale(0); opacity: 0; }
            50% { transform: scale(1.3); opacity: 1; background: rgba(50, 205, 50, 0.3); }
            100% { transform: scale(1); opacity: 0; }
        }
        @keyframes sea_guardian {
            0% { transform: scale(0); opacity: 0; }
            50% { transform: scale(1.5); opacity: 1; background: rgba(0, 100, 255, 0.2); }
            100% { transform: scale(1); opacity: 0; }
        }
        /* 毕方专属动画 */
        @keyframes bifang_glow {
            0% { box-shadow: 0 0 10px #FF6600; }
            25% { box-shadow: 0 0 20px #FF6600, 0 0 30px #FF8800; }
            50% { box-shadow: 0 0 40px #FF6600, 0 0 60px #FF8800, 0 0 80px #FFAA00; }
            75% { box-shadow: 0 0 20px #FF6600, 0 0 30px #FF8800; }
            100% { box-shadow: 0 0 10px #FF6600; }
        }
        @keyframes bifang_fire {
            0% { transform: translateY(-50px) rotate(0deg); opacity: 0; }
            25% { opacity: 1; transform: translateY(20px) rotate(15deg); }
            50% { transform: translateY(50px) rotate(-10deg); opacity: 0.8; }
            75% { transform: translateY(80px) rotate(20deg); opacity: 0.6; }
            100% { transform: translateY(120px) rotate(-5deg); opacity: 0; }
        }
        @keyframes bifang_burn_all {
            0% { background: radial-gradient(circle, rgba(255,102,0,0) 0%, rgba(255,102,0,0) 100%); }
            25% { background: radial-gradient(circle, rgba(255,102,0,0.4) 0%, rgba(255,102,0,0.2) 50%, rgba(255,102,0,0) 100%); }
            50% { background: radial-gradient(circle, rgba(255,102,0,0.6) 0%, rgba(255,102,0,0.4) 50%, rgba(255,102,0,0.1) 100%); }
            75% { background: radial-gradient(circle, rgba(255,102,0,0.4) 0%, rgba(255,102,0,0.2) 50%, rgba(255,102,0,0) 100%); }
            100% { background: radial-gradient(circle, rgba(255,102,0,0) 0%, rgba(255,102,0,0) 100%); }
        }

        /* ===== 全局弹窗自适应 ===== */
        .game-dialog-responsive {
            max-width: 90vw !important;
            max-height: 85vh !important;
            overflow-y: auto !important;
        }

        /* ===== 响应式媒体查询 ===== */
        /* 中等屏幕 (宽度 <= 1200px) */
        @media (max-width: 1200px) {
            .sidebar { width: clamp(160px, 16vw, 240px); min-width: 160px; }
            #system-btns { width: clamp(160px, 16vw, 240px); }
        }

        /* 小屏幕 (宽度 <= 900px) */
        @media (max-width: 900px) {
            .sidebar { width: clamp(140px, 14vw, 200px); min-width: 140px; padding: 6px; }
            .player-name { font-size: 14px; }
            .player-money { font-size: 14px; }
            .player-level { font-size: 12px; }
            .player-assets { font-size: 11px; }
            .log-panel { font-size: 12px; }
            #system-btns { width: clamp(140px, 14vw, 200px); }
            .game-btn { width: 60px; height: 36px; font-size: 13px; }
        }

        /* 极小屏幕 (宽度 <= 700px) - 隐藏右侧日志栏 */
        @media (max-width: 700px) {
            .sidebar:last-of-type { display: none; }
            #system-btns { right: 10px; width: auto; }
            .sidebar { width: clamp(120px, 20vw, 180px); min-width: 120px; }
        }

        /* 低矮屏幕 (高度 <= 600px) */
        @media (max-height: 600px) {
            #action-bar { height: 50px; }
            .sidebar { height: calc(100vh - 50px); }
            .player-card { padding: 4px; margin-bottom: 4px; }
            .player-name { font-size: 13px; }
            .player-money { font-size: 13px; }
            /* v6.7: canvas填满wrapper，不设max-height限制 */
        }

        /* ===== 播报系统 v5.1 ===== */
        #broadcast-container {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: min(90%, 420px);
            pointer-events: none;
            z-index: 150;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .broadcast-card {
            background: linear-gradient(135deg, rgba(25, 20, 12, 0.95), rgba(40, 30, 18, 0.92));
            border: 2px solid rgba(212, 175, 55, 0.6);
            border-radius: 14px;
            padding: 12px 16px;
            box-shadow: 0 6px 25px rgba(0, 0, 0, 0.7);
            font-family: "STKaiti", "华文楷体", serif;
            max-height: 220px;
            overflow: hidden;
            transition: all 0.5s ease-out;
        }
        /* 高亮状态 - 当前播报 */
        .broadcast-card.active {
            animation: broadcastIn 0.5s ease-out;
            transform: translateY(0);
            opacity: 1;
            border-color: rgba(212, 175, 55, 0.8);
            box-shadow: 0 6px 30px rgba(212, 175, 55, 0.3), 0 6px 25px rgba(0, 0, 0, 0.7);
        }
        /* 淡化状态 - 上一个播报 */
        .broadcast-card.fading {
            transform: translateY(-15px) scale(0.97);
            opacity: 0.5;
            filter: blur(0.5px);
            border-color: rgba(212, 175, 55, 0.3);
        }
        /* 完全消失 */
        .broadcast-card.fade-out {
            animation: broadcastOut 0.8s ease-out forwards;
        }
        .broadcast-card.remove {
            animation: broadcastRemove 0.4s ease-out forwards;
        }
        @keyframes broadcastIn {
            from { opacity: 0; transform: translateY(40px) scale(0.9); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }
        @keyframes broadcastOut {
            from { opacity: 0.5; transform: translateY(-15px) scale(0.97); }
            to { opacity: 0; transform: translateY(-50px) scale(0.9); }
        }
        @keyframes broadcastRemove {
            from { opacity: 0.3; transform: translateY(-30px) scale(0.95); }
            to { opacity: 0; transform: translateY(-60px) scale(0.85); }
        }
        .broadcast-header {
            display: flex; align-items: center; gap: 8px;
            padding-bottom: 8px; margin-bottom: 8px;
            border-bottom: 1px solid rgba(212, 175, 55, 0.35);
        }
        .broadcast-icon { font-size: 20px; }
        .broadcast-name { font-size: 16px; font-weight: bold; flex: 1; }
        .broadcast-count { font-size: 12px; padding: 3px 8px; border-radius: 12px; font-weight: bold; }
        .broadcast-count.good { background: rgba(50, 205, 50, 0.25); color: #32CD32; border: 1px solid rgba(50, 205, 50, 0.5); }
        .broadcast-count.bad { background: rgba(255, 69, 0, 0.25); color: #FF4500; border: 1px solid rgba(255, 69, 0, 0.5); }
        .broadcast-events { display: flex; flex-direction: column; gap: 4px; max-height: 150px; overflow-y: auto; }
        .broadcast-events::-webkit-scrollbar { width: 3px; }
        .broadcast-events::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.4); border-radius: 2px; }
        .broadcast-event { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; line-height: 1.5; padding: 3px 0; }
        .broadcast-event .event-icon { font-size: 11px; flex-shrink: 0; margin-top: 3px; }
        .broadcast-event .event-text { flex: 1; word-break: break-all; }
        .broadcast-event.good .event-text { color: #7CFC00; }
        .broadcast-event.bad .event-text { color: #FF6347; }
        .broadcast-event.neutral .event-text { color: #FFA500; }
        .broadcast-more { font-size: 11px; color: #888; text-align: center; padding: 4px 0; font-style: italic; }
        
        /* ===== v6.0: 镜头控制按钮 ===== */
        #camera-controls {
            position: absolute;
            bottom: 80px;
            right: 15px;
            display: flex;
            flex-direction: column;
            gap: 6px;
            z-index: 100;
        }
        .camera-btn {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            border: 2px solid rgba(212, 175, 55, 0.6);
            background: linear-gradient(145deg, rgba(30, 25, 15, 0.9), rgba(45, 35, 20, 0.85));
            color: var(--gold);
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            backdrop-filter: blur(4px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        }
        .camera-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
            border-color: var(--gold);
        }
        .camera-btn:active {
            transform: scale(0.95);
        }
        #zoom-reset-btn {
            font-size: 14px;
        }
        #rotate-cw-btn, #rotate-ccw-btn {
            font-size: 16px;
        }
        
        /* v6.7: 仙气飘飘效果（去除canvas的box-shadow限制框） */
        
        /* 云雾飘动背景 — 使用 ::after 避免与 v6.4 的 ::before 边框冲突 */
        #canvas-wrapper::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: 
                radial-gradient(ellipse 80% 50% at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                radial-gradient(ellipse 60% 40% at 80% 70%, rgba(212, 175, 55, 0.02) 0%, transparent 50%);
            animation: cloudFloat 20s ease-in-out infinite;
            pointer-events: none;
            z-index: 1;
        }
        
        @keyframes cloudFloat {
            0%, 100% { 
                transform: translateX(0) translateY(0);
                opacity: 0.8;
            }
            25% {
                transform: translateX(20px) translateY(-10px);
                opacity: 1;
            }
            50% { 
                transform: translateX(0) translateY(-20px);
                opacity: 0.6;
            }
            75% {
                transform: translateX(-20px) translateY(-10px);
                opacity: 1;
            }
        }
        
        /* 侧栏仙气效果 */
        .sidebar {
            background: linear-gradient(180deg, 
                rgba(15, 15, 15, 0.3) 0%,
                rgba(20, 18, 12, 0.25) 50%,
                rgba(15, 15, 15, 0.3) 100%) !important;
            position: relative;
        }
        
        .sidebar::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, 
                transparent 0%,
                rgba(212, 175, 55, 0.5) 50%,
                transparent 100%);
            animation: topGlow 3s ease-in-out infinite;
        }
        
        @keyframes topGlow {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }
        
        /* 玩家卡片悬浮效果 */
        .player-card {
            transition: all 0.3s ease;
            position: relative;
            overflow: visible;
        }
        
        .player-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
        }
        
        .player-card.active {
            animation: activeCardPulse 2s ease-in-out infinite;
        }
        
        @keyframes activeCardPulse {
            0%, 100% { 
                box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
            }
            50% { 
                box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
            }
        }
        
        /* 按钮仙气效果 */
        .btn:hover, .game-btn:hover {
            animation: btnShine 0.5s ease-out;
        }
        
        @keyframes btnShine {
            0% { filter: brightness(1); }
            50% { filter: brightness(1.3); }
            100% { filter: brightness(1); }
        }
