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

:root {
    --primary-color: #2196F3;
    --red-player: #e74c3c;
    --yellow-player: #f1c40f;
    --board-bg: #3498db;
    --slot-bg: #ffffff;
    --border-radius: 8px;
    --slot-size: min(60px, 8vw);
    --board-padding: 20px;
    --disc-animation-duration: 0.5s;
    --win-animation-duration: 1s;
    --bg-color: #ecf0f1;
    --text-color: #333;
    --container-bg: #fff;
}

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    padding: 20px;
    color: var(--text-color);
}

.container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

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

.player-turn {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    padding: 10px;
    background: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.turn-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: background-color 0.3s ease;
}

.turn-indicator.active {
    background-color: rgba(0, 0, 0, 0.1);
}

.scores {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 400px;
    padding: 10px;
    background: var(--container-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.player-score {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
}

.disc {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.disc.red {
    background-color: var(--red-player);
}

.disc.yellow {
    background-color: var(--yellow-player);
}

.player-name {
    font-weight: 500;
}

.board-container {
    background-color: var(--container-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(7, var(--slot-size));
    gap: 4px;
    background: var(--board-bg);
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    width: fit-content;
    margin: 0 auto;
}

.slot {
    width: var(--slot-size);
    height: var(--slot-size);
    background: var(--slot-bg);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.slot:hover {
    background-color: #e3f2fd;
}

.slot.filled {
    transform: scale(1);
}

.slot.preview {
    opacity: 0.5;
    transform: scale(0.9);
}

.slot.winning {
    animation: win-pulse var(--win-animation-duration) ease-in-out infinite;
}

.disc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translateY(-100%);
    transition: transform var(--disc-animation-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

.disc.red {
    background: var(--red-player);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.disc.yellow {
    background: var(--yellow-player);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.disc.dropping {
    transform: translateY(0);
}

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

button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
    min-width: 80px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button:hover {
    background: #1976D2;
}

button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

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

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

@keyframes win-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }
    
    .game-status {
        gap: 10px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
    
    :root {
        --slot-size: min(50px, 12vw);
    }
}

@media (hover: none) {
    .slot.preview {
        display: none;
    }
    
    .board-grid {
        gap: 2px;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #fff;
        --container-bg: #2d2d2d;
    }
    
    .board-grid {
        background: #1a237e;
    }
    
    .slot {
        background: #424242;
    }
    
    .modal-content {
        background: #2d2d2d;
        color: #fff;
    }
    
    button {
        background: #1a237e;
    }
    
    button:hover {
        background: #283593;
    }
    
    button:disabled {
        background: #424242;
    }
    
    .player-turn .disc {
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .scores {
        background: #2d2d2d;
    }
    
    .turn-indicator.active {
        background-color: rgba(255, 255, 255, 0.1);
    }
} 