* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* 只在非原始光标模式下隐藏默认光标 */
body:not(.cursor-original),
body:not(.cursor-original) * {
    cursor: none !important;
}

/* 禁止所有输入元素显示文本光标 */
input, textarea, [contenteditable="true"] {
    caret-color: transparent !important;
}

/* 禁止所有元素的焦点边框和轮廓 */
*:focus, *:focus-within {
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* 禁止按钮、标签等可点击元素的焦点样式 */
button:focus,
button:focus-visible,
a:focus,
a:focus-visible,
label:focus,
label:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

/* 自定义光标样式 */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 24px;
    height: 24px;
    pointer-events: none;
    z-index: 99999;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
    display: block;
}

.custom-cursor svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 3px rgba(243, 156, 18, 0.8));
}

/* 光标路径基础样式 */
.custom-cursor .cursor-path {
    display: none;
}

/* 复古光标 */
.custom-cursor.cursor-retro .cursor-retro-path {
    display: block;
}

/* 几何光标 */
.custom-cursor.cursor-geometric .cursor-geometric-path {
    display: block;
}

/* 圆润光标 */
.custom-cursor.cursor-rounded .cursor-rounded-path {
    display: block;
}

/* 主题适配 */
.theme-pink .custom-cursor svg {
    fill: #e74c3c;
    stroke: #000;
    filter: drop-shadow(0 0 3px rgba(231, 76, 60, 0.8));
}

.theme-space .custom-cursor svg {
    fill: #3b82f6;
    stroke: #000;
    filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.8));
}

.theme-forest .custom-cursor svg {
    fill: #27ae60;
    stroke: #000;
    filter: drop-shadow(0 0 3px rgba(39, 174, 96, 0.8));
}

body {
    font-family: Arial, sans-serif;
    background-color: #2c3e50;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 10px;
    overflow: hidden;
    margin: 0;
    transition: all 0.5s ease;
}

/* 经典主题 */
.theme-classic {
    background-color: #2c3e50;
}

/* 粉色浪漫主题 */
.theme-pink {
    background-color: #f8b195;
    background-image: linear-gradient(135deg, #f8b195 0%, #f67280 50%, #c06c84 100%);
}

.theme-pink .left-sidebar,
.theme-pink .right-sidebar,
.theme-pink .main-content {
    background-color: rgba(255, 255, 255, 0.8);
    color: #333;
}

.theme-pink .game-mode-selection,
.theme-pink .mode-type-buttons,
.theme-pink .option-toggle {
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
}

.theme-pink .option-toggle label {
    color: #333;
}

.theme-pink .game-rules {
    background-color: rgba(255, 255, 255, 0.8);
}

.theme-pink .game-rules h3 {
    color: #e74c3c;
}

.theme-pink .game-rules li {
    color: #555;
}

.theme-pink .board {
    background-color: #ff6b6b;
}

/* 科幻太空主题 */
.theme-space {
    background-color: #0f172a;
    background-image: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
}

.theme-space .left-sidebar,
.theme-space .right-sidebar,
.theme-space .main-content {
    background-color: rgba(30, 41, 59, 0.8);
    border: 1px solid #3b82f6;
}

.theme-space .game-mode-selection,
.theme-space .mode-type-buttons,
.theme-space .option-toggle {
    background-color: rgba(30, 41, 59, 0.9);
    border: 1px solid #3b82f6;
}

.theme-space .board {
    background-color: #1e40af;
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.5);
}

.theme-space .card {
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 2px 5px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(59, 130, 246, 0.2),
        0 10px 30px rgba(59, 130, 246, 0.25);
}

/* 经典主题卡牌样式 */
.theme-classic .card {
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 2px 5px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(243, 156, 18, 0.2),
        0 10px 30px rgba(243, 156, 18, 0.25);
}

/* 粉色浪漫主题卡牌样式 */
.theme-pink .card {
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 2px 5px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(231, 76, 60, 0.2),
        0 10px 30px rgba(231, 76, 60, 0.25);
}

/* 绿色森林主题卡牌样式 */
.theme-forest .card {
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 2px 5px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(39, 174, 96, 0.2),
        0 10px 30px rgba(39, 174, 96, 0.25);
}

/* 绿色森林主题 */
.theme-forest {
    background-color: #2d5016;
    background-image: linear-gradient(135deg, #2d5016 0%, #4a7c29 50%, #6b9f48 100%);
}

.theme-forest .left-sidebar,
.theme-forest .right-sidebar,
.theme-forest .main-content {
    background-color: rgba(74, 124, 41, 0.8);
    border: 1px solid #8bc34a;
}

.theme-forest .game-mode-selection,
.theme-forest .mode-type-buttons,
.theme-forest .option-toggle {
    background-color: rgba(74, 124, 41, 0.9);
    border: 1px solid #8bc34a;
}

.theme-forest .board {
    background-color: #4caf50;
    box-shadow: 0 0 30px rgba(139, 195, 74, 0.5);
}

.theme-forest .cell {
    background-color: #81c784;
}

.theme-forest .cell:hover {
    background-color: #66bb6a;
}

.game-container {
    text-align: center;
    max-width: 100%;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    width: 100%;
}

/* 系统设置按钮样式 */
.system-settings-btn {
    width: 50px;
    height: 50px;
    background-color: #34495e;
    color: #f39c12;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 100;
}

.system-settings-btn:hover {
    background-color: #2c3e50;
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* 三栏布局样式 */
.game-layout {
    display: flex;
    flex: 1;
    gap: 15px;
    height: calc(100vh - 120px);
}

/* 左侧栏样式 */
.left-sidebar {
    width: 350px;
    background-color: #34495e;
    border-radius: 15px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: width 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 10;
}

/* 左侧栏折叠状态 */
.left-sidebar.collapsed {
    width: 40px;
    padding: 15px 5px;
    overflow: hidden;
}

/* 折叠/展开按钮样式 */
.sidebar-toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background-color: transparent; /* 背景色为透明 */
    color: #f39c12; /* 箭头颜色为橙色 */
    border: none; /* 去掉边框 */
    border-radius: 50%; /* 恢复圆形设计 */
    font-size: 3.75em; /* 箭头大小增大50% */
    font-weight: bold;
    cursor: pointer;
    display: block;
    box-shadow: none;
    transition: none; /* 移除过渡效果 */
    z-index: 100; /* 确保在中间栏内容之上 */
    outline: none;
    line-height: 1;
    padding: 0;
    margin: 0;
}

.sidebar-toggle-btn:hover {
    background-color: transparent; /* 移除悬停背景色 */
    color: #f39c12; /* 保持原色 */
    transform: none; /* 移除悬停缩放 */
    box-shadow: none; /* 移除悬停阴影 */
}

.sidebar-toggle-btn:active {
    transform: none; /* 移除点击缩放 */
}

/* 折叠状态下的按钮图标 */
.left-sidebar.collapsed .toggle-icon {
    transform: none; /* 移除旋转效果 */
}

/* 正常状态下的按钮图标 */
.toggle-icon {
    transition: none; /* 移除过渡效果 */
    display: inline-block;
    height: auto;
    width: auto;
    text-align: left;
    margin: 0;
    line-height: 1;
    position: absolute;
    top: 0;
    left: 5px;
}

/* 确保中间栏相对定位，以便按钮可以绝对定位在其内部 */
.main-content {
    position: relative;
}

/* 恢复h3默认样式 */
.left-sidebar h3 {
    margin-top: 0;
    position: static;
    z-index: auto;
}

/* 折叠状态下隐藏内容 */
.left-sidebar.collapsed > *:not(.sidebar-toggle-btn) {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 正常状态下显示内容 */
.left-sidebar > * {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 中间棋盘区域样式 */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #34495e;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 0;
}

/* 右侧栏样式 */
.right-sidebar {
    width: 370px;
    background-color: #34495e;
    border-radius: 15px;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 右侧栏滚动条样式 */
.right-sidebar::-webkit-scrollbar {
    width: 8px;
}

.right-sidebar::-webkit-scrollbar-track {
    background: rgba(34, 49, 63, 0.8);
    border-radius: 4px;
}

.right-sidebar::-webkit-scrollbar-thumb {
    background: #f39c12;
    border-radius: 4px;
}

.right-sidebar::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

h1 {
    margin-bottom: 20px;
    color: #ecf0f1;
    font-size: 2.2em;
    transform: translateY(20px);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3),
                 0 5px 15px rgba(0, 0, 0, 0.2),
                 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
    line-height: 1.2;
}

h1:hover {
    transform: translateY(20px) scale(1.05);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.4),
                 0 10px 30px rgba(0, 0, 0, 0.3),
                 0 15px 45px rgba(0, 0, 0, 0.2);
    color: #f39c12;
}

@keyframes titleFloat {
    0% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.01);
    }
    100% {
        transform: translateY(0px) scale(1);
    }
}

/* 游戏状态提示样式 */
.game-status {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    pointer-events: none;
    position: relative;
    z-index: 50;
}

.status-message {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 8px 25px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    max-width: 80%;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 2px solid transparent;
}

.status-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 不同类型状态消息的样式 */
.status-message.info {
    background-color: rgba(52, 152, 219, 0.8);
    border-color: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4),
                0 8px 25px rgba(52, 152, 219, 0.3);
}

.status-message.success {
    background-color: rgba(39, 174, 96, 0.8);
    border-color: #229954;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4),
                0 8px 25px rgba(39, 174, 96, 0.3);
}

.status-message.warning {
    background-color: rgba(243, 156, 18, 0.8);
    border-color: #e67e22;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4),
                0 8px 25px rgba(243, 156, 18, 0.3);
}

.status-message.error {
    background-color: rgba(231, 76, 60, 0.8);
    border-color: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4),
                0 8px 25px rgba(231, 76, 60, 0.3);
}

.status-message.eat {
    background-color: rgba(231, 76, 60, 0.8);
    border-color: #c0392b;
    animation: eatPulse 0.5s ease-in-out;
}

.status-message.move {
    background-color: rgba(52, 152, 219, 0.8);
    border-color: #2980b9;
    animation: movePulse 0.5s ease-in-out;
}

.status-message.flip {
    background-color: rgba(243, 156, 18, 0.8);
    border-color: #e67e22;
    animation: flipPulse 0.5s ease-in-out;
}

/* 状态消息动画 */
@keyframes eatPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes movePulse {
    0% {
        transform: translateY(-20px) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateY(-10px) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes flipPulse {
    0% {
        transform: rotateY(90deg) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: rotateY(45deg) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: rotateY(0deg) scale(1);
        opacity: 1;
    }
}

.game-info {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
    background-color: rgba(44, 62, 80, 0.8);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    flex-wrap: wrap;
    gap: 10px;
}

.player-info, .player2-info, .ai-info, .turn-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(52, 73, 94, 0.8);
    padding: 10px 18px;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    min-width: 250px;
}

/* 缩限倒计时和剩余盲盒样式，让它们并排显示 */
.zone-info, .blind-box-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(52, 73, 94, 0.8);
    padding: 10px 12px;
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    min-width: 150px;
    max-width: 180px;
}

/* 颜色指示器和总战力显示容器 */
.player-info .color-container,
.player2-info .color-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* 调整颜色指示器样式，使其在水平布局中更合适 */
.player-info .color-indicator,
.player2-info .color-indicator {
    margin: 0;
}

.player-info:hover, .player2-info:hover, .ai-info:hover, .turn-info:hover, .zone-info:hover, .blind-box-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.player-info:hover {
    border-color: #3498db;
}

.player2-info:hover, .ai-info:hover {
    border-color: #e74c3c;
}

.turn-info:hover {
    border-color: #f39c12;
}

.zone-info:hover {
    border-color: #e74c3c;
}

.blind-box-info:hover {
    border-color: #f39c12;
}

.player-info h2, .player2-info h2, .ai-info h2, .turn-info h2 {
    font-size: 1.2em;
    margin-bottom: 12px;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 缩限倒计时和剩余盲盒标题样式 */
.zone-info h2, .blind-box-info h2 {
    font-size: 1em;
    margin-bottom: 8px;
    color: #bdc3c7;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 缩限倒计时数值样式 */
#zone-countdown {
    font-size: 1.4em;
    font-weight: bold;
    color: #e74c3c;
    animation: pulse 1s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background-color: rgba(231, 76, 60, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid #e74c3c;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* 剩余盲盒数值样式 */
#blind-box-count {
    font-size: 1.4em;
    font-weight: bold;
    color: gold;
    animation: pulse 1s infinite;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3),
                 0 0 10px rgba(255, 215, 0, 0.5),
                 0 0 20px rgba(255, 215, 0, 0.3);
    background-color: rgba(255, 215, 0, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 2px solid gold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

/* 即将缩限时的增强动画效果 */
#zone-countdown.near-shrink {
    animation: pulse 0.01s infinite; /* 增强100倍：从1秒变为0.01秒 */
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8),
                 0 0 20px rgba(255, 0, 0, 0.6),
                 0 0 30px rgba(255, 0, 0, 0.4);
    background-color: rgba(255, 0, 0, 0.2);
    border: 3px solid #ff0000;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

/* 游戏模式选择样式 */
.game-mode-selection {
    margin-bottom: 10px;
    background-color: rgba(44, 62, 80, 0.8);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15),
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.game-mode-selection:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2),
                inset 0 1px 2px rgba(255, 255, 255, 0.1);
}

.game-mode-selection h3 {
    margin-bottom: 15px;
    color: #ecf0f1;
    font-size: 1.2em;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

.mode-type-buttons {
    margin-bottom: 15px;
    padding: 12px;
    background-color: rgba(52, 73, 94, 0.8);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.mode-type-buttons:last-child {
    margin-bottom: 0;
}

.mode-type-buttons:hover {
    border-color: #3498db;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.mode-type-buttons h4 {
    margin-bottom: 12px;
    color: #3498db;
    font-size: 1.1em;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* 经典模式标题特殊样式 */
.mode-type-buttons:nth-child(2) h4 {
    color: #27ae60;
}

/* 领域缩限模式标题特殊样式 */
.mode-type-buttons:nth-child(3) h4 {
    color: #e74c3c;
}

.mode-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 12px 24px;
    font-size: 1em;
    border: 2px solid transparent;
    border-radius: 30px;
    background-color: #7f8c8d;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: bold;
    min-width: 140px;
    max-width: 200px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    flex: 1;
    text-align: center;
}

/* AI难度选择按钮特殊样式 */
#ai-difficulty-selection .mode-buttons {
    gap: 10px;
}

#ai-difficulty-selection .mode-btn {
    flex: 1;
    min-width: 120px;
    max-width: none;
}

.mode-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;
}

.mode-btn:hover::before {
    left: 100%;
}

.mode-btn:hover {
    background-color: #95a5a6;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: #3498db;
}

.mode-btn.active {
    background-color: #3498db;
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4),
                0 0 20px rgba(52, 152, 219, 0.2);
    border-color: #2980b9;
    transform: translateY(-2px);
}

.mode-btn.active:hover {
    background-color: #2980b9;
    box-shadow: 0 8px 25px rgba(41, 128, 185, 0.5),
                0 0 30px rgba(41, 128, 185, 0.3);
}

/* 经典模式按钮特殊样式 */
.mode-type-buttons:nth-child(2) .mode-btn.active {
    background-color: #27ae60;
    box-shadow: 0 6px 15px rgba(39, 174, 96, 0.4),
                0 0 20px rgba(39, 174, 96, 0.2);
    border-color: #229954;
}

.mode-type-buttons:nth-child(2) .mode-btn.active:hover {
    background-color: #229954;
    box-shadow: 0 8px 25px rgba(34, 153, 84, 0.5),
                0 0 30px rgba(34, 153, 84, 0.3);
}

/* 被操作牌的背景高亮闪烁效果 */
.card.text-highlight {
    animation: cardHighlight 2s infinite ease-in-out;
    z-index: 20;
    background-color: rgba(243, 156, 18, 0.7) !important;
    box-shadow: 0 0 20px #f39c12, 0 0 40px rgba(243, 156, 18, 0.8), 0 0 60px rgba(243, 156, 18, 0.5);
}

@keyframes cardHighlight {
    0% {
        background-color: rgba(243, 156, 18, 0.5);
        box-shadow: 0 0 10px #f39c12, 0 0 20px rgba(243, 156, 18, 0.5);
        transform: translateZ(39px) rotateX(5deg) rotateY(5deg);
    }
    50% {
        background-color: rgba(243, 156, 18, 0.8);
        box-shadow: 0 0 20px #f39c12, 0 0 40px rgba(243, 156, 18, 0.8), 0 0 60px rgba(243, 156, 18, 0.5);
        transform: translateZ(52px) rotateX(8deg) rotateY(8deg);
    }
    100% {
        background-color: rgba(243, 156, 18, 0.5);
        box-shadow: 0 0 10px #f39c12, 0 0 20px rgba(243, 156, 18, 0.5);
        transform: translateZ(39px) rotateX(5deg) rotateY(5deg);
    }
}

/* 大逃杀模式按钮特殊样式 */
.mode-type-buttons:nth-child(3) .mode-btn.active {
    background-color: #e74c3c;
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4),
                0 0 20px rgba(231, 76, 60, 0.2);
    border-color: #c0392b;
}

.mode-type-buttons:nth-child(3) .mode-btn.active:hover {
    background-color: #c0392b;
    box-shadow: 0 8px 25px rgba(192, 57, 43, 0.5),
                0 0 30px rgba(192, 57, 43, 0.3);
}

/* 游戏选项样式 */
.game-options {
    margin: 15px 0;
    padding: 12px;
    background-color: rgba(52, 73, 94, 0.8);
    border-radius: 10px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.game-options:hover {
    border-color: #3498db;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.2);
    transform: translateY(-1px);
}

.game-options h4 {
    margin-bottom: 12px;
    color: #3498db;
    font-size: 1.1em;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.option-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: rgba(44, 62, 80, 0.8);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.option-toggle:last-child {
    margin-bottom: 0;
}

.option-toggle:hover {
    background-color: rgba(52, 73, 94, 0.9);
}

.option-toggle label {
    color: #ecf0f1;
    font-weight: bold;
    cursor: pointer;
    font-size: 1em;
    transition: color 0.3s ease;
}

.option-toggle:hover label {
    color: #3498db;
}

/* 新功能标志样式 */
.new-feature {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    font-size: 0.6em;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    vertical-align: top;
    animation: pulse 1.5s infinite;
}

/* 开关组件样式 */
.toggle-switch-container {
    position: relative;
    width: 50px;
    height: 24px;
}

.toggle-switch {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #7f8c8d;
    transition: .4s;
    border-radius: 24px;
    display: block;
    pointer-events: all;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    pointer-events: none;
}

.toggle-switch:checked + .toggle-slider {
    background-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.5);
}

.toggle-switch:focus + .toggle-slider {
    box-shadow: 0 0 1px #3498db;
}

.toggle-switch:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* 盲盒卡牌样式 - 保持和普通牌一致 */
.card.blind-box {
    /* 移除所有特殊视觉效果，保持和普通牌一致 */
}

/* 盲盒效果模态框样式 */
.blind-box-effect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.blind-box-effect-modal.show {
    opacity: 1;
    pointer-events: all;
}

.blind-box-effect-modal .modal-content {
    background-color: #34495e;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.3);
    transform: scale(0.5);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
    border: 3px solid gold;
    max-width: 500px;
    width: 90%;
}

.blind-box-effect-modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.blind-box-effect-title {
    color: gold;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.5);
    animation: titlePulse 2s infinite;
}

.blind-box-effect-message {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1.5;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* 自定义滚动条样式 */
.blind-box-effect-message::-webkit-scrollbar {
    width: 8px;
}

.blind-box-effect-message::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.blind-box-effect-message::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.6);
    border-radius: 10px;
}

.blind-box-effect-message::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.8);
}

/* 淡出动画 */
.blind-box-effect-modal.fade-out {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.blind-box-effect-modal.fade-out .modal-content {
    transform: scale(0.8);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}

/* 系统设置模态框样式 */
.system-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.system-settings-modal.show {
    opacity: 1;
    pointer-events: all;
}

.system-settings-content {
    background-color: #34495e;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.3);
    transform: scale(0.5);
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    border: 3px solid gold;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    /* 现代浏览器滚动条样式 */
    scrollbar-color: #f39c12 rgba(34, 49, 63, 0.8);
    scrollbar-width: thin;
}

/* WebKit浏览器（Chrome, Edge, Safari）滚动条样式 */
.system-settings-content::-webkit-scrollbar {
    width: 8px;
}

.system-settings-content::-webkit-scrollbar-track {
    background: rgba(34, 49, 63, 0.8);
    border-radius: 4px;
}

.system-settings-content::-webkit-scrollbar-thumb {
    background: #f39c12;
    border-radius: 4px;
}

.system-settings-content::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

.system-settings-modal.show .system-settings-content {
    transform: scale(1);
    opacity: 1;
}

.system-settings-title {
    color: gold;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.5);
}

/* 设置容器样式 */
.settings-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

/* 左侧选项栏样式 */
.settings-sidebar {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.settings-tab {
    padding: 15px;
    background-color: rgba(44, 62, 80, 0.8);
    color: #ecf0f1;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1em;
    font-weight: bold;
}

.settings-tab:hover {
    background-color: rgba(52, 73, 94, 0.9);
    transform: translateX(5px);
}

.settings-tab.active {
    background-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
    transform: translateX(5px);
}

/* 右侧设置内容样式 */
.settings-content {
    flex: 1;
    min-width: 0;
}

.settings-panel {
    display: none;
    background-color: rgba(44, 62, 80, 0.8);
    padding: 20px;
    border-radius: 10px;
    text-align: left;
}

.settings-panel.active {
    display: block;
}

.settings-panel h3 {
    color: #3498db;
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* 主题选项样式 */
.theme-options,
.language-options,
.voice-language-options,
.cursor-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.theme-option,
.language-option,
.voice-language-option,
.cursor-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: rgba(52, 73, 94, 0.8);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.theme-option:hover,
.language-option:hover,
.voice-language-option:hover,
.cursor-option:hover {
    background-color: rgba(62, 83, 104, 0.9);
    transform: translateY(-2px);
}

.theme-option input[type="radio"],
.language-option input[type="radio"],
.voice-language-option input[type="radio"],
.cursor-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.theme-option label,
.language-option label,
.voice-language-option label,
.cursor-option label {
    color: #ecf0f1;
    font-weight: bold;
    cursor: pointer;
    flex: 1;
}

/* 音频控制样式 */
.audio-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.audio-control {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background-color: rgba(52, 73, 94, 0.8);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.audio-control:hover {
    background-color: rgba(62, 83, 104, 0.9);
}

.audio-control label {
    color: #ecf0f1;
    font-weight: bold;
    width: 200px;
    flex-shrink: 0;
}

.audio-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #7f8c8d;
    outline: none;
    -webkit-appearance: none;
}

.audio-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.2);
}

.audio-control .volume-value {
    color: #ecf0f1;
    font-weight: bold;
    width: 60px;
    text-align: right;
    flex-shrink: 0;
}

/* 底部按钮样式 */
.settings-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.settings-buttons .modal-btn {
    padding: 12px 30px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.settings-buttons .modal-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

#settings-save {
    background-color: #27ae60;
    border: 2px solid #229954;
    color: white;
}

#settings-save:hover {
    background-color: #229954;
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
}

#settings-cancel {
    background-color: #7f8c8d;
    border: 2px solid #95a5a6;
    color: white;
}

#settings-cancel:hover {
    background-color: #95a5a6;
    box-shadow: 0 8px 20px rgba(149, 165, 166, 0.4);
}

/* 横向滚动通知样式（保留，但不再使用） */
.blind-box-notification {
    position: fixed;
    top: 20px;
    left: -50%;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 25px;
    z-index: 1000;
    animation: scrollNotification 8s ease-in-out;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 2px solid gold;
    transform: translateX(0);
    display: none;
}

@keyframes scrollNotification {
    0% { transform: translateX(-100vw); opacity: 1; }
    20% { transform: translateX(0); opacity: 1; }
    80% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100vw); opacity: 1; }
}

/* 领域缩限模式特殊样式 */
.battle-royale-mode {
    border: 2px solid #e74c3c;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

/* 圈外格子样式 */
.cell.out-of-zone {
    background-color: #7f8c8d !important;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.2) 10px, rgba(0,0,0,0.2) 20px);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.7;
}

/* 缩限警告样式 */
.zone-shrink-warning {
    background-color: rgba(231, 76, 60, 0.9);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    margin: 10px auto;
    max-width: 300px;
    font-weight: bold;
    text-align: center;
    animation: pulse 1s infinite;
}

/* 即将缩限的棋盘闪烁样式 */
.cell.about-to-shrink {
    animation: shrinkFlash 0.5s ease-in-out infinite alternate;
}

/* 即将缩限的卡牌闪烁样式 */
.cell.about-to-shrink .card {
    animation: shrinkFlash 0.5s ease-in-out infinite alternate;
}

@keyframes shrinkFlash {
    0% {
        background-color: rgba(231, 76, 60, 0.3);
        border-color: rgba(231, 76, 60, 0.5);
    }
    100% {
        background-color: rgba(231, 76, 60, 0.7);
        border-color: rgba(231, 76, 60, 1);
    }
}

.color-indicator {
    width: 120px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 3px solid transparent;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 总战力显示样式 */
.total-power-indicator {
    width: 120px;
    height: 50px;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 1em;
    background-color: rgba(52, 152, 219, 0.8);
    color: white;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    border: 2px solid #2980b9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.total-power-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background-color: rgba(52, 152, 219, 1);
}

.color-indicator:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.color-indicator.red {
    background-color: #e74c3c;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4),
                inset 0 1px 2px rgba(255, 255, 255, 0.3),
                inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    border-color: #c0392b;
    animation: pulse 2s infinite;
}

.color-indicator.black {
    background-color: #2c3e50;
    color: white;
    border: 3px solid #7f8c8d;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.4),
                inset 0 1px 2px rgba(255, 255, 255, 0.1),
                inset 0 -1px 2px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite 0.5s;
}

.color-indicator.undefined {
    background-color: #7f8c8d;
    color: white;
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.3),
                inset 0 1px 2px rgba(255, 255, 255, 0.2),
                inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

#current-turn {
    font-size: 1.8em;
    font-weight: bold;
    color: #f39c12;
    animation: pulse 1s infinite;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3),
                 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: rgba(243, 156, 18, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    border: 3px solid #f39c12;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
}

#current-turn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.4);
}

.board-container {
    display: flex;
    justify-content: center;
    perspective: 1560px; /* 增强30% */
    perspective-origin: center -100px;
    width: 100%;
    height: 100%;
    align-items: center;
    cursor: default;
}

.board-container:active {
    cursor: default;
}

.rotation-controls {
    position: absolute;
    top: -10px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 100;
}

.reset-rotation-btn, .toggle-horizontal-btn, .toggle-top-view-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: static;
    transform: none;
}

.toggle-top-view-btn {
    background-color: #FF9800;
}

.reset-rotation-btn:hover, .toggle-horizontal-btn:hover, .toggle-top-view-btn:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.toggle-horizontal-btn {
    background-color: #2196F3;
}

.toggle-horizontal-btn:hover {
    background-color: #1976D2;
}

.toggle-top-view-btn:hover {
    background-color: #F57C00;
}

.board {
    display: grid;
    grid-template-columns: repeat(8, 70px);
    grid-template-rows: repeat(7, 105px);
    gap: 4px;
    background-color: #27ae60;
    padding: 12px;
    border-radius: 10px;
    transform-style: preserve-3d;
    transform: perspective(1560px) rotateX(3deg) translateZ(5px); /* 增强30% */
    transition: transform 0.3s ease;
    /* 增强棋盘的3D阴影效果 */
    box-shadow: 
        0 10.4px 19.5px rgba(0, 0, 0, 0.325), /* 增强30% */
        0 19.5px 39px rgba(0, 0, 0, 0.26), /* 增强30% */
        0 26px 52px rgba(0, 0, 0, 0.195), /* 增强30% */
        0 39px 78px rgba(0, 0, 0, 0.13), /* 增强30% */
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
    /* 添加CSS硬件加速 */
    will-change: transform, box-shadow;
    max-width: 100%;
    max-height: 100%;
}

/* 增强棋盘悬停效果（减小效果） */
.board:hover {
    transform: perspective(1950px) rotateX(1.25deg) translateZ(3.25px); /* 增强30% */
    box-shadow: 
        0 10.4px 19.5px rgba(0, 0, 0, 0.325), /* 增强30% */
        0 19.5px 39px rgba(0, 0, 0, 0.26), /* 增强30% */
        0 26px 52px rgba(0, 0, 0, 0.195), /* 增强30% */
        0 39px 78px rgba(0, 0, 0, 0.13), /* 增强30% */
        inset 0 1px 2px rgba(255, 255, 255, 0.3),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2);
}

.cell {
    width: 70px;
    height: 105px;
    background-color: #2ecc71;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: default;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cell:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* 卡牌悬停3D效果增强 - 简化旋转以提高点击准确性 */
.cell:hover .card {
    transform: translateZ(20px);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 15px 35px rgba(243, 156, 18, 0.2);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 选中卡牌的3D效果 */
.cell.selected {
    z-index: 20;
    animation: selectedPulse 1s infinite;
    box-shadow: 0 0 20px #f39c12, 0 0 40px rgba(243, 156, 18, 0.5);
    transform: scale(1.05);
}

.cell.selected .card {
    transform: translateZ(25px);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 18px 40px rgba(243, 156, 18, 0.25);
}

.cell.empty {
    background-color: #2ecc71;
    cursor: pointer;
}

@keyframes selectedPulse {
    0% {
        box-shadow: 0 0 20px #f39c12, 0 0 40px rgba(243, 156, 18, 0.5);
    }
    50% {
        box-shadow: 0 0 30px #f39c12, 0 0 60px rgba(243, 156, 18, 0.8);
    }
    100% {
        box-shadow: 0 0 20px #f39c12, 0 0 40px rgba(243, 156, 18, 0.5);
    }
}

.cell.highlighted {
    background-color: #f1c40f;
}

.card {
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    /* 增强阴影效果，添加更多层次阴影，增强立体感 */
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 2px 5px rgba(0, 0, 0, 0.15),
        0 5px 15px rgba(0, 0, 0, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.25),
        0 20px 50px rgba(0, 0, 0, 0.15);
    /* 添加卡牌厚度和3D效果 */
    transform: translateZ(19.5px); /* 增强30% */
    /* 添加CSS硬件加速 */
    will-change: transform, box-shadow;
    /* 禁止文本选择，防止点击时出现输入光标 */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* 禁止拖拽 */
    -webkit-user-drag: none;
    user-drag: none;
}

/* 确保卡牌内的所有元素都不可选 */
.card * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
}

.card.back {
    background-color: #3498db;
    background-image: linear-gradient(45deg, #2980b9 25%, transparent 25%, transparent 75%, #2980b9 75%, #2980b9),
                      linear-gradient(45deg, #2980b9 25%, transparent 25%, transparent 75%, #2980b9 75%, #2980b9);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    color: transparent;
}

.card.front {
    transform: rotateY(0deg);
}

.card.red {
    color: #e74c3c;
}

.card.black {
    color: #2c3e50;
}

.card .rank {
    font-size: 24px;
    line-height: 1;
    position: absolute;
    z-index: 1;
}

.card .suit {
    font-size: 42px;
    text-align: center;
    line-height: 1;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 横向棋盘时卡牌文字旋转 - 包括底部rank元素 */
.card.horizontal-text .rank {
    transform: rotate(90deg);
}

.card.horizontal-text .rank.bottom {
    transform: rotate(270deg);
}

.card.horizontal-text .suit {
    transform: rotate(90deg);
}

/* 横向棋盘时神力值旋转 - 保持居中 */
.card.horizontal-text .power {
    transform: translate(-50%, -50%) rotate(90deg);
}

/* 神力效果显示样式 */
.card .power {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    font-weight: bold;
    z-index: 1;
    pointer-events: none;
    animation: pulse 1.5s infinite;
}

/* 神力效果的战斗力显示样式 */
.card .power.power-effect {
    color: gold;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5);
    animation: power-pulse 1.5s infinite;
}

/* 同化效果的战斗力显示样式 */
.card .power.assimilate-effect {
    color: #9b59b6;
    text-shadow: 0 0 10px rgba(155, 89, 182, 0.8), 0 0 20px rgba(155, 89, 182, 0.5);
    animation: assimilate-pulse 1.5s infinite;
}

/* 阵法效果的战斗力显示样式 */
.card .power.formation-effect {
    color: #45b7d1;
    text-shadow: 0 0 10px rgba(69, 183, 209, 0.8), 0 0 20px rgba(69, 183, 209, 0.5);
    animation: formation-pulse 1.5s infinite;
}

/* 效果标记样式 */
.card .effect-marker {
    position: absolute;
    top: 3px;
    right: 3px;
    font-size: 12px;
    font-weight: bold;
    padding: 1px 1px;
    border-radius: 2px;
    z-index: 2;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    writing-mode: vertical-rl;
    text-orientation: upright;
}

/* 神力效果标记样式 */
.card .effect-marker.power-marker {
    color: white;
    background-color: rgba(255, 215, 0, 0.8);
}

/* 同化效果标记样式 */
.card .effect-marker.assimilate-marker {
    color: white;
    background-color: rgba(155, 89, 182, 0.8);
}

/* 阵法效果标记样式 */
.card .effect-marker.formation-marker {
    color: white;
    background-color: rgba(69, 183, 209, 0.8);
}

/* 神力效果闪烁动画 */
@keyframes power-pulse {
    0% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 215, 0, 1), 0 0 30px rgba(255, 215, 0, 0.8);
        opacity: 0.8;
    }
    100% {
        text-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.5);
        opacity: 1;
    }
}

/* 同化效果闪烁动画 */
@keyframes assimilate-pulse {
    0% {
        text-shadow: 0 0 10px rgba(155, 89, 182, 0.8), 0 0 20px rgba(155, 89, 182, 0.5);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 20px rgba(155, 89, 182, 1), 0 0 30px rgba(155, 89, 182, 0.8);
        opacity: 0.8;
    }
    100% {
        text-shadow: 0 0 10px rgba(155, 89, 182, 0.8), 0 0 20px rgba(155, 89, 182, 0.5);
        opacity: 1;
    }
}

/* 阵法效果闪烁动画 */
@keyframes formation-pulse {
    0% {
        text-shadow: 0 0 10px rgba(69, 183, 209, 0.8), 0 0 20px rgba(69, 183, 209, 0.5);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 20px rgba(69, 183, 209, 1), 0 0 30px rgba(69, 183, 209, 0.8);
        opacity: 0.8;
    }
    100% {
        text-shadow: 0 0 10px rgba(69, 183, 209, 0.8), 0 0 20px rgba(69, 183, 209, 0.5);
        opacity: 1;
    }
}

/* 未翻开卡牌的神力祝福样式 */
.card .power-blessing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 14px;
    font-weight: bold;
    color: gold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    pointer-events: none;
    animation: pulse 2s infinite;
    opacity: 0.8;
}

/* 未翻开卡牌的同化祝福样式 */
.card .assimilate-blessing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    font-size: 14px;
    font-weight: bold;
    color: #9b59b6;
    text-shadow: 0 0 8px rgba(155, 89, 182, 0.8);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    pointer-events: none;
    animation: pulse 2s infinite;
    opacity: 0.8;
}

.card .rank.bottom {
    text-align: left !important;
    transform: rotate(180deg);
    position: absolute;
    bottom: 4px;
    right: 4px;
    z-index: 1;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.game-rules {
    background-color: rgba(44, 62, 80, 0.8);
    padding: 12px;
    border-radius: 10px;
    margin-top: 10px;
    text-align: left;
    font-size: 0.9em;
    max-height: 300px;
    overflow-y: auto;
    /* 现代浏览器滚动条样式 */
    scrollbar-color: #f39c12 rgba(34, 49, 63, 0.8);
    scrollbar-width: thin;
}

/* WebKit浏览器（Chrome, Edge, Safari）滚动条样式 */
.game-rules::-webkit-scrollbar {
    width: 8px;
}

.game-rules::-webkit-scrollbar-track {
    background: rgba(34, 49, 63, 0.8);
    border-radius: 4px;
}

.game-rules::-webkit-scrollbar-thumb {
    background: #f39c12;
    border-radius: 4px;
}

.game-rules::-webkit-scrollbar-thumb:hover {
    background: #e67e22;
}

.game-rules h3 {
    color: #ecf0f1;
    margin-bottom: 8px;
    text-align: center;
    font-size: 1.1em;
}

.game-rules ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.game-rules li {
    color: #bdc3c7;
    margin-bottom: 6px;
    padding-left: 18px;
    position: relative;
    line-height: 1.4;
}

.game-rules li:before {
    content: "•";
    color: #f39c12;
    font-weight: bold;
    position: absolute;
    left: 0;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(243, 156, 18, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0);
    }
}

@keyframes flip {
    0% {
        transform: perspective(1200px) rotateY(0deg) translateZ(15px) scale(1);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 2px 5px rgba(0, 0, 0, 0.15),
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 20px 50px rgba(0, 0, 0, 0.15);
    }
    25% {
        transform: perspective(1200px) rotateY(45deg) translateZ(30px) scale(1.08);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 20px 50px rgba(0, 0, 0, 0.25),
            0 30px 75px rgba(0, 0, 0, 0.2),
            0 40px 100px rgba(0, 0, 0, 0.15);
    }
    50% {
        transform: perspective(1200px) rotateY(90deg) translateZ(60px) scale(1.15);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 15px 45px rgba(0, 0, 0, 0.5);
    }
    75% {
        transform: perspective(1200px) rotateY(135deg) translateZ(30px) scale(1.08);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 8px 25px rgba(0, 0, 0, 0.3),
            0 20px 50px rgba(0, 0, 0, 0.25),
            0 30px 75px rgba(0, 0, 0, 0.2),
            0 40px 100px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: perspective(1200px) rotateY(180deg) translateZ(15px) scale(1);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 2px 5px rgba(0, 0, 0, 0.15),
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 20px 50px rgba(0, 0, 0, 0.15);
    }
}

@keyframes move {
    0% {
        transform: perspective(1000px) translate(0, 0) rotateX(0deg) rotateY(0deg) translateZ(15px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 2px 5px rgba(0, 0, 0, 0.15),
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 20px 50px rgba(0, 0, 0, 0.15);
    }
    25% {
        transform: perspective(1000px) translate(0, 0) rotateX(-20deg) rotateY(20deg) translateZ(50px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 15px 30px rgba(0, 0, 0, 0.5),
            0 30px 60px rgba(0, 0, 0, 0.3),
            0 45px 90px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: perspective(1000px) translate(0, 0) rotateX(20deg) rotateY(-20deg) translateZ(50px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 15px 30px rgba(0, 0, 0, 0.5),
            0 30px 60px rgba(0, 0, 0, 0.3),
            0 45px 90px rgba(0, 0, 0, 0.2);
    }
    75% {
        transform: perspective(1000px) translate(0, 0) rotateX(-8deg) rotateY(8deg) translateZ(40px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 12px 24px rgba(0, 0, 0, 0.4),
            0 24px 48px rgba(0, 0, 0, 0.25),
            0 36px 72px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: perspective(1000px) translate(0, 0) rotateX(0deg) rotateY(0deg) translateZ(15px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 2px 5px rgba(0, 0, 0, 0.15),
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 20px 50px rgba(0, 0, 0, 0.15);
    }
}

@keyframes eaten {
    0% {
        transform: perspective(1000px) scale(1) rotateX(0deg) rotateY(0deg) translateZ(15px);
        opacity: 1;
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 2px 5px rgba(0, 0, 0, 0.15),
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 20px 50px rgba(0, 0, 0, 0.15);
    }
    30% {
        transform: perspective(1000px) scale(1.5) rotateX(25deg) rotateY(25deg) translateZ(50px);
        opacity: 0.7;
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 15px 30px rgba(0, 0, 0, 0.5),
            0 30px 60px rgba(0, 0, 0, 0.3),
            0 45px 90px rgba(0, 0, 0, 0.2);
    }
    60% {
        transform: perspective(1000px) scale(0.6) rotateX(-25deg) rotateY(-25deg) translateZ(30px);
        opacity: 0.4;
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 8px 20px rgba(0, 0, 0, 0.3),
            0 16px 40px rgba(0, 0, 0, 0.2),
            0 24px 60px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: perspective(1000px) scale(0) rotateX(50deg) rotateY(50deg) translateZ(0px);
        opacity: 0;
        box-shadow: none;
    }
}

@keyframes eating {
    0% {
        transform: perspective(1000px) scale(1) translateZ(15px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 2px 5px rgba(0, 0, 0, 0.15),
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 20px 50px rgba(0, 0, 0, 0.15);
    }
    30% {
        transform: perspective(1000px) scale(1.6) rotateX(15deg) rotateY(15deg) translateZ(60px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 25px 50px rgba(0, 0, 0, 0.7),
            0 50px 100px rgba(0, 0, 0, 0.4),
            0 75px 150px rgba(0, 0, 0, 0.2);
    }
    70% {
        transform: perspective(1000px) scale(1.3) rotateX(-8deg) rotateY(-8deg) translateZ(45px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 20px 40px rgba(0, 0, 0, 0.5),
            0 40px 80px rgba(0, 0, 0, 0.3),
            0 60px 120px rgba(0, 0, 0, 0.15);
    }
    100% {
        transform: perspective(1000px) scale(1) translateZ(15px);
        box-shadow: 
            inset 0 1px 2px rgba(255, 255, 255, 0.7),
            inset 0 -1px 2px rgba(0, 0, 0, 0.1),
            0 2px 5px rgba(0, 0, 0, 0.15),
            0 5px 15px rgba(0, 0, 0, 0.2),
            0 10px 30px rgba(0, 0, 0, 0.25),
            0 20px 50px rgba(0, 0, 0, 0.15);
    }
}

.card.flipping {
    animation: flip 0.6s ease-in-out;
}

.card.moving {
    animation: move 0.5s ease-in-out;
    z-index: 100;
    position: absolute;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* 移动端横屏模式通用优化 */
@media (max-height: 450px) and (orientation: landscape) {
    /* 调整游戏容器布局 */
    .game-container {
        gap: 1px;
        padding: 1px;
    }
    
    /* 调整三栏布局 */
    .game-layout {
        gap: 1px;
        height: calc(100vh - 50px);
        display: flex;
    }
    
    /* 左侧栏调整 */
    .left-sidebar {
        width: 140px;
        padding: 1px;
        flex-shrink: 0;
    }

    .card .power-blessing {
        font-size: 0.8em;
    }

    .card .assimilate-blessing {
        font-size: 0.8em;
    }

    .card.back {
        /*background-color: #3498db;*/
        /*background-image: linear-gradient(45deg, #2980b9 25%, transparent 25%, transparent 75%, #2980b9 75%, #2980b9),*/
        /*linear-gradient(45deg, #2980b9 25%, transparent 25%, transparent 75%, #2980b9 75%, #2980b9);*/
        background-size: 1em 1em;
        background-position: 0 0, 5px 5px;
        color: transparent;
    }
    
    /* 中间棋盘区域调整 */
    .main-content {
        flex: 1;
        padding: 1px;
        min-width: 0;
    }
    
    /* 右侧栏调整 */
    .right-sidebar {
        width: 140px;
        padding: 1px;
        flex-shrink: 0;
    }
    
    /* 游戏标题调整 */
    h1 {
        font-size: 0.8em;
        transform: translateY(1px);
        margin-bottom: 1px;
    }

    .system-settings-btn {
        width: 0.2em;
        height: 0.2em;
    }

    /* 棋盘调整 */
    .board {
        grid-template-columns: repeat(8, 29px);
        grid-template-rows: repeat(7, 45px);
        gap: 1px;
        padding: 2px;
        /* 调整3D透视效果 */
        transform: perspective(400px) rotateX(1deg) translateZ(0);
    }
    
    .cell {
        width: 29px;
        height: 45px;
    }
    
    /* 卡牌调整 */
    .card {
        font-size: 8px;
        /* 调整3D效果 */
        transform: translateZ(1px);
        padding: 1px;
        border-radius: 1px;
    }
    
    .card .rank {
        font-size: 10px;
    }
    
    .card .suit {
        font-size: 20px;
    }
    
    /* 游戏信息调整 */
    .game-info {
        flex-direction: column;
        gap: 1px;
        padding: 0.3em;
        margin-bottom: 0;
    }
    
    .player-info, .player2-info, .ai-info, .turn-info, .zone-info, .blind-box-info {
        padding: 1px 2px;
        min-width: 100%;
        max-width: 100%;
    }
    
    /* 玩家信息标题调整 */
    .player-info h2, .player2-info h2, .ai-info h2, .turn-info h2, .zone-info h2, .blind-box-info h2 {
        font-size: 0.8em;
        margin-bottom: 0.2em;
    }
    
    /* 颜色指示器和总战力显示容器 */
    .player-info .color-container,
    .player2-info .color-container {
        /*flex-direction: column;*/
        gap: 1px;
        margin-top: 0.5px;
    }
    
    /* 颜色指示器调整 */
    .color-indicator {
        width: 100%;
        height: 18px;
        font-size: 0.6em;
    }
    
    /* 总战力显示调整 */
    .total-power-indicator {
        height: 18px;
        font-size: 0.6em;
    }
    
    /* 当前回合调整 */
    #current-turn {
        font-size: 0.5em;
        padding: 1px 2px;
        width: 100%;
    }
    
    /* 旋转控制按钮调整 */
    .rotation-controls {
        top: -1px;
        right: 0;
        gap: 0.5px;
    }
    
    .reset-rotation-btn, .toggle-horizontal-btn, .toggle-top-view-btn {
        padding: 1px 2px;
        font-size: 6px;
        width: 110%;
    }
    
    /* 折叠/展开按钮调整 */
    .sidebar-toggle-btn {
        width: 12px;
        height: 12px;
        font-size: 1em;
        top: 1px;
        left: 1px;
    }
    
    /* 游戏模式选择调整 */
    .game-mode-selection {
        margin-bottom: 1px;
        padding: 1px;
    }
    
    .game-mode-selection h3 {
        font-size: 0.6em;
        margin-bottom: 1px;
    }
    
    .mode-type-buttons {
        margin-bottom: 1px;
        padding: 1px;
    }
    
    .mode-type-buttons h4 {
        font-size: 0.8em;
        margin-bottom: 0.5px;
    }
    
    .mode-buttons {
        gap: 0.1em;
    }

    #ai-difficulty-selection .mode-buttons {
        gap: 0.1em;
    }

    #ai-difficulty-selection .mode-btn {
        flex: 1;
        min-width: 120px;
        max-width: none;
    }
    
    .mode-btn {
        padding: 1px 2px;
        font-size: 0.5em;
        max-width: 50%;
        margin-bottom: 1em;
        min-width: 110px;
    }
    
    /* 游戏选项调整 */
    .game-options {
        margin: 1px 0;
        padding: 1px;
    }
    
    .game-options h4 {
        font-size: 0.8em;
        margin-bottom: 1px;
    }
    
    .option-toggle {
        padding: 1px 2px;
        margin-bottom: 0.5px;
    }
    
    .option-toggle label {
        font-size: 0.4em;
    }
    
    .toggle-switch-container {
        width: 24px;
        height: 12px;
    }
    
    .toggle-switch:checked + .toggle-slider:before {
        transform: translateX(13px);
    }
    
    .toggle-slider:before {
        height: 8px;
        width: 8px;
        left: 2px;
        bottom: 2px;
    }
    
    /* 新功能标志调整 */
    .new-feature {
        font-size: 0.2em;
        padding: 0.25px 1px;
        margin-left: 1px;
    }
    
    /* 游戏规则调整 */
    .game-rules {
        padding: 1px;
        font-size: 0.1em;
        max-height: 100px;
        margin-top: 1px;
    }
    
    .game-rules h3 {
        font-size: 0.5em;
        margin-bottom: 0.5px;
    }
    
    .game-rules li {
        margin-bottom: 0.5px;
        padding-left: 4px;
        line-height: 1;
    }
    
    /* 控制器调整 */
    .controls {
        flex-direction: row;
        gap: 2px;
        margin-bottom: 2px;
        justify-content: center;
        align-items: center;
    }
    
    button {
        width: 45%;
        padding: 3px 6px;
        font-size: 0.6em;
        min-height: 20px;
        white-space: nowrap;
        text-align: center;
    }
    
    /* 音效按钮特殊调整 */
    .audio-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1px;
    }
    
    #audio-icon {
        font-size: 0.8em;
    }
    
    /* 状态消息调整 */
    .status-message {
        padding: 2px 2px;
        font-size: 0.2em;
    }
    
    /* 调整游戏结束弹窗 */
    .game-over-modal .modal-content {
        padding: 10px;
        max-width: 95vw;
        max-height: 95vh;
        min-width: unset;
    }
    
    .game-over-modal .modal-content h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
    }
    
    .game-over-modal .modal-content p {
        font-size: 0.8em;
        margin-bottom: 10px;
    }
    
    /* 调整统计表格 */
    .stats-table {
        font-size: 10px;
    }
    
    .stats-table th, .stats-table td {
        padding: 4px 6px;
        min-width: 60px;
    }
    
    /* 调整盲盒效果模态框 */
    .blind-box-effect-modal .modal-content {
        padding: 10px;
        max-width: 80vw;
        max-height: 80vh;
    }
    
    .blind-box-effect-title {
        font-size: 1.0em;
        margin-bottom: 10px;
    }
    
    .blind-box-effect-message {
        font-size: 0.3em;
        margin-bottom: 2px;
    }
    
    /* 调整游戏玩法亮点提示模态框 */
    #game-highlights-modal .modal-content {
        padding: 4px;
        max-width: 50vw;
        max-height: 50vh;
    }
    
    #game-highlights-modal .blind-box-effect-title {
        font-size: 0.4em;
        margin-bottom: 2px;
    }
    
    #game-highlights-modal .blind-box-effect-message {
        font-size: 0.5em;
        line-height: 1;
        margin-bottom: 2px;
    }
    
    #game-highlights-modal .modal-btn {
        padding: 2px 4px;
        font-size: 0.5em;
    }
    
    /* 调整模态框按钮 */
    .modal-btn {
        padding: 2px 4px;
        font-size: 0.5em;
        margin: 0.5px;
    }
    
    /* 调整自定义悬浮提示 */
    .custom-tooltip {
        font-size: 0.4em;
        padding: 1px 2px;
        border-radius: 1px;
    }
    
    /* 缩限倒计时和剩余盲盒样式 */
    .zone-info, .blind-box-info {
        padding: 0.5px 1px;
    }
    
    #zone-countdown {
        font-size: 0.7em;
        padding: 0.5px 1px;
    }
    
    #blind-box-count {
        font-size: 0.7em;
        padding: 0.5px 1px;
    }
    
    /* AI难度选择调整 */
    #ai-difficulty-selection {
        margin-top: 1px;
    }
    
    /* 游戏状态提示调整 */
    .game-status {
        margin-bottom: 0.5px;
    }
    
    /* 神力效果显示调整 */
    .card .power {
        font-size: 20px;
    }
    
    /* 效果标记调整 */
    .card .effect-marker {
        font-size: 0.8em;
        padding: 0.5px 1px;
        top: 1px;
        right: 1px;
    }
    .stars {
        font-size: 10px;
        color: #ffd700;
        margin-bottom: 2px;
    }

}

/* 游戏结束弹窗样式 */
.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.game-over-modal.show {
    opacity: 1;
    pointer-events: all;
}

.game-over-modal .modal-content {
    background-color: #34495e;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.3);
    transform: scale(0.5);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
    border: 3px solid gold;
    max-width: 90vw;
    width: auto;
    max-height: 90vh;
    overflow-y: auto;
    min-width: 600px;
}

.game-over-modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.game-over-modal .modal-content h2 {
    color: gold;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.5);
}

/* 淡出动画 */
.game-over-modal.fade-out {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.game-over-modal.fade-out .modal-content {
    transform: scale(0.8);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}

/* 保留盲盒效果模态框样式 */
.blind-box-effect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.blind-box-effect-modal.show {
    opacity: 1;
    pointer-events: all;
}

.blind-box-effect-modal .modal-content {
    background-color: #34495e;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.3);
    transform: scale(0.5);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
    border: 3px solid gold;
    max-width: 500px;
    width: 90%;
}

.blind-box-effect-modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.blind-box-effect-title {
    color: gold;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(255, 215, 0, 0.5);
    animation: titlePulse 2s infinite;
}

.blind-box-effect-message {
    color: white;
    font-size: 1.5em;
    font-weight: bold;
    line-height: 1.5;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

/* 自定义滚动条样式 */
.blind-box-effect-message::-webkit-scrollbar {
    width: 8px;
}

.blind-box-effect-message::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.blind-box-effect-message::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.6);
    border-radius: 10px;
}

.blind-box-effect-message::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.8);
}

/* 淡出动画 */
.blind-box-effect-modal.fade-out {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.blind-box-effect-modal.fade-out .modal-content {
    transform: scale(0.8);
    opacity: 0;
    transition: transform 1s ease-in-out, opacity 1s ease-in-out;
}

@keyframes titlePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes gameOverFade {
    from {
        opacity: 1;
    }
    to {
        opacity: 0.5;
    }
}

.game-over-board {
    animation: gameOverFade 1s ease-in-out forwards;
}

@keyframes celebrate {
    0% {
        transform: perspective(800px) translateY(0) rotateX(0deg) rotateY(0deg) translateZ(10px);
    }
    25% {
        transform: perspective(800px) translateY(-15px) rotateX(5deg) rotateY(5deg) translateZ(20px);
    }
    50% {
        transform: perspective(800px) translateY(0) rotateX(0deg) rotateY(0deg) translateZ(10px);
    }
    75% {
        transform: perspective(800px) translateY(-15px) rotateX(-5deg) rotateY(-5deg) translateZ(20px);
    }
    100% {
        transform: perspective(800px) translateY(0) rotateX(0deg) rotateY(0deg) translateZ(10px);
    }
}

/* 自定义悬浮提示样式 */
.custom-tooltip {
    background-color: rgba(52, 73, 94, 0.95);
    color: #ecf0f1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3),
                0 8px 25px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border: 2px solid #3498db;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    min-width: 100px;
    text-align: center;
    opacity: 0.95;
}

.game-over .card.celebrating {
    animation: celebrate 1s ease-in-out infinite;
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
    z-index: 5;
}

/* 游戏统计数据样式 */
.game-stats-container {
    margin-top: 30px;
    text-align: left;
    color: #ecf0f1;
}

.game-stats-container h3 {
    color: #ecf0f1;
    margin-bottom: 20px;
    font-size: 22px;
    text-align: center;
}

/* 玩家评分样式 */
.both-players-rating {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
    text-align: center;
}

.player-rating-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.player-label {
    color: #ecf0f1;
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: bold;
}

.stars {
    font-size: 30px;
    color: #ffd700;
    margin-bottom: 5px;
}

/* 视图切换按钮样式 */
.stats-view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.stats-view-toggle button {
    padding: 8px 16px;
    font-size: 14px;
    background-color: #2c3e50;
    color: #ecf0f1;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-view-toggle button.active {
    background-color: #3498db;
    color: white;
}

.stats-view-toggle button:hover {
    background-color: #34495e;
}

.stats-view-toggle button.active:hover {
    background-color: #2980b9;
}

/* 统计视图样式 */
.stats-view {
    display: none;
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
}

.stats-view.active {
    display: block;
}

/* 统计表格样式 */

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 12px;
    background-color: #2c3e50;
    border-radius: 5px;
    overflow: hidden;
    max-width: 100%;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    table-layout: fixed;
}

.stats-table th, .stats-table td {
    padding: 8px 10px;
    text-align: center;
    border: 1px solid #34495e;
    color: #ecf0f1;
    vertical-align: middle;
    min-width: 80px;
}

.stats-table th {
    background-color: #34495e;
    color: #ecf0f1;
    font-weight: bold;
    max-width: 100px;
    word-wrap: break-word;
    white-space: normal;
    text-overflow: clip;
    height: auto;
    line-height: 1.2;
}

.stats-table tr:nth-child(even) {
    background-color: #34495e;
}

.stats-table tr:hover {
    background-color: #3a536b;
}

/* 图表容器样式 */
.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #2c3e50;
    border-radius: 5px;
    width: 100%;
    min-height: 350px;
}

#stats-chart {
    max-width: 100%;
    height: auto;
    background-color: white;
    border-radius: 5px;
    padding: 10px;
}

/* 性能优化：确保只有可见元素参与3D变换 */
.card {
    /* 继续使用硬件加速 */
    transform: translateZ(10px);
    /* 确保只在需要时进行3D变换 */
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform, box-shadow;
    /* 减少重排范围 */
    position: relative;
}

/* 阵法效果模态框样式 - 只修改颜色相关属性 */
.formation-effect-modal .modal-content {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 30px rgba(69, 183, 209, 0.3) !important;
    border-color: #45b7d1 !important;
}

.formation-effect-title {
    color: #45b7d1 !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(69, 183, 209, 0.5) !important;
}

/* 性能优化：简化悬停效果 */
.cell:hover .card {
    transform: translateZ(20px);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 10px 25px rgba(0, 0, 0, 0.3),
        0 15px 35px rgba(243, 156, 18, 0.2);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 性能优化：增强选中效果 */
.cell.selected .card {
    transform: translateZ(25px);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.7),
        inset 0 -1px 2px rgba(0, 0, 0, 0.1),
        0 12px 30px rgba(0, 0, 0, 0.35),
        0 18px 40px rgba(243, 156, 18, 0.25);
    z-index: 20;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 慢动作效果：将所有动画速度减慢到0.5倍 */
.slow-motion * {
    animation-duration: 2s !important;
    transition-duration: 1s !important;
    transform: scale(1) !important;
}

/* 针对特定动画的慢动作调整 */
.slow-motion .card.flip {
    animation-duration: 1.2s !important;
}

.slow-motion .card.moving {
    animation-duration: 1s !important;
}

.slow-motion .card.eaten {
    animation-duration: 1s !important;
}

.slow-motion .card.eating {
    animation-duration: 1s !important;
}

/* 确保过渡效果也减慢 */
.slow-motion .card {
    transition-duration: 1s !important;
}

.slow-motion .cell {
    transition-duration: 1s !important;
}

.slow-motion .status-message {
    transition-duration: 0.6s !important;
}

.modal-content p {
    color: #bdc3c7;
    margin-bottom: 30px;
    font-size: 1.2em;
}

.modal-btn, .audio-btn {
    /*padding: 12px 24px;*/
    /*font-size: 16px;*/
    font-weight: bold;
    color: white;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.audio-btn {
    background-color: #27ae60;
}

.audio-btn:hover {
    background-color: #229954;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.audio-btn.muted {
    background-color: #95a5a6;
}

.audio-btn.muted:hover {
    background-color: #7f8c8d;
}

.modal-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

.modal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}