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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

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

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px 20px;
    background: #f5f5f5;
    border-radius: 10px;
}

.current-player {
    font-size: 1.2em;
    font-weight: bold;
}

.current-player span {
    padding: 5px 10px;
    border-radius: 5px;
    background: #fff;
}

.score {
    display: flex;
    gap: 20px;
    font-size: 1.1em;
}

.score span {
    padding: 5px 10px;
    background: #fff;
    border-radius: 5px;
}

#gameBoard {
    border: 2px solid #333;
    border-radius: 10px;
    cursor: pointer;
    background: #deb887;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

#gameBoard:hover {
    transform: scale(1.02);
}

.controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

button {
    padding: 12px 30px;
    font-size: 1.1em;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#restartBtn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#restartBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#undoBtn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

#undoBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

button:active {
    transform: translateY(0);
}

.winner-message {
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
    min-height: 40px;
    animation: pulse 1s infinite;
}

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

/* 响应式设计 */
@media (max-width: 700px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    #gameBoard {
        width: 350px;
        height: 350px;
    }

    h1 {
        font-size: 1.8em;
    }

    .game-info {
        flex-direction: column;
        gap: 10px;
    }
}
