:root {
    --bg-primary: #164E63;
    --bg-secondary: #0F3644;
    --text-primary: #FFFFFF;
    --text-secondary: #A5F3FC;
    --accent: #06B6D4;
    --accent-hover: #22D3EE;
    --board-bg: #06B6D4;
    --shadow: rgba(0, 0, 0, 0.4);
    --font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
    box-shadow: 0 10px 25px var(--shadow);
    max-width: 95vw;
}

header {
    text-align: center;
    width: 100%;
}

h1 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    color: var(--accent);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.btn {
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    border: 2px solid var(--accent);
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn:hover:not(:disabled) {
    background-color: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #555;
    color: #888;
}

#score-board {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin: 1rem 0;
    font-size: 1.25rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 0.5rem;
}

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

.label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

#p1-score, #p2-score {
    font-size: 1.5rem;
    color: var(--text-primary);
}

#status-message {
    font-size: 1.25rem;
    min-height: 2rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.5rem;
}

canvas {
    background-color: transparent; /* Handled by renderer */
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    max-width: 100%;
    touch-action: none; /* Prevent scrolling on touch devices */
}

/* Responsive adjustments */
@media (max-width: 600px) {
    h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.875rem;
    }

    #score-board {
        font-size: 1rem;
        padding: 0.5rem;
    }
}
