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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    max-width: 700px;
    width: 100%;
}

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

.game-header h1 {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.score-board {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.player-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.score {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
}

.label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.turn-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.current-turn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.current-turn span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #667eea;
}

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

.board {
    display: grid;
    grid-template-columns: repeat(8, 60px);
    grid-template-rows: repeat(8, 60px);
    gap: 2px;
    background: #2d5016;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.1);
    border: 3px solid #1a3009;
    width: fit-content;
}

.cell {
    width: 60px;
    height: 60px;
    background: #4a7c23;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.1),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 1px solid #2d5016;
}

.cell:hover {
    background: #5a8c33;
    transform: translateY(-1px);
    box-shadow: 
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.1),
        0 4px 8px rgba(0, 0, 0, 0.2);
}

.cell.valid-move {
    background: #7dad44;
    animation: glow 1.5s infinite alternate;
}

@keyframes glow {
    from { box-shadow: inset 0 0 10px rgba(255, 255, 0, 0.3); }
    to { box-shadow: inset 0 0 20px rgba(255, 255, 0, 0.6); }
}

.cell.valid-move::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    animation: hint-pulse 1s infinite;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.piece {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.piece::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 8px;
    width: 12px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    filter: blur(2px);
}

.piece.black {
    background: radial-gradient(circle at 30% 30%, #4a4a4a, #000000);
    border: 2px solid #333;
}

.piece.white {
    background: radial-gradient(circle at 30% 30%, #ffffff, #e0e0e0);
    border: 2px solid #ccc;
}

.piece.placing {
    animation: place 0.5s ease-out;
}

@keyframes place {
    0% { transform: scale(0) rotateY(180deg); opacity: 0; }
    50% { transform: scale(1.2) rotateY(90deg); }
    100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.piece.flipping {
    animation: flip 0.8s ease-in-out;
}

@keyframes flip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg) scale(1.1); }
    100% { transform: rotateY(180deg); }
}

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

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.btn.primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn.secondary {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    color: white;
}

.game-status {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    padding: 15px;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: modalSlide 0.3s ease-out forwards;
}

@keyframes modalSlide {
    to { transform: scale(1); }
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #666;
}

@media (max-width: 600px) {
    .game-container {
        padding: 20px;
        margin: 10px;
    }
    
    .cell {
        width: 40px;
        height: 40px;
    }
    
    .piece {
        width: 32px;
        height: 32px;
    }
    
    .score-board {
        flex-direction: column;
        gap: 15px;
    }
}