:root {
    --bg-color: #0f172a;
    --board-bg: #1e293b;
    --text-color: #f8fafc;
    --p1-color: #06b6d4;
    /* Cyan */
    --p2-color: #f472b6;
    /* Pink */
    --accent-color: #f59e0b;
    /* Amber for highlights */
    --line-color: #475569;
    --peg-color: #94a3b8;
    --font-main: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
    /* Increased from 600px */
    height: 100vh;
    padding: 10px;
}

header {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--p1-color), var(--p2-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

#game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

main {
    flex-grow: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.player-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.5;
    transition: all 0.3s ease;
}

/* ... existing code ... */

#canvas-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    /* Ensure it takes height */
    position: relative;
    min-height: 0;
    /* Important for flex child scaling */
}

.player-score.active {
    opacity: 1;
    transform: scale(1.1);
}

.player-name {
    font-size: 0.8rem;
    font-weight: bold;
}

.score-value {
    font-size: 1.5rem;
    font-weight: bold;
}

#p1-score {
    color: var(--p1-color);
}

#p2-score {
    color: var(--p2-color);
}

.turn-indicator {
    font-size: 1rem;
    font-weight: bold;
    color: var(--text-color);
}

#canvas-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
    min-height: 0;
}

canvas {
    background: var(--board-bg);
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    cursor: crosshair;
    max-width: 100%;
    max-height: 100%;
}

footer {
    padding: 20px;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-family: var(--font-main);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* Modal */
#modal-overlay {
    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;
    backdrop-filter: blur(5px);
}

.hidden {
    display: none !important;
}

.modal {
    background: var(--board-bg);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.modal h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.final-scores {
    margin-bottom: 30px;
    font-size: 1.2rem;
}