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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #2d3748;
    padding: 20px;
}

.game-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 1200px;
    width: 100%;
    border: 1px solid #e2e8f0;
}

.game-header {
    margin-bottom: 25px;
}

.game-header h1 {
    color: #8B4513;
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    padding: 18px;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
}

.current-player {
    color: #2d3748;
}

.current-player .black {
    color: #000;
    font-weight: 700;
}

.current-player .white {
    color: #666;
    font-weight: 700;
}

.game-score {
    display: flex;
    gap: 20px;
}

.game-score span {
    color: #4a5568;
}

.game-board-container {
    position: relative;
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

#gameBoard {
    border: 3px solid #8B4513;
    border-radius: 12px;
    background: #DEB887;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

#gameBoard:hover {
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.game-result {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 10;
    min-width: 300px;
}

.game-result.show {
    display: block;
}

.result-content h2 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 2em;
}

.result-content p {
    margin-bottom: 25px;
    font-size: 1.3em;
    color: #4a5568;
    font-weight: 600;
}

.game-controls {
    margin: 25px 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-height: 44px;
    min-width: 120px;
    /* 扁平化按钮设计 - 更大更易点击 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* 扁平化悬停效果 */
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: #8B4513;
    color: white;
}

.btn-primary:hover {
    background: #654321;
}

.btn {
    background: #a0aec0;
    color: white;
}

.btn:hover {
    background: #718096;
}

.btn:disabled {
    background: #CBD5E0;
    color: #A0AEC0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.game-info {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    text-align: left;
}

.rules, .controls-guide {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 4px solid #8B4513;
}

.rules h3, .controls-guide h3 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 1.4em;
    font-weight: 700;
}

.rules ul, .controls-guide ul {
    list-style: none;
    padding: 0;
}

.rules li, .controls-guide li {
    color: #4a5568;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
    line-height: 1.6;
}

.rules li:before, .controls-guide li:before {
    content: "•";
    color: #8B4513;
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .game-container {
        margin: 10px;
        padding: 20px;
    }
    
    .game-header h1 {
        font-size: 2em;
    }
    
    #gameBoard {
        width: 100%;
        max-width: 400px;
        height: auto;
    }
    
    .game-status {
        flex-direction: column;
        gap: 15px;
    }
    
    .game-score {
        justify-content: center;
    }
    
    .game-info {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .btn {
        padding: 16px 32px;
        font-size: 1.1rem;
        min-height: 48px;
        min-width: 140px;
        /* 移动端按钮更大，更易触摸 */
    }
}

@media (max-width: 480px) {
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}