body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f0f2f5;
    text-align: center;
}

#timer {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0 15px 0;
}

#startPauseBtn {
    padding: 10px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #1a73e8;
    color: white;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

#startPauseBtn:hover {
    transform: scale(1.05);
    background: #155ab6;
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

#startPauseBtn:active {
    transform: scale(0.95);
    box-shadow: 0 3px 6px rgba(0,0,0,0.2);
}

#startPauseBtn:disabled {
    background: #a0c4ff;
    cursor: not-allowed;
    box-shadow: none;
}

.scoreboard {
    display: flex;
    flex-direction: row; /* stack vertically on small screens */
    gap: 15px;
    margin: 20px auto;
    align-items: center;
    max-width: 800px;
}

.player {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    width: 90%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    position: relative;
    transition: transform 0.2s;
}

.player.current {
    border: 3px solid #1a73e8;
    box-shadow: 0 0 15px #1a73e8;
    transform: scale(1.02);
}

.player h2 { margin-bottom: 5px; font-size: 1.2em; }
.player p { font-size: 1em; margin: 3px 0; }

.zone {
    margin: 15px 0;
}

.zone h3 { margin-bottom: 8px; font-size: 1.1em; }

.zone button {
    padding: 10px 12px;
    margin: 2px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.1s, opacity 0.2s;
    font-size: 0.9em;
}

.zone button:hover:not(:disabled) { transform: scale(1.05); }

/* Zone colors */
#zone1 button { background: #88E788; color: #000; }
#zone2 button { background: #88E788; color: #000; }
#zone3 button { background: #88E788; color: #000; }

/* Player colors */
button.blue { background: #87cefa !important; color: #000 !important; opacity: 0.7; }
button.red { background: #ff6b6b !important; color: #fff !important; opacity: 0.7; }

button.disabled { opacity: 0.5; cursor: not-allowed; }

.controls {
    margin-top: 15px;
}

.controls button {
    padding: 10px 15px;
    margin: 5px 3px;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.controls button:hover { transform: scale(1.05); }
.controls .miss { background: #ffcccb; }
.controls .foul { background: #ff4500; color:white; }

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

/* Modal content */
.modal-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s ease;
}

.modal-content h2 {
    margin-bottom: 15px;
    font-size: 1.5em;
}

.modal-content button {
    margin-top: 15px;
    padding: 10px 20px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: #1a73e8;
    color: #fff;
    transition: all 0.2s ease;
}

.modal-content button.btn-primary {
    background: green;
}

.modal-content button:hover {
    background: #155ab6;
}

.modal-content button.btn-primary:hover {
    background: darkgreen;
}

@keyframes fadeIn {
    from {opacity:0; transform: translateY(-20px);}
    to {opacity:1; transform: translateY(0);}
}

/* Responsive grid for zone buttons on small screens */
@media (max-width: 480px) {
    .zone button {
        padding: 8px 10px;
        font-size: 0.85em;
        margin: 1px;
    }
    .player { width: 95%; padding: 10px; }
}