/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #2d5016;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* 设置页面样式 */
#setup-page {
    text-align: center;
    background: #f5f5dc;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#setup-page h1 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.setup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* 新的设置卡片样式 */
.setup-card {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    border-radius: 15px;
    background: #f0e6d2;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #d4c8a9;
}

.setup-card h2 {
    color: #3e2723;
    margin-bottom: 15px;
    font-size: 2.8em;
    font-weight: bold;
}

.setup-description {
    color: #5d4037;
    margin-bottom: 10px;
    font-size: 16px;
}

.ket-info {
    color: #5d4037;
    font-weight: bold;
    margin: 15px 0 25px;
    font-size: 16px;
}

/* 操作按钮区域 */
.setup-actions {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center; /* 居中显示子元素 */
}

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* 确保下载和上传按钮大小一致 */
    min-width: 200px;
    width: 200px; /* 固定宽度确保一致性 */
    min-height: 50px;
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.download-btn {
    background: linear-gradient(45deg, #8bc34a, #689f38);
    color: white;
}

.upload-btn {
    background: linear-gradient(45deg, #1565c0, #0d47a1);
    color: white;
}

.button-icon {
    font-size: 20px;
}

.file-type-info {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

#word-file {
    display: none;
}

.upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.file-name-display {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
    min-height: 20px;
    font-style: italic;
}

.start-button {
    background: linear-gradient(45deg, #ef6c00, #e65100);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.start-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 移除旧的样式 */
.setup-sections,
.template-section,
.upload-section {
    display: none;
}

/* 现代提示框样式 */
.modern-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-out;
}

.modern-modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modern-modal-content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.modern-modal-header {
    background: linear-gradient(45deg, #8bc34a, #689f38);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.modern-modal-close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.modern-modal-close:hover {
    transform: scale(1.2);
}

.modern-modal-body {
    padding: 30px;
    text-align: center;
}

.modern-modal-body p {
    margin: 0;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.modern-modal-footer {
    padding: 20px;
    display: flex;
    justify-content: center; /* 居中显示按钮 */
    gap: 15px;
    background-color: #f5f5f5;
}

.modern-modal-btn {
    padding: 12px 42px; /* 增加按钮宽度20px */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.cancel-btn {
    background: #999;
    color: white;
}

.cancel-btn:hover {
    background: #777;
    transform: translateY(-2px);
}

.confirm-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        transform: translateY(-50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* 庆祝动画样式 */
@keyframes celebration {
    0% { 
        background: linear-gradient(45deg, #2196F3, #1976D2);
    }
    25% { 
        background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    }
    50% { 
        background: linear-gradient(45deg, #4ECDC4, #44A08D);
    }
    75% { 
        background: linear-gradient(45deg, #FFD93D, #FF6B6B);
    }
    100% { 
        background: linear-gradient(45deg, #2196F3, #1976D2);
    }
}

.celebration-header {
    animation: celebration 2s ease-in-out infinite;
}

/* 小偷胜利动画样式 */
@keyframes thief-celebration-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.thief-celebration {
    position: fixed;
    z-index: 3000;
    pointer-events: none;
    animation: thief-celebration-fall 1.5s linear infinite;
}

/* 漫天喝彩动画 - 彩带效果 */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 3000;
    pointer-events: none;
}

.confetti:nth-child(odd) {
    background: linear-gradient(45deg, #FF6B6B, #FF8E53);
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(even) {
    background: linear-gradient(45deg, #4ECDC4, #44A08D);
    animation: confetti-fall 3.5s linear infinite;
}

.confetti:nth-child(3n) {
    background: linear-gradient(45deg, #FFD93D, #FF6B6B);
    animation: confetti-fall 2.5s linear infinite;
}

.confetti:nth-child(4n) {
    background: linear-gradient(45deg, #A8E6CF, #7FCDCD);
    animation: confetti-fall 4s linear infinite;
}

.confetti:nth-child(5n) {
    background: linear-gradient(45deg, #FFB6C1, #FFA07A);
    animation: confetti-fall 3.2s linear infinite;
}

/* 渐变动画 */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 烟花动画样式 */
@keyframes fireworks-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.firework {
    position: fixed;
    font-size: 30px; /* 冰淇淋图标大小 */
    z-index: 3000;
    pointer-events: none;
    /* 移除所有阴影效果 */
    color: #FF0000; /* 红色 */
    text-shadow: none; /* 移除阴影 */
}

.firework:nth-child(odd) {
    content: "🍦"; /* 冰淇淋图标 */
    animation: fireworks-fall 1s linear infinite; /* 加快动画速度 */
}

.firework:nth-child(even) {
    content: "🍨"; /* 圣代冰淇淋图标 */
    animation: fireworks-fall 1.2s linear infinite;
}

.firework:nth-child(3n) {
    content: "🍧"; /* 刨冰图标 */
    animation: fireworks-fall 0.8s linear infinite;
}

.firework:nth-child(4n) {
    content: "🍩"; /* 甜甜圈图标 */
    animation: fireworks-fall 1.5s linear infinite;
}

.firework:nth-child(5n) {
    content: "🍭"; /* 棒棒糖图标 */
    animation: fireworks-fall 0.9s linear infinite;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

#challenge-word {
    font-size: 16px;
    font-weight: normal;
    margin: 20px 0;
    color: #333;
    line-height: 1.5;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    flex: 1;
}

#challenge-success {
    background: #4CAF50;
    color: white;
}

#challenge-fail {
    background: #F44336;
    color: white;
}

.modal-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 游戏页面样式 */
#game-page {
    background: #f5f5dc;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.game-header {
    display: flex;
    justify-content: flex-end; /* 改为靠右显示 */
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}

.game-header h1 {
    color: #333;
    margin: 0;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

.sound-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.sound-btn:hover {
    background: #45a049;
}

.sound-btn.muted {
    background: #f44336;
}

#bgm-toggle {
    background: #2196F3;
}

#bgm-toggle:hover {
    background: #1976D2;
}

#bgm-toggle.paused {
    background: #FF9800;
}

#fullscreen-btn, #back-to-setup {
    background: #999;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#fullscreen-btn:hover, #back-to-setup:hover {
    background: #777;
}

#fullscreen-btn.fullscreen-active {
    background: #4CAF50;
}

.game-container {
    display: flex;
    gap: 20px;
}

/* 棋盘样式 */
.game-board-container {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 66.67%; /* 占屏幕三分之二 */
    position: relative;
}

.victory-condition {
    margin-top: 20px;
    text-align: center;
}

.victory-condition p {
    color: #3e2723;
    font-size: 1.2em;
    font-weight: bold;
    background: rgba(245, 245, 220, 0.9);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

.xiaohongshu-info {
    margin-top: 10px;
}

.xiaohongshu-info p {
    color: #5d4037;
    font-size: 1em;
    font-weight: bold;
    background: rgba(245, 245, 220, 0.9);
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: inline-block;
    margin: 5px 0;
}

.xiaohongshu-info p:first-child {
    color: #3e2723;
}

.board-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #e8f5e9; /* 淡雅的灰绿色 */
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 700px;
    border: 4px solid rgba(255, 255, 255, 0.7); /* 更亮的白色透明边框 */
    position: relative;
}

.board-top, .board-bottom {
    display: flex;
    gap: 4px;
    justify-content: center;
    align-items: center;
    height: 90px;
}

.board-middle {
    display: flex;
    gap: 4px;
    justify-content: space-between;
    align-items: stretch;
    min-height: 270px;
    margin: 4px 0;
}

.board-left, .board-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
    align-items: center;
    width: 90px;
}

.board-center {
    flex: 1;
    background: #e8f5e9; /* 淡雅的灰绿色，与棋盘背景一致 */
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 10px;
    box-shadow: none; /* 移除阴影效果 */
    border: 3px solid rgba(255, 255, 255, 0.7); /* 更亮的白色透明边框 */
    position: relative;
    overflow: hidden;
}

.board-center h2 {
    font-size: 2.4em;
    color: #2e7d32; /* 淡雅的深绿色文字 */
    text-shadow: none; /* 移除文字阴影 */
    font-weight: bold;
    letter-spacing: 3px;
    z-index: 1;
}

.board-cell {
    width: 90px;
    height: 90px;
    background: #c8e6c9; /* 淡雅的绿灰色 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 14px; /* 字体大小调整为14px */
    font-weight: bold;
    text-align: center;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: visible;
    color: #2e7d32; /* 淡雅的深绿色文字，提高可读性 */
    text-shadow: none; /* 移除文字阴影 */
    border: 3px solid rgba(255, 255, 255, 0.7); /* 更亮的白色透明边框 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    text-overflow: ellipsis;
    padding: 6px;
    box-sizing: border-box;
}

.player-icon {
    position: absolute;
    top: -16px;
    right: -16px;
    font-size: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    z-index: 10;
}

.right-panel-police, .right-panel-thief {
    font-size: 48px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #fff;
    z-index: 100;
}

.board-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.police-start {
    background: linear-gradient(45deg, #ef6c00, #e65100) !important;
    color: white;
}

.thief-start {
    background: linear-gradient(45deg, #1565c0, #0d47a1) !important;
    color: white;
}

.police-position {
    background: #ef6c00 !important;
    color: white;
    font-weight: bold;
}

.thief-position {
    background: #1565c0 !important;
    color: white;
    font-weight: bold;
}

/* 控制面板样式 */
.game-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 300px; /* 限制控制面板宽度 */
}

.dice-section {
    text-align: center;
    padding: 20px;
    background: #e8f5e9;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.dice-section h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.dice {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 1s;
}

.dice-face {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border: 2px solid #333;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.dice-face-1 { transform: translateZ(50px); }
.dice-face-2 { transform: rotateX(180deg) translateZ(50px); }
.dice-face-3 { transform: rotateY(90deg) translateZ(50px); }
.dice-face-4 { transform: rotateY(-90deg) translateZ(50px); }
.dice-face-5 { transform: rotateX(90deg) translateZ(50px); }
.dice-face-6 { transform: rotateX(-90deg) translateZ(50px); }

/* 骰子点数样式 */
.dice-dot {
    width: 15px;
    height: 15px;
    background-color: #e74c3c;
    border-radius: 50%;
    position: absolute;
}

/* 骰子1 */
.dice-face-1 .dice-dot:nth-child(1) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 骰子2 */
.dice-face-2 .dice-dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-2 .dice-dot:nth-child(2) {
    bottom: 25%;
    right: 25%;
}

/* 骰子3 */
.dice-face-3 .dice-dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-3 .dice-dot:nth-child(2) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.dice-face-3 .dice-dot:nth-child(3) {
    bottom: 25%;
    right: 25%;
}

/* 骰子4 */
.dice-face-4 .dice-dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-4 .dice-dot:nth-child(2) {
    top: 25%;
    right: 25%;
}
.dice-face-4 .dice-dot:nth-child(3) {
    bottom: 25%;
    left: 25%;
}
.dice-face-4 .dice-dot:nth-child(4) {
    bottom: 25%;
    right: 25%;
}

/* 骰子5 */
.dice-face-5 .dice-dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-5 .dice-dot:nth-child(2) {
    top: 25%;
    right: 25%;
}
.dice-face-5 .dice-dot:nth-child(3) {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.dice-face-5 .dice-dot:nth-child(4) {
    bottom: 25%;
    left: 25%;
}
.dice-face-5 .dice-dot:nth-child(5) {
    bottom: 25%;
    right: 25%;
}

/* 骰子6 */
.dice-face-6 .dice-dot:nth-child(1) {
    top: 25%;
    left: 25%;
}
.dice-face-6 .dice-dot:nth-child(2) {
    top: 25%;
    right: 25%;
}
.dice-face-6 .dice-dot:nth-child(3) {
    top: 50%;
    left: 25%;
    transform: translateY(-50%);
}
.dice-face-6 .dice-dot:nth-child(4) {
    top: 50%;
    right: 25%;
    transform: translateY(-50%);
}
.dice-face-6 .dice-dot:nth-child(5) {
    bottom: 25%;
    left: 25%;
}
.dice-face-6 .dice-dot:nth-child(6) {
    bottom: 25%;
    right: 25%;
}

/* 骰子滚动动画 */
@keyframes rolling {
    0% { transform: rotateX(0) rotateY(0) rotateZ(0); }
    100% { transform: rotateX(720deg) rotateY(1080deg) rotateZ(360deg); }
}

.rolling {
    animation: rolling 1s ease-out;
}

#roll-dice {
    background: linear-gradient(45deg, #ef6c00, #e65100);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#roll-dice:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#roll-dice:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 骰子点数显示样式 */
.dice-result {
    margin-top: 15px;
    padding: 10px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    border-radius: 8px;
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#dice-number {
    font-size: 20px;
    font-weight: bold;
    color: #FFD700;
}

/* 追捕信息样式 */
.chase-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.police-chase, .thief-escape {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.police-chase {
    background: linear-gradient(45deg, #ef6c00, #e65100);
}

.thief-escape {
    background: linear-gradient(45deg, #1565c0, #0d47a1);
}

.police-chase h3, .thief-escape h3 {
    margin-bottom: 10px;
    color: white;
}

.steps-display {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

/* 全屏模式样式 */
:fullscreen .page.active,
:-webkit-full-screen .page.active,
:-moz-full-screen .page.active,
:-ms-fullscreen .page.active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
}

:fullscreen body,
:-webkit-full-screen body,
:-moz-full-screen body,
:-ms-fullscreen body {
    padding: 0;
    height: 100vh;
}

:fullscreen .container,
:-webkit-full-screen .container,
:-moz-full-screen .container,
:-ms-fullscreen .container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 5px;
        font-size: 14px;
    }
    
    .container {
        height: calc(100vh - 10px);
        overflow-x: hidden;
    }
    
    #setup-page {
        padding: 15px;
    }
    
    .setup-card {
        padding: 15px;
        margin: 10px 0;
    }
    
    .game-container {
        flex-direction: column;
        height: auto;
        gap: 15px;
        padding: 10px;
    }
    
    .game-board-container {
        width: 100%;
        order: 1;
    }
    
    .board-wrapper {
        background: #e8f5e9; /* 淡雅的灰绿色 */
        border: 3px solid rgba(255, 255, 255, 0.7); /* 更亮的白色透明边框 */
    }
    
    .board-center {
        background: #e8f5e9; /* 淡雅的灰绿色 */
        border: 2px solid rgba(255, 255, 255, 0.7); /* 更亮的白色透明边框 */
    }
    
    .board-cell {
        border: 2px solid rgba(255, 255, 255, 0.7); /* 更亮的白色透明边框 */
        background: #c8e6c9; /* 淡雅的绿灰色 */
        color: #2e7d32; /* 淡雅的深绿色文字 */
        font-size: 14px; /* 移动端字体大小调整为14px */
    }
    
    .game-controls {
        max-width: none;
        flex-direction: column;
        gap: 15px;
        order: 2;
        width: 100%;
    }
    
    .dice-section, .chase-info {
        flex: none;
        min-width: auto;
        width: 100%;
        padding: 15px;
        margin: 0;
    }
    
    .dice-section h3, .chase-info h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }
    
    .dice-container {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dice {
        min-width: 50px;
        min-height: 50px;
        font-size: 1.2em;
    }
    
    .roll-button {
        padding: 12px 20px;
        font-size: 1em;
        min-height: 44px; /* 触摸友好的最小高度 */
    }
    
    .arrow-left, .arrow-right {
        font-size: 20px;
        width: 30px;
        height: 30px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .board-cell {
        width: 50px;
        height: 50px;
        font-size: 10px;
        padding: 4px;
        min-width: 44px; /* 触摸友好的最小尺寸 */
        min-height: 44px;
        border-radius: 12px;
    }
    
    .board-top, .board-bottom {
        height: 60px;
        gap: 3px;
    }
    
    .board-left, .board-right {
        width: 60px;
        gap: 3px;
    }
    
    .board-middle {
        min-height: 200px;
        gap: 3px;
        margin: 3px 0;
    }
    
    .board-center {
        min-width: 200px;
        min-height: 200px;
        margin: 0 8px;
        border-radius: 15px;
    }
    
    .board-center h2 {
        font-size: 1.3em;
        color: #2e7d32; /* 淡雅的深绿色文字 */
        letter-spacing: 2px;
    }
    
    .player-icon {
        width: 56px;
        height: 56px;
        font-size: 32px;
        top: -12px;
        right: -12px;
    }
    
    /* 在移动端全屏模式下进一步调整 */
    :fullscreen .player-icon,
    :-webkit-full-screen .player-icon,
    :-moz-full-screen .player-icon,
    :-ms-fullscreen .player-icon {
        width: 56px;
        height: 56px;
        font-size: 32px;
        top: -12px;
        right: -12px;
    }
    
    :fullscreen .container,
    :-webkit-full-screen .container,
    :-moz-full-screen .container,
    :-ms-fullscreen .container {
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    :fullscreen body,
    :-webkit-full-screen body,
    :-moz-full-screen body,
    :-ms-fullscreen body {
        height: 100vh;
        padding: 0;
    }
    
    .right-panel-police, .right-panel-thief {
        width: 70px;
        height: 70px;
        font-size: 40px;
    }
    
    .victory-condition p {
        font-size: 1em;
        padding: 8px 15px;
    }
    
    .xiaohongshu-info {
        margin-top: 10px;
    }
    
    .xiaohongshu-info p {
        font-size: 0.9em;
        padding: 6px 12px;
    }
    
    /* 确保模态框在移动端正常显示 */
    .modal-content {
        width: 90%;
        max-width: 400px;
        margin: 10% auto;
        padding: 20px;
    }
    
    .modal h2 {
        font-size: 1.3em;
    }
    
    .modal button {
        padding: 12px 20px;
        font-size: 1em;
        min-height: 44px;
    }
    
    /* 移动端隐藏全屏按钮 */
    #fullscreen-btn {
        display: none;
    }
}
