/* Fun fonts from Google */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;700;900&display=swap');

/* ===== CSS Variables ===== */
:root {
    --court-wood: #c89b5e;
    --court-dark: #a07a3f;
    --accent-gold: #ffd54f;
    --accent-red: #ef5350;
    --text-light: #ffffff;
}

/* ===== Base Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ===== Page Background - Gym vibes ===== */
body {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    padding: 10px;
    color: var(--text-light);
}

/* ===== Game Container ===== */
.game-container {
    max-width: 640px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ===== Header ===== */
header {
    text-align: center;
    width: 100%;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95em;
    margin-bottom: 6px;
    transition: opacity 0.2s;
}

.back-button:hover { opacity: 0.8; }

h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8em;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

h1 .material-symbols-rounded {
    font-size: 36px;
    color: #ef5350;
}

.subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1em;
    margin-top: 2px;
}

/* ===== HUD ===== */
.hud {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-box { flex: 1; text-align: center; }

.team-label {
    font-family: 'Fredoka One', cursive;
    font-size: 0.85em;
    display: block;
    margin-bottom: 2px;
}

.player-team .team-label { color: #4fc3f7; }
.cpu-team .team-label { color: #ef5350; }

.team-count {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2em;
    display: block;
    line-height: 1;
}

.round-info {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.round-label {
    font-size: 0.7em;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.round-number {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8em;
    color: var(--accent-gold);
    line-height: 1;
}

/* ===== Canvas ===== */
main {
    position: relative;
    width: 600px;
    max-width: 100%;
}

#game-canvas {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

/* ===== Overlays ===== */
.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

.overlay.hidden { display: none; }

.overlay h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2em;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    gap: 10px;
}

.overlay .title-icon { font-size: 40px; color: #ef5350; }

.overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    text-align: center;
    padding: 0 20px;
}

.controls-hint {
    background: rgba(255,255,255,0.08);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.85em;
    color: rgba(255,255,255,0.6);
}

/* ===== Buttons ===== */
.difficulty-buttons {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.difficulty-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    border: none;
    border-radius: 14px;
    font-family: 'Fredoka One', cursive;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s;
    color: white;
}

.difficulty-btn:hover { transform: scale(1.08); }
.difficulty-btn .material-symbols-rounded { font-size: 32px; }

.difficulty-btn.easy {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.difficulty-btn.medium {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.difficulty-btn.hard {
    background: linear-gradient(135deg, #f44336, #EF5350);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.play-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
    border: none;
    border-radius: 30px;
    font-family: 'Fredoka One', cursive;
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.play-button:hover { transform: scale(1.05); }

/* ===== Instructions ===== */
.instructions {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.82em;
    text-align: center;
}

/* ===== Footer ===== */
footer { text-align: center; padding: 8px; }

.created-by {
    font-family: 'Fredoka One', cursive;
    font-size: 1.1em;
    padding: 8px 24px;
    color: #fff;
    background: linear-gradient(135deg, #E91E63, #FF4081);
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
}

.created-by .material-symbols-rounded { font-size: 20px; }

/* ===== Responsive ===== */
@media (max-width: 620px) {
    main { width: 100%; }
    h1 { font-size: 1.4em; }
    .difficulty-btn { padding: 10px 16px; font-size: 0.9em; }
    .hud { padding: 6px 10px; font-size: 0.85em; }
}
