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

        :root {
            --board-width: 1250px;
            --board-height: 660px;
        }

        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            color: #fff;
            padding-top: 50px;
            position: relative;
            overflow-x: hidden;
        }

        /* 全局背景效果 */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 25% 25%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 75% 75%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 50% 50%, rgba(78, 205, 196, 0.05) 0%, transparent 50%);
            animation: globalFloat 25s ease-in-out infinite;
            z-index: -1;
        }

        @keyframes globalFloat {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            33% { transform: translateY(-15px) rotate(120deg); }
            66% { transform: translateY(15px) rotate(240deg); }
        }

        /* 粒子容器 */
        .particles-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: -1;
        }

        h1 {
            margin-bottom: 20px;
            font-size: 2.5em;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
        }

        .header-container {
            position: relative;
            width: var(--board-width);
            margin-bottom: 10px;
        }

        .title-container {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            top: 0;
            gap: 5px;
        }

        .header-container .game-title {
            position: relative;
            left: auto;
            transform: none;
            margin-bottom: 0;
            margin-top: 0;
            width: 200px;
            height: auto;
        }

        .header-right-container {
            position: absolute;
            right: 100px;
            top: 50px;
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 5px;
        }

        .global-skills-header {
            display: flex;
            gap: 30px;
            align-items: center;
        }

        .global-skills-header .global-skill-wrapper {
            flex-direction: row;
            gap: 8px;
        }

        .global-skills-header .global-skill-name {
            font-size: 0.85em;
        }

        .global-skills-header .global-skill-btn {
            padding: 8px 20px;
            font-size: 1em;
        }

        .game-hint {
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.8);
            background: rgba(255, 255, 255, 0.15);
            padding: 5px 15px;
            border-radius: 15px;
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            white-space: nowrap;
            transition: all 0.3s ease;
        }

        .game-hint.dragging {
            background: rgba(255, 215, 0, 0.25);
            border-color: rgba(255, 215, 0, 0.5);
            color: #ffd700;
        }

        .left-buttons {
            display: flex;
            gap: 10px;
        }

        .header-back-btn,
        .header-restart-btn {
            padding: 8px 20px;
            font-size: 1em;
            font-family: 'Microsoft YaHei', sans-serif;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .header-back-btn:hover,
        .header-restart-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .game-info {
            display: flex;
            justify-content: space-between;
            width: var(--board-width);
            margin-bottom: 15px;
            font-size: 1.2em;
        }

        .player-info {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 20px;
            border-radius: 10px;
            background: rgba(255,255,255,0.1);
        }

        .player-info.active {
            background: rgba(255,255,255,0.3);
            box-shadow: 0 0 15px rgba(255,255,255,0.3);
        }

        .round-info {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 20px;
            border-radius: 20px;
            background: linear-gradient(135deg, rgba(78, 205, 196, 0.2), rgba(78, 205, 196, 0.1));
            color: #fff;
            font-weight: bold;
            font-size: 0.9em;
            box-shadow: 0 0 8px rgba(78, 205, 196, 0.3);
            white-space: nowrap;
        }

        .player-color {
            width: 20px;
            height: 20px;
            border-radius: 50%;
        }

        .player1 .player-color {
            background: #ff6b6b;
            box-shadow: 0 0 10px #ff6b6b;
        }

        .player2 .player-color {
            background: #4ecdc4;
            box-shadow: 0 0 10px #4ecdc4;
        }

        /* 技能模式的玩家颜色 */
        .skill-mode .player1 .player-color {
            background: #667eea;
            box-shadow: 0 0 10px #667eea;
        }

        .skill-mode .player2 .player-color {
            background: #f093fb;
            box-shadow: 0 0 10px #f093fb;
        }

        #gameCanvas {
            border: 3px solid rgba(255,255,255,0.3);
            border-radius: 10px;
            background: #0a0a0a;
            cursor: crosshair;
            max-width: var(--board-width);
            max-height: var(--board-height);
            width: var(--board-width);
            height: var(--board-height);
            box-sizing: border-box;
            box-shadow: 0 0 0 rgba(0, 255, 0, 0);
            transition: box-shadow 2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        }

        .instructions {
            margin-top: 20px;
            text-align: center;
            color: rgba(255,255,255,0.7);
            font-size: 0.9em;
        }

        .winner-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }

        .winner-modal.show {
            display: flex;
        }

        .winner-content {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 40px 60px;
            border-radius: 25px;
            text-align: center;
            animation: popIn 0.5s ease;
            box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4), 0 0 60px rgba(102, 126, 234, 0.2);
            backdrop-filter: blur(10px);
        }

        @keyframes popIn {
            0% { transform: scale(0.5); opacity: 0; }
            100% { transform: scale(1); opacity: 1; }
        }

        /* 弹窗丝滑动画 */
        @keyframes modalSlideIn {
            0% {
                opacity: 0;
                transform: scale(0.9) translateY(20px);
            }
            100% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        @keyframes modalSlideOut {
            0% {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
            100% {
                opacity: 0;
                transform: scale(0.9) translateY(20px);
            }
        }

        @keyframes backdropFadeIn {
            0% { opacity: 0; }
            100% { opacity: 1; }
        }

        @keyframes backdropFadeOut {
            0% { opacity: 1; }
            100% { opacity: 0; }
        }

        .modal-animate-in .changelog-content,
        .modal-animate-in .help-content {
            opacity: 0;
            animation: modalSlideIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }

        .modal-animate-out .changelog-content,
        .modal-animate-out .help-content {
            opacity: 1;
            animation: modalSlideOut 0.25s cubic-bezier(0.55, 0, 1, 0.45) forwards;
        }

        .modal-animate-in.winner-modal {
            animation: backdropFadeIn 0.3s ease forwards;
        }

        .modal-animate-out.winner-modal {
            animation: backdropFadeOut 0.25s ease forwards;
        }

        .winner-content h2 {
            font-size: 2.5em;
            margin-bottom: 20px;
            text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
        }

        .restart-btn {
            padding: 15px 40px;
            font-size: 1.2em;
            background: #fff;
            color: #764ba2;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .restart-btn:hover {
            transform: scale(1.05) translateY(-3px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        }

        /* 更新日志按钮样式 */
        .changelog-btn {
            position: absolute;
            top: 20px;
            left: 20px;
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid rgba(255, 255, 255, 0.5);
            border-radius: 8px;
            padding: 10px 15px;
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            z-index: 20;
        }

        .changelog-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
        }

        .menu-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            width: 100%;
            position: absolute;
            top: 0;
            left: 0;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            overflow: hidden;
        }

        /* 菜单背景效果 */
        .menu-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 30% 30%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 70% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
            animation: menuFloat 20s ease-in-out infinite;
        }

        @keyframes menuFloat {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            33% { transform: translateY(-10px) rotate(120deg); }
            66% { transform: translateY(10px) rotate(240deg); }
        }

        .menu-box {
            background: rgba(255, 255, 255, 0.1);
            padding: 60px 90px;
            border-radius: 25px;
            text-align: center;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            position: relative;
            z-index: 10;
            transform: translateY(-20px);
            animation: menuSlideIn 1s ease-out forwards;
        }

        @keyframes menuSlideIn {
            0% { opacity: 0; transform: translateY(50px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        .menu-box #menuTitleImage {
            width: 350px;
            height: auto;
            margin-bottom: 40px;
            display: block;
            margin-left: auto;
            margin-right: auto;
            animation: menuTitleGlow 3s ease-in-out infinite alternate;
        }

        @keyframes menuTitleGlow {
            0% { filter: drop-shadow(0 0 20px rgba(255, 71, 87, 0.5)) drop-shadow(0 0 40px rgba(255, 71, 87, 0.3)); }
            100% { filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.5)) drop-shadow(0 0 50px rgba(102, 126, 234, 0.3)); }
        }

        .menu-btn {
            display: block;
            width: 220px;
            padding: 20px 35px;
            margin: 20px auto;
            font-size: 1.4em;
            font-family: 'Microsoft YaHei', sans-serif;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .menu-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .menu-btn:hover::before {
            left: 100%;
        }

        .classic-btn {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
            color: #fff;
            box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4), 0 0 40px rgba(255, 107, 107, 0.2);
        }

        .classic-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6), 0 0 60px rgba(255, 107, 107, 0.3);
        }

        .skill-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4), 0 0 40px rgba(102, 126, 234, 0.2);
        }

        .skill-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6), 0 0 60px rgba(102, 126, 234, 0.3);
        }

        .network-btn {
            background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
            color: #fff;
            box-shadow: 0 6px 25px rgba(0, 184, 148, 0.4), 0 0 40px rgba(0, 184, 148, 0.2);
        }

        .network-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 10px 30px rgba(0, 184, 148, 0.6), 0 0 60px rgba(0, 184, 148, 0.3);
        }

        .back-btn {
            padding: 12px 30px;
            font-size: 1.1em;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 20px;
            backdrop-filter: blur(10px);
        }

        .back-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
        }

        .game-container {
            position: relative;
            width: var(--board-width);
            height: var(--board-height);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .skill-selection-container {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 20px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        }

        .skill-selection-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
        }

        .skill-selection-header {
            text-align: center;
            margin-bottom: 15px;
        }

        .preparation-title {
            font-size: 2.2em;
            font-weight: bold;
            color: #ffffff;
            text-shadow: 0 0 10px #ffd700, 0 0 20px #ffd700, 0 0 30px #ffd700;
            margin-bottom: 10px;
            letter-spacing: 2px;
        }

        .current-player-indicator {
            font-size: 1.2em;
            color: rgba(255, 255, 255, 0.8);
        }

        .current-player-indicator span {
            font-weight: bold;
            color: #ffd700;
        }

        .skills-display-area {
            width: 100%;
            max-width: 1200px;
            margin-bottom: 20px;
        }

        .available-skills {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
        }

        .available-skills h3 {
            font-size: 1.3em;
            margin-bottom: 15px;
            text-align: center;
        }

        .skills-grid {
            display: flex;
            flex-direction: row;
            justify-content: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .skill-card {
            background: rgba(255, 255, 255, 0.15);
            padding: 15px;
            border-radius: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 160px;
        }

        .skill-card:hover {
            transform: translateY(-5px);
            background: rgba(255, 255, 255, 0.25);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        .skill-card.selected {
            border: 3px solid #ffd700;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
        }

        .skill-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            margin: 0 auto 10px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .skill-name {
            font-size: 1.1em;
            font-weight: bold;
            margin-bottom: 8px;
        }

        .skill-description {
            font-size: 0.8em;
            color: rgba(255, 255, 255, 0.7);
        }

        .selected-skills-area {
            display: flex;
            justify-content: space-around;
            width: 100%;
            max-width: 1200px;
            margin-bottom: 20px;
            gap: 20px;
        }

        .player-selected-skills {
            flex: 1;
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
            min-height: 180px;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .player-selected-skills.active {
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.1);
            border-color: rgba(255, 215, 0, 0.8);
            transform: scale(1.02);
        }

        .player-selected-skills h3 {
            font-size: 1.1em;
            margin-bottom: 10px;
            text-align: center;
        }

        .selected-skills-grid {
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .selected-skill-card {
            background: rgba(255, 255, 255, 0.2);
            padding: 10px;
            border-radius: 10px;
            text-align: center;
            min-width: 100px;
        }

        .selected-skill-card .skill-icon {
            width: 40px;
            height: 40px;
            margin-bottom: 8px;
        }

        .selected-skill-card .skill-name {
            font-size: 0.9em;
        }

        .skill-selection-footer {
            display: flex;
            gap: 20px;
            justify-content: center;
        }

        .start-battle-btn {
            padding: 15px 50px;
            font-size: 1.3em;
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
        }

        .start-battle-btn:hover:not(:disabled) {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
        }

        .start-battle-btn:disabled {
            background: rgba(255, 255, 255, 0.2);
            cursor: not-allowed;
            box-shadow: none;
        }

        .start-battle-btn.confirmed {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
            box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
        }

        .start-battle-btn.confirmed:hover:not(:disabled) {
            box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
        }

        .back-to-menu-btn {
            padding: 15px 30px;
            font-size: 1.2em;
            font-family: 'Microsoft YaHei', sans-serif;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .back-to-menu-btn:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .global-skills-area {
            width: 100%;
            max-width: 1200px;
            margin-bottom: 20px;
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
        }

        .global-skills-area h3 {
            font-size: 1.3em;
            margin-bottom: 15px;
            text-align: center;
        }

        .global-skills-grid {
            display: flex;
            flex-direction: row;
            justify-content: center;
            gap: 20px;
            flex-wrap: wrap;
            margin-bottom: 20px;
        }

        .global-skill-card {
            background: rgba(255, 255, 255, 0.15);
            padding: 15px;
            border-radius: 15px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 200px;
        }

        .global-skill-icon {
            width: 60px;
            height: 60px;
            margin: 0 auto 10px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .global-skill-symbol {
            font-size: 24px;
            font-weight: bold;
            color: white;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        }

        .global-skill-card:hover {
            transform: translateY(-5px);
            background: rgba(255, 255, 255, 0.25);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        }

        .selected-global-skills {
            display: flex;
            justify-content: space-around;
            gap: 20px;
        }

        .player-global-skill {
            flex: 1;
            background: rgba(255, 255, 255, 0.1);
            padding: 15px;
            border-radius: 15px;
            backdrop-filter: blur(10px);
            min-height: 120px;
            text-align: center;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .player-global-skill.active {
            background: rgba(255, 255, 255, 0.15);
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), inset 0 0 20px rgba(255, 215, 0, 0.1);
            border-color: rgba(255, 215, 0, 0.8);
            transform: scale(1.02);
        }

        .player-global-skill h4 {
            font-size: 1.1em;
            margin-bottom: 10px;
        }

        .global-skill-display {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 80px;
        }

        .selected-global-skill-card {
            background: rgba(255, 255, 255, 0.2);
            padding: 15px;
            border-radius: 10px;
            text-align: center;
            min-width: 120px;
        }

        .selected-global-skill-card .global-skill-icon {
            width: 50px;
            height: 50px;
            margin-bottom: 8px;
        }

        .selected-global-skill-card .global-skill-symbol {
            font-size: 20px;
        }

        .selected-global-skill-card .skill-name {
            font-size: 1em;
        }

        .use-skill-btn {
            position: absolute;
            right: 90px;
            top: -40px;
            transform: translateY(-50%);
            padding: 12px 25px;
            font-size: 1.1em;
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            color: #fff;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(240, 147, 251, 0.4);
        }

        .use-skill-btn:hover:not(:disabled) {
            transform: translateY(-50%) scale(1.05);
            box-shadow: 0 6px 20px rgba(240, 147, 251, 0.6);
        }

        .use-skill-btn:disabled {
            background: rgba(255, 255, 255, 0.2);
            cursor: not-allowed;
            box-shadow: none;
        }

        .player-badge {
            display: inline-block;
            padding: 10px 30px;
            font-size: 1.5em;
            font-weight: bold;
            color: #fff;
            border-radius: 25px;
            margin-bottom: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
        }

        .player-badge.player-a {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }

        .player-badge.player-b {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
        }

        .temporary-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            padding: 20px 40px;
            font-size: 1.5em;
            font-weight: bold;
            color: #fff;
            background: rgba(255, 100, 100, 0.95);
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
            z-index: 1000;
            animation: messageFadeIn 0.3s ease;
        }

        @keyframes messageFadeIn {
            from {
                opacity: 0;
                transform: translate(-50%, -50%) scale(0.8);
            }
            to {
                opacity: 1;
                transform: translate(-50%, -50%) scale(1);
            }
        }

        @keyframes shake {
            0%, 100% {
                transform: translateY(-50%) translateX(0);
            }
            25% {
                transform: translateY(-50%) translateX(-1.5px);
            }
            75% {
                transform: translateY(-50%) translateX(1.5px);
            }
        }

        .global-skills-container {
            position: relative;
            width: var(--board-width);
            margin-top: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .global-skill-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .global-skill-wrapper.player1 {
            margin-left: 100px;
        }

        .global-skill-wrapper.player2 {
            margin-right: 100px;
        }

        .global-skill-name {
            font-size: 1em;
            color: rgba(255, 255, 255, 0.8);
            text-align: center;
        }

        .global-skill-btn {
            padding: 10px 25px;
            font-size: 1em;
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #98FB98 0%, #32CD32 100%);
            color: #fff;
            border: none;
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(152, 251, 152, 0.4);
        }

        .room-name-input {
            margin-bottom: 20px;
        }

        .room-name-input label {
            display: block;
            margin-bottom: 8px;
            font-size: 1.1em;
            color: rgba(255, 255, 255, 0.9);
        }

        #roomNameInput {
            width: 100%;
            padding: 12px 15px;
            font-size: 1em;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            transition: all 0.3s ease;
            outline: none;
        }

        #roomNameInput:focus {
            border-color: #f0ba15;
            box-shadow: 0 0 15px rgba(228, 224, 15, 0.945);
            background: rgba(255, 255, 255, 0.15);
        }

        #roomNameInput::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .global-skill-btn:hover:not(:disabled) {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(152, 251, 152, 0.6);
        }

        .global-skill-btn:disabled {
            background: rgba(255, 255, 255, 0.2);
            cursor: not-allowed;
            box-shadow: none;
        }

        .power-bar-container {
            position: absolute;
            top: 0;
            left: -100px;
            width: calc(100% + 200px);
            height: 100%;
            pointer-events: none;
            overflow: visible;
        }

        .power-bar {
            position: absolute;
            top: 63%;
            transform: translateY(-50%);
            width: 30px;
            height: 300px;
            background: rgba(255, 255, 255, 0.1);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 15px;
            overflow: hidden;
            display: none;
        }

        .power-bar.player1 {
            left: 20px;
        }

        .power-bar.player2 {
            right: 20px;
        }

        .power-bar .fill {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 0%;
            transition: height 0.1s ease;
        }

        .power-bar .percentage {
            position: absolute;
            top: -30px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 16px;
            color: rgba(255, 255, 255, 0.8);
            font-family: 'Microsoft YaHei', sans-serif;
        }

        .settings-btn {
            font-size: 1.8em;
            background: linear-gradient(135deg, #4ecdc4, #45b7aa);
            color: #fff;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            width: 50px;
            height: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 20px;
            box-shadow: 0 0 15px rgba(78, 205, 196, 0.6);
            animation: pulse 2s infinite;
        }

        .settings-btn:hover {
            background: linear-gradient(135deg, #45b7aa, #3dada0);
            transform: rotate(20deg) scale(1.1);
            box-shadow: 0 0 20px rgba(78, 205, 196, 0.8);
        }

        @keyframes pulse {
            0% {
                box-shadow: 0 0 15px rgba(78, 205, 196, 0.6);
            }
            50% {
                box-shadow: 0 0 25px rgba(78, 205, 196, 0.8);
            }
            100% {
                box-shadow: 0 0 15px rgba(78, 205, 196, 0.6);
            }
        }

        .modal-header-with-settings {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
        }

        .modal-header-with-settings h2 {
            margin: 0;
        }

        .settings-option {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            font-size: 1.2em;
        }

        .settings-option label {
            margin-right: 10px;
        }

        .settings-option input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
            margin-left: auto;
        }

        .info-button-container {
            position: relative;
            display: inline-block;
            margin: 0 10px;
        }

        .info-button {
            display: inline-block;
            width: 20px;
            height: 20px;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.5);
            border-radius: 50%;
            text-align: center;
            line-height: 20px;
            font-size: 14px;
            font-weight: bold;
            cursor: help;
        }

        .info-button:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .info-tooltip {
            position: absolute;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            background: rgba(0, 0, 0, 0.8);
            color: #fff;
            padding: 8px 12px;
            border-radius: 6px;
            font-size: 12px;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.3s ease, visibility 0.3s ease;
            z-index: 1000;
        }

        .info-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 5px;
            border-style: solid;
            border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
        }

        .info-button-container:hover .info-tooltip {
            opacity: 1;
            visibility: visible;
        }

        .confirm-content {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
            padding: 30px 50px;
            border-radius: 15px;
            text-align: center;
            animation: slideIn 0.3s ease;
            box-shadow: 0 10px 30px rgba(255, 107, 107, 0.5);
        }

        .restart-content {
            background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
            padding: 30px 50px;
            border-radius: 15px;
            text-align: center;
            animation: slideIn 0.3s ease;
            box-shadow: 0 10px 30px rgba(255, 215, 0, 0.5);
        }

        @keyframes slideIn {
            0% { transform: translateY(-50px); opacity: 0; }
            100% { transform: translateY(0); opacity: 1; }
        }

        .confirm-content h2,
        .restart-content h2 {
            font-size: 2em;
            margin-bottom: 15px;
            color: #fff;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        .confirm-content p,
        .restart-content p {
            font-size: 1.1em;
            margin-bottom: 25px;
            color: rgba(255,255,255,0.9);
        }

        .confirm-btn {
            padding: 12px 35px;
            font-size: 1.1em;
            background: #fff;
            color: #ee5a5a;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 0 10px;
            box-shadow: 0 4px 15px rgba(255,255,255,0.3);
        }

        .cancel-btn {
            padding: 12px 35px;
            font-size: 1.1em;
            background: rgba(255,255,255,0.2);
            color: #fff;
            border: 2px solid rgba(255,255,255,0.5);
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 0 10px;
        }

        .confirm-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(255,255,255,0.4);
        }

        .cancel-btn:hover {
            background: rgba(255,255,255,0.3);
            transform: translateY(-3px);
        }

        .restart-confirm-btn {
            padding: 12px 35px;
            font-size: 1.1em;
            background: #fff;
            color: #ffd700;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 0 10px;
            box-shadow: 0 4px 15px rgba(255,255,255,0.3);
        }

        .restart-cancel-btn {
            padding: 12px 35px;
            font-size: 1.1em;
        }

        /* 联网对战样式 */
        .network-btn {
            background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
            color: #fff;
            box-shadow: 0 4px 15px rgba(0, 184, 148, 0.4);
        }

        .network-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0, 184, 148, 0.6);
        }

        .network-lobby-container {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 20px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            position: relative;
            overflow: hidden;
        }

        /* 匹配大厅背景效果 */
        .network-lobby-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 30% 30%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 70% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
            animation: menuFloat 20s ease-in-out infinite;
            z-index: 0;
        }

        .network-lobby-content {
            background: rgba(255, 255, 255, 0.1);
            padding: 60px 40px;
            border-radius: 25px;
            backdrop-filter: blur(15px);
            width: 100%;
            max-width: 800px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            position: relative;
            z-index: 10;
            transform: translateY(-20px);
            animation: menuSlideIn 1s ease-out forwards;
        }

        .network-lobby-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 30px;
        }

        .network-lobby-header h2 {
            font-size: 2.2em;
            color: #fff;
            text-shadow: 0 0 20px rgba(255, 71, 87, 0.5), 0 0 40px rgba(255, 71, 87, 0.3);
            animation: menuTitleGlow 3s ease-in-out infinite alternate;
            letter-spacing: 3px;
        }

        .lobby-actions {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        .join-room-section {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        #roomIdInput {
            padding: 15px 25px;
            font-size: 1.1em;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 30px;
            background: rgba(255, 255, 255, 0.15);
            color: #fff;
            width: 220px;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        #roomIdInput:focus {
            border-color: #3498db;
            box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
            background: rgba(255, 255, 255, 0.2);
        }

        #roomIdInput::placeholder {
            color: rgba(255, 255, 255, 0.5);
        }

        .lobby-btn {
            padding: 15px 35px;
            font-size: 1.1em;
            font-family: 'Microsoft YaHei', sans-serif;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .lobby-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .lobby-btn:hover::before {
            left: 100%;
        }

        .create-room-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4), 0 0 40px rgba(102, 126, 234, 0.2);
        }

        .create-room-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6), 0 0 60px rgba(102, 126, 234, 0.3);
        }

        .join-room-btn {
            background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
            color: #fff;
            box-shadow: 0 6px 25px rgba(0, 184, 148, 0.4), 0 0 40px rgba(0, 184, 148, 0.2);
        }

        .join-room-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 10px 30px rgba(0, 184, 148, 0.6), 0 0 60px rgba(0, 184, 148, 0.3);
        }

        .lobby-status {
            display: flex;
            justify-content: center;
            gap: 30px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }

        .status-item {
            background: rgba(255, 255, 255, 0.1);
            padding: 12px 25px;
            border-radius: 25px;
            font-size: 1.1em;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        #statusText {
            font-weight: bold;
            color: #ff6b6b;
            text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
        }

        #statusText.connected {
            color: #4ecdc4;
            text-shadow: 0 0 10px rgba(78, 205, 196, 0.5);
        }

        .room-list {
            margin-top: 20px;
            width: 100%;
        }

        .room-list h3 {
            font-size: 1.4em;
            margin-bottom: 20px;
            color: #fff;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        }

        .room-list-content {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 20px;
            padding: 25px;
            max-height: 300px;
            overflow-y: auto;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .no-rooms {
            color: rgba(255, 255, 255, 0.5);
            font-style: italic;
            text-align: center;
            padding: 30px 0;
        }

        .room-item {
            background: rgba(255, 255, 255, 0.1);
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        }

        .room-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        }

        .room-info {
            text-align: left;
            flex: 1;
        }

        .room-name {
            font-weight: bold;
            font-size: 1.2em;
            margin-bottom: 5px;
            color: #fff;
            text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
        }

        .room-id {
            font-weight: normal;
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.6);
            margin-bottom: 5px;
        }

        .room-players {
            font-size: 0.9em;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 5px;
        }

        .room-mode {
            font-size: 0.8em;
            color: #ffd700;
            font-weight: bold;
            text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
        }

        .room-terrain {
            font-size: 0.75em;
            color: rgba(255, 255, 255, 0.6);
            margin-top: 3px;
        }

        .join-room-item-btn {
            padding: 10px 25px;
            font-size: 0.9em;
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
            color: #fff;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
        }

        .join-room-item-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
        }

        /* 房间界面样式 */
        .network-room-container {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 20px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            position: relative;
            overflow: hidden;
        }

        /* 房间界面背景效果 */
        .network-room-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 30% 30%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 70% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
            animation: menuFloat 20s ease-in-out infinite;
            z-index: 0;
        }

        .network-room-content {
            background: rgba(255, 255, 255, 0.1);
            padding: 60px 40px;
            border-radius: 25px;
            backdrop-filter: blur(15px);
            width: 100%;
            max-width: 600px;
            text-align: center;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            position: relative;
            z-index: 10;
            transform: translateY(-20px);
            animation: menuSlideIn 1s ease-out forwards;
        }

        .network-room-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
            width: 100%;
        }

        .network-room-header h2 {
            font-size: 2em;
            color: #fff;
            text-shadow: 0 0 20px rgba(255, 71, 87, 0.5), 0 0 40px rgba(255, 71, 87, 0.3);
            animation: menuTitleGlow 3s ease-in-out infinite alternate;
            letter-spacing: 2px;
        }

        #currentRoomId {
            color: #ffd700;
            font-weight: bold;
            text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
        }

        .back-to-lobby-btn {
            padding: 12px 25px;
            font-size: 1.1em;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .back-to-lobby-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
        }

        .room-players {
            margin: 30px 0;
            width: 100%;
        }

        .room-players h3 {
            font-size: 1.4em;
            margin-bottom: 30px;
            color: #fff;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        }

        .player-slots {
            display: flex;
            justify-content: center;
            gap: 80px;
            margin: 30px 0;
            flex-wrap: wrap;
        }

        .player-slot-wrapper {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 15px;
        }

        .player-slot {
            background: rgba(255, 255, 255, 0.1);
            padding: 30px 20px;
            border-radius: 20px;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            cursor: pointer;
            min-width: 220px;
            backdrop-filter: blur(10px);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .player-slot:hover:not(.occupied) {
            border-color: #ff9800;
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-5px);
            box-shadow: 0 15px 35px rgba(255, 152, 0, 0.3);
        }

        .player-slot.occupied {
            cursor: default;
        }

        .slot-label {
            font-size: 16px;
            font-weight: bold;
            color: #ffd700;
            text-align: center;
            min-width: 100px;
            text-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
            background: rgba(255, 215, 0, 0.1);
            padding: 8px 20px;
            border-radius: 20px;
            border: 1px solid rgba(255, 215, 0, 0.3);
        }

        .player-slot.ready {
            border-color: #4ecdc4;
            box-shadow: 0 0 25px rgba(78, 205, 196, 0.4);
            background: rgba(78, 205, 196, 0.1);
            transform: translateY(-3px);
        }

        .player-slot.occupied {
            border-color: #667eea;
            box-shadow: 0 0 25px rgba(102, 126, 234, 0.4);
            background: rgba(102, 126, 234, 0.1);
        }

        .slot-status {
            font-size: 1.2em;
            color: rgba(255, 255, 255, 0.7);
            text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
        }

        .slot-status.ready {
            color: #4ecdc4;
            font-weight: bold;
            text-shadow: 0 0 10px rgba(78, 205, 196, 0.7);
        }

        .slot-status.occupied {
            color: #667eea;
            font-weight: bold;
            text-shadow: 0 0 10px rgba(102, 126, 234, 0.7);
        }

        .room-actions {
            display: flex;
            justify-content: center;
            gap: 25px;
            margin-top: 40px;
            flex-wrap: wrap;
        }

        .room-btn {
            padding: 15px 40px;
            font-size: 1.2em;
            font-family: 'Microsoft YaHei', sans-serif;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        }

        .room-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .room-btn:hover::before {
            left: 100%;
        }

        .ready-btn {
            background: linear-gradient(135deg, #4ecdc4 0%, #45b7aa 100%);
            color: #fff;
            box-shadow: 0 6px 25px rgba(78, 205, 196, 0.4), 0 0 40px rgba(78, 205, 196, 0.2);
        }

        .ready-btn:hover {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 10px 30px rgba(78, 205, 196, 0.6), 0 0 60px rgba(78, 205, 196, 0.3);
        }

        .ready-btn.ready {
            background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
            box-shadow: 0 6px 25px rgba(255, 107, 107, 0.4), 0 0 40px rgba(255, 107, 107, 0.2);
        }

        .ready-btn.ready:hover {
            box-shadow: 0 10px 30px rgba(255, 107, 107, 0.6), 0 0 60px rgba(255, 107, 107, 0.3);
        }

        .leave-btn {
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(10px);
        }

        .leave-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
        }

        .restart-cancel-btn {
            padding: 12px 35px;
            font-size: 1.1em;
            background: rgba(255,255,255,0.2);
            color: #fff;
            border: 2px solid rgba(255,255,255,0.5);
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            margin: 0 10px;
        }

        .restart-confirm-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(255,255,255,0.4);
        }

        .restart-cancel-btn:hover {
            background: rgba(255,255,255,0.3);
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(255,255,255,0.3);
        }

        /* 错误提示弹窗 */
        .error-content {
            background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
            padding: 30px 50px;
            border-radius: 15px;
            text-align: center;
            animation: slideIn 0.3s ease;
            box-shadow: 0 10px 30px rgba(231, 76, 60, 0.5);
        }

        .error-content h2 {
            font-size: 2em;
            margin-bottom: 15px;
            color: #fff;
            text-shadow: 0 2px 4px rgba(0,0,0,0.3);
        }

        .error-content p {
            font-size: 1.1em;
            margin-bottom: 25px;
            color: rgba(255,255,255,0.9);
        }

        .error-confirm-btn {
            padding: 12px 35px;
            font-size: 1.1em;
            background: #fff;
            color: #e74c3c;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(255,255,255,0.3);
        }

        .error-confirm-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(255,255,255,0.4);
        }

        /* 更新日志弹窗样式 */
        .changelog-content {
            background: rgba(30, 30, 30, 0.95);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 15px;
            padding: 0;
            width: 90vw;
            max-width: 1000px;
            height: 80vh;
            backdrop-filter: blur(15px);
            display: flex;
            flex-direction: column;
        }

        .changelog-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 30px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .changelog-header h2 {
            color: #ff4757;
            margin: 0;
        }

        .changelog-close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .changelog-close-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .changelog-body {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        .changelog-sidebar {
            width: 300px;
            border-right: 1px solid rgba(255, 255, 255, 0.2);
            overflow-y: auto;
            padding: 20px;
        }

        .changelog-sidebar-item {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            border-left: 4px solid transparent;
        }

        .changelog-sidebar-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateX(5px);
        }

        .changelog-sidebar-item.active {
            background: rgba(255, 71, 87, 0.2);
            border-left-color: #ff4757;
        }

        .changelog-sidebar-item h3 {
            color: white;
            margin: 0 0 5px 0;
            font-size: 16px;
        }

        .changelog-sidebar-item .date {
            color: #aaa;
            font-size: 12px;
            margin: 0;
        }

        .changelog-details {
            flex: 1;
            padding: 30px;
            overflow-y: auto;
        }

        .changelog-details-content {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 20px;
        }

        .changelog-details-content h3 {
            color: #ff4757;
            margin-bottom: 10px;
            font-size: 20px;
        }

        .changelog-details-content .date {
            color: #aaa;
            font-size: 14px;
            margin-bottom: 20px;
        }

        .changelog-details-content ul {
            color: #ddd;
            padding-left: 20px;
            margin: 0;
        }

        .changelog-details-content li {
            margin-bottom: 8px;
        }

        .changelog-details-empty {
            color: #aaa;
            text-align: center;
            margin-top: 50px;
            font-size: 16px;
        }

        /* 新手帮助按钮 */
        .help-btn {
            position: absolute;
            top: 20px;
            left: 80px;
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid rgba(255, 255, 255, 0.5);
            border-radius: 8px;
            padding: 10px 15px;
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            z-index: 20;
        }

        .help-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: scale(1.05);
            box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
        }

        /* 新手帮助弹窗 */
        .help-content {
            background: rgba(30, 30, 30, 0.95);
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 15px;
            padding: 0;
            width: 90vw;
            max-width: 1000px;
            height: 80vh;
            backdrop-filter: blur(15px);
            display: flex;
            flex-direction: column;
        }

        .help-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 20px 30px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .help-header h2 {
            color: #4fcbee;
            margin: 0;
        }

        .help-close-btn {
            background: none;
            border: none;
            color: white;
            font-size: 24px;
            cursor: pointer;
            padding: 0;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .help-close-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: scale(1.1);
        }

        .help-body {
            display: flex;
            flex: 1;
            overflow: hidden;
        }

        .help-sidebar {
            width: 280px;
            border-right: 1px solid rgba(255, 255, 255, 0.2);
            overflow-y: auto;
            padding: 20px;
        }

        .help-sidebar-item {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            border-left: 4px solid transparent;
        }

        .help-sidebar-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateX(5px);
        }

        .help-sidebar-item.active {
            background: rgba(79, 203, 238, 0.2);
            border-left-color: #4fcbee;
        }

        .help-sidebar-item h3 {
            color: white;
            margin: 0 0 5px 0;
            font-size: 16px;
        }

        .help-sidebar-item .desc {
            color: #aaa;
            font-size: 12px;
            margin: 0;
        }

        .help-details {
            flex: 1;
            padding: 30px;
            overflow-y: auto;
        }

        .help-details-content {
            background: rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            padding: 20px;
        }

        .help-details-content h3 {
            color: #4fcbee;
            margin-bottom: 10px;
            font-size: 20px;
        }

        .help-details-content h4 {
            color: #5dd5fb;
            margin: 20px 0 10px 0;
            font-size: 16px;
        }

        .help-details-content p {
            color: #ddd;
            margin: 10px 0;
            line-height: 1.6;
        }

        .help-details-content ul {
            color: #ddd;
            padding-left: 20px;
            margin: 10px 0;
        }

        .help-details-content li {
            margin-bottom: 8px;
        }

        .help-details-content table {
            width: 100%;
            border-collapse: collapse;
            margin: 15px 0;
        }

        .help-details-content th,
        .help-details-content td {
            padding: 10px;
            text-align: left;
            border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        }

        .help-details-content th {
            color: #4fcbee;
        }

        .help-details-content td {
            color: #ddd;
        }

        .help-skill-tag {
            display: inline-block;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 12px;
            margin-right: 5px;
        }

        .skill-frenzy { background: rgba(255, 68, 68, 0.3); color: #ff6b6b; }
        .skill-double { background: rgba(0, 255, 242, 0.3); color: #00fff2; }
        .skill-blink { background: rgba(237, 255, 97, 0.3); color: #edff61; }
        .skill-clone { background: rgba(209, 21, 219, 0.3); color: #d115db; }
        .skill-heavy { background: rgba(240, 136, 17, 0.3); color: #f08811; }
        .skill-intangible { background: rgba(208, 200, 200, 0.3); color: #d0c8c8; }

        /* 棋子数量选择按钮 */
        .piece-count-options {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 30px 0;
        }

        .piece-count-btn {
            padding: 15px 30px;
            font-size: 1.2em;
            background: #4fcbee;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        .piece-count-btn:hover {
            background: #288076;
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
        }

        /* 游戏模式选择按钮 */
        .mode-options {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin: 30px 0;
        }

        .mode-btn {
            padding: 15px 30px;
            font-size: 1.2em;
            background: #f2cb06fb;
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        .mode-btn:hover {
            background: #d99726;
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(196, 187, 32, 0.962);
        }

        /* 经典模式准备界面 */
        .classic-prepare-container {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 20px;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            position: relative;
            overflow: hidden;
        }

        /* 经典模式准备阶段背景效果 */
        .classic-prepare-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 30% 30%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 70% 70%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
            animation: menuFloat 20s ease-in-out infinite;
            z-index: 0;
        }

        .skill-selection-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 100%;
            max-width: 1000px;
            background: rgba(255, 255, 255, 0.1);
            padding: 60px 40px;
            border-radius: 25px;
            backdrop-filter: blur(15px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
            position: relative;
            z-index: 10;
            transform: translateY(-20px);
            animation: menuSlideIn 1s ease-out forwards;
        }

        /* 棋子数量选择 */
        #pieceCount {
            background: rgba(255, 255, 255, 0.15);
            color: white;
            border: 2px solid #3498db;
            border-radius: 8px;
            padding: 10px 15px;
            font-size: 1.1em;
            font-family: 'Microsoft YaHei', sans-serif;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }

        #pieceCount:hover {
            border-color: #2980b9;
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
            transform: translateY(-2px);
        }

        #pieceCount option {
            background: #2c3e50;
            color: white;
            padding: 10px;
        }

        /* 颜色选择网格 */
        .color-grid {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 15px;
            margin-top: 20px;
        }

        .color-option {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
            border: 2px solid transparent;
        }

        .color-option:hover {
            transform: scale(1.15) translateY(-3px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        }

        .color-option.selected {
            border: 4px solid #ffd700 !important;
            box-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
            transform: scale(1.1);
        }

        /* 玩家颜色选择区域 */
        .player-selected-skills {
            flex: 1;
            background: rgba(255, 255, 255, 0.1);
            padding: 25px;
            border-radius: 20px;
            backdrop-filter: blur(10px);
            min-height: 220px;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .player-selected-skills h3 {
            font-size: 1.3em;
            margin-bottom: 15px;
            text-align: center;
            color: #fff;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
        }

        /* 开始游戏按钮 */
        .start-battle-btn {
            padding: 18px 60px;
            font-size: 1.4em;
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            border: none;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4), 0 0 40px rgba(102, 126, 234, 0.2);
            position: relative;
            overflow: hidden;
        }

        .start-battle-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
            transition: left 0.5s ease;
        }

        .start-battle-btn:hover::before {
            left: 100%;
        }

        .start-battle-btn:hover:not(:disabled) {
            transform: translateY(-5px) scale(1.05);
            box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6), 0 0 60px rgba(102, 126, 234, 0.3);
        }

        /* 返回菜单按钮 */
        .back-to-menu-btn {
            padding: 15px 40px;
            font-size: 1.2em;
            font-family: 'Microsoft YaHei', sans-serif;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }

        .back-to-menu-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
        }

        /* 启动画面 */
        .startup-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            cursor: pointer;
            overflow: hidden;
        }

        /* 背景粒子效果 */
        .startup-screen::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 20% 80%, rgba(255, 71, 87, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
                        radial-gradient(circle at 40% 40%, rgba(78, 205, 196, 0.1) 0%, transparent 50%);
            animation: float 15s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            33% { transform: translateY(-20px) rotate(120deg); }
            66% { transform: translateY(10px) rotate(240deg); }
        }

        .startup-content {
            text-align: center;
            position: relative;
            z-index: 10;
            transform: translateY(-20px);
            animation: slideUp 1.5s ease-out forwards;
        }

        @keyframes slideUp {
            0% { opacity: 0; transform: translateY(50px); }
            100% { opacity: 1; transform: translateY(0); }
        }

        .startup-title {
            font-size: 5em;
            color: #fff;
            margin-bottom: 30px;
            text-shadow: 0 0 30px rgba(255, 71, 87, 0.6), 0 0 60px rgba(255, 71, 87, 0.3);
            animation: titleGlow 3s ease-in-out infinite alternate;
            font-family: 'Microsoft YaHei', sans-serif;
            letter-spacing: 5px;
        }

        @keyframes titleGlow {
            0% { text-shadow: 0 0 30px rgba(255, 71, 87, 0.6), 0 0 60px rgba(255, 71, 87, 0.3); }
            100% { text-shadow: 0 0 40px rgba(102, 126, 234, 0.6), 0 0 70px rgba(102, 126, 234, 0.3); }
        }

        .startup-hint {
            font-size: 1.5em;
            color: rgba(255, 255, 255, 0.8);
            animation: pulse 2s infinite, hintSlide 3s ease-in-out infinite;
            background: rgba(255, 255, 255, 0.1);
            padding: 10px 30px;
            border-radius: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.2);
            display: inline-block;
        }

        @keyframes pulse {
            0%, 100% { opacity: 0.7; }
            50% { opacity: 1; }
        }

        @keyframes hintSlide {
            0%, 100% { transform: translateY(0px); }
            50% { transform: translateY(-10px); }
        }

        /* 点击效果 */
        .startup-screen:active {
            transform: scale(0.98);
            transition: transform 0.1s ease;
        }

        /* 启动画面棋子动画 */
        .startup-chess {
            position: absolute;
            border-radius: 50%;
            opacity: 0.8;
            animation-duration: 8s;
            animation-iteration-count: infinite;
            animation-timing-function: ease-in-out;
        }

        .chess-1 {
            width: 30px;
            height: 30px;
            background: #ff4757;
            top: 20%;
            left: 20%;
            animation-name: chessMove1;
        }

        .chess-2 {
            width: 25px;
            height: 25px;
            background: #3742fa;
            top: 70%;
            left: 80%;
            animation-name: chessMove2;
            animation-delay: 1s;
        }

        .chess-3 {
            width: 35px;
            height: 35px;
            background: #2ed573;
            top: 50%;
            left: 30%;
            animation-name: chessMove3;
            animation-delay: 2s;
        }

        .chess-4 {
            width: 20px;
            height: 20px;
            background: #ffa502;
            top: 30%;
            left: 70%;
            animation-name: chessMove4;
            animation-delay: 0.5s;
        }

        .chess-5 {
            width: 28px;
            height: 28px;
            background: #8e44ad;
            top: 60%;
            left: 40%;
            animation-name: chessMove5;
            animation-delay: 1.5s;
        }

        .chess-6 {
            width: 22px;
            height: 22px;
            background: #1797e0;
            top: 40%;
            left: 60%;
            animation-name: chessMove6;
            animation-delay: 2.5s;
        }

        .chess-7 {
            width: 32px;
            height: 32px;
            background: #e0bcc2;
            top: 70%;
            left: 20%;
            animation-name: chessMove7;
            animation-delay: 0.8s;
        }

        @keyframes chessMove1 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(100px, 150px) rotate(90deg); }
            50% { transform: translate(200px, 50px) rotate(180deg); }
            75% { transform: translate(150px, 200px) rotate(270deg); }
        }

        @keyframes chessMove2 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(-150px, -100px) rotate(90deg); }
            50% { transform: translate(-50px, -200px) rotate(180deg); }
            75% { transform: translate(-100px, -150px) rotate(270deg); }
        }

        @keyframes chessMove3 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(150px, -100px) rotate(90deg); }
            50% { transform: translate(200px, -50px) rotate(180deg); }
            75% { transform: translate(100px, -150px) rotate(270deg); }
        }

        @keyframes chessMove4 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(-100px, 100px) rotate(90deg); }
            50% { transform: translate(-150px, 150px) rotate(180deg); }
            75% { transform: translate(-50px, 200px) rotate(270deg); }
        }

        @keyframes chessMove5 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(100px, -100px) rotate(90deg); }
            50% { transform: translate(150px, -150px) rotate(180deg); }
            75% { transform: translate(50px, -200px) rotate(270deg); }
        }

        @keyframes chessMove6 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(-50px, 100px) rotate(90deg); }
            50% { transform: translate(-100px, 50px) rotate(180deg); }
            75% { transform: translate(-150px, 150px) rotate(270deg); }
        }

        @keyframes chessMove7 {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(100px, -50px) rotate(90deg); }
            50% { transform: translate(150px, -100px) rotate(180deg); }
            75% { transform: translate(200px, -150px) rotate(270deg); }
        }
/* 聊天按钮 */
.header-chat-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2em;
    transition: background 0.2s;
}

.header-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 聊天面板 */
.chat-panel {
    position: absolute;
    top: 60px;
    left: 10px;
    width: 320px;
    background: rgba(30, 30, 50, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 100;
    overflow: hidden;
}

.chat-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px;
    gap: 5px;
}

.chat-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.chat-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.chat-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5em;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.chat-content {
    padding: 10px;
}

.chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    padding: 5px;
}

.chat-emoji-item {
    text-align: center;
    font-size: 1.5em;
    padding: 5px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.chat-emoji-item:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-text-input {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-input-row {
    display: flex;
    gap: 5px;
}

.chat-input-row input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font-size: 0.9em;
}

.chat-text-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-send-btn {
    background: #4ecdc4;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
}

.chat-send-btn:hover {
    background: #3dbdb5;
}

.chat-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.chat-preset-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 4px 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-preset-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* 聊天气泡 */
.chat-bubble {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: -550px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 1.1em;
    max-width: 200px;
    word-wrap: break-word;
    animation: chatBubbleFadeIn 0.3s ease-out;
    z-index: 50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.chat-bubble.emoji-bubble {
    font-size: 1.8em;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.9);
}

.chat-bubble.opponent {
    background: rgba(255, 255, 255, 0.95);
}

.chat-bubble.self {
    background: rgba(78, 205, 196, 0.9);
    color: #fff;
}

@keyframes chatBubbleFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatBubbleFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ==================== 乱斗模式保护机制 ==================== */

/* 乱斗模式保护光圈 - 棋盘绿色边框 */
#gameCanvas.chaos-protection-glow {
    box-shadow: 0 0 30px #00ff00, 0 0 60px #00ff00;
}

#gameCanvas.chaos-protection-pulse {
    animation: chaosGlowPulse 1s ease-in-out infinite;
}

@keyframes chaosGlowPulse {
    0%, 100% {
        box-shadow: 0 0 30px #00ff00, 0 0 60px #00ff00;
    }
    50% {
        box-shadow: 0 0 40px #00ff00, 0 0 80px #00ff00;
    }
}
