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

body {
    font-family: 'STSong', 'SimSun', serif;
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    overflow-y: auto;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.game-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.game-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.game-panel {
    background: #f5f0e6;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.turn-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.turn-indicator.turn-black {
    background: #1a1a1a;
}

.turn-indicator.turn-black #turn-text {
    color: #fff;
}

.turn-indicator.turn-white {
    background: #e8e4dc;
    border: 1px solid #ccc;
}

.turn-indicator.turn-white #turn-text {
    color: #333;
}

.turn-stone {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.3s;
}

.turn-stone.black {
    background: radial-gradient(circle at 30% 30%, #444, #000);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.turn-stone.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid #ccc;
}

#turn-text {
    font-size: 1.1rem;
    font-weight: bold;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.accent-line {
    width: 4px;
    height: 14px;
    background: #c0392b;
    border-radius: 2px;
}

.option-group {
    display: flex;
    gap: 8px;
}

.option-btn {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    background: #e8e4dc;
    color: #666;
}

.option-btn.active {
    background: #2c2c2c;
    color: #fff;
    border-color: #2c2c2c;
}

.option-btn:hover:not(.active) {
    background: #dcd8cf;
}

.title {
    font-size: 1.5rem;
    color: #f5f5dc;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.player-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: #333;
}

.stone {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
}

.stone.black {
    background: radial-gradient(circle at 30% 30%, #444, #000);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.stone.white {
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1px solid #ccc;
}

.status {
    font-size: 1rem;
    font-weight: bold;
    color: #c0392b;
    text-align: center;
}

.score {
    font-weight: bold;
    color: #2c2c2c;
}

.captures-info {
    display: flex;
    justify-content: space-around;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    font-size: 0.9rem;
    color: #555;
}

.sound-toggle {
    display: flex;
    justify-content: center;
}

.sound-toggle button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.sound-on {
    background: #4CAF50;
    color: #fff;
}

.sound-off {
    background: #9e9e9e;
    color: #fff;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    background: linear-gradient(135deg, #4a90d9, #2d5aa0);
    color: #fff;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.4);
}

.action-btn:active {
    transform: translateY(0);
}

.board-container {
    background: linear-gradient(135deg, #deb887 0%, #cd853f 100%);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

#go-board {
    display: block;
    cursor: pointer;
}

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

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

.modal-content {
    background: #f5f0e6;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 80%;
}

.modal-content h2 {
    color: #c0392b;
    margin-bottom: 15px;
}

.modal-content p {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
    white-space: pre-line;
}

.modal-content button {
    margin-top: 20px;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    background: #2c2c2c;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-content button:hover {
    background: #444;
}

@media (min-width: 1024px) {
    .game-content {
        flex-direction: row;
        align-items: flex-start;
        justify-content: center;
        gap: 30px;
    }
    
    .board-container {
        flex-shrink: 0;
        flex-grow: 0;
    }
    
    .game-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 320px;
        flex-shrink: 0;
    }
    
    .game-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
        gap: 15px;
    }
}