* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #eee;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    font-size: 2.5rem;
    color: #d4af37;
    text-align: center;
    letter-spacing: 8px;
}

.game-info {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 8px;
    min-width: 300px;
}

.turn-indicator {
    font-size: 1.2rem;
    font-weight: bold;
}

.turn-indicator.red { color: #ff4444; }
.turn-indicator.black { color: #888; }

.board-container {
    position: relative;
    width: 520px;
    height: 580px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#board {
    display: block;
    width: 520px;
    height: 580px;
}

.pieces-layer, .selection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 520px;
    height: 580px;
    pointer-events: none;
}

.piece {
    position: absolute;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid;
    transition: transform 0.2s;
}

.piece.red {
    background: radial-gradient(circle at 30% 30%, #ff6b6b, #cc0000);
    color: #ffeb3b;
    border-color: #ff4444;
}

.piece.black {
    background: radial-gradient(circle at 30% 30%, #666, #000);
    color: #fff;
    border-color: #444;
}

.piece:hover { transform: scale(1.1); }
.piece.selected {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.move-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(0, 255, 0, 0.4);
    border: 2px solid #0f0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 50;
}

.move-indicator:hover {
    background: rgba(0, 255, 0, 0.6);
    transform: translate(-50%, -50%) scale(1.2);
}

.check-warning {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 3px solid #ff0000;
    border-radius: 50%;
    animation: checkPulse 0.5s ease infinite;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@keyframes checkPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.controls {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    background: #d4af37;
    color: #1a1a2e;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #eee;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-over-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
}

.game-over-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #d4af37;
}

.modal-content h2 {
    color: #d4af37;
    margin-bottom: 20px;
}

.winner-red { color: #ff4444; }
.winner-black { color: #888; }