/* ========================================
   SOCCER CHAMPIONSHIP GAME STYLES
   Created by Shivanya
   ======================================== */

/* CSS Variables */
:root {
    --bg-color: #1a472a;          /* Soccer field green */
    --text-color: #ffffff;
    --accent-color: #f472b6;
    --button-color: #8b5cf6;
    --blue-team: #3b82f6;
    --red-team: #ef4444;
}

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

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

/* Body styling */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #2d5a27 50%, #1a472a 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Stadium pattern background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255,255,255,0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255,255,255,0.03) 0%, transparent 20%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Main container */
.game-container {
    text-align: center;
    max-width: 650px;
    width: 100%;
}

/* Header */
header {
    margin-bottom: 15px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.back-button:hover {
    transform: translateX(-5px);
}

header h1 {
    font-size: 1.8rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
}

header h1 .material-symbols-rounded {
    color: #fbbf24;
    font-size: 32px;
}

.subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
}

/* Score board */
.score-board {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.team-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
}

.blue-team {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.red-team {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.timer {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 20px;
    background: rgba(0,0,0,0.5);
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    color: #fbbf24;
}

/* Main game area */
main {
    position: relative;
    display: inline-block;
}

#game-canvas {
    background: #2d5a27;
    border-radius: 10px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 100%;
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    gap: 12px;
    padding: 20px;
}

.overlay.hidden {
    display: none;
}

.overlay h2 {
    font-size: 2rem;
    color: #fbbf24;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 10px;
}

.overlay p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* Goal celebration */
#goal-screen {
    background: rgba(0, 0, 0, 0.8);
}

#goal-screen h2 {
    font-size: 3rem;
    animation: goalPulse 0.5s ease-in-out infinite alternate;
}

.goal-icon {
    font-size: 80px;
    color: #fbbf24;
    animation: spin 1s linear infinite;
}

@keyframes goalPulse {
    from { transform: scale(1); }
    to { transform: scale(1.2); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Difficulty buttons */
.difficulty-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.difficulty-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.difficulty-btn .material-symbols-rounded {
    font-size: 32px;
}

.difficulty-btn:hover {
    transform: scale(1.1);
}

.difficulty-btn.easy {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.difficulty-btn.medium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.difficulty-btn.hard {
    background: linear-gradient(135deg, #f87171, #ef4444);
    box-shadow: 0 4px 15px rgba(248, 113, 113, 0.4);
}

/* Final scores */
.final-scores {
    display: flex;
    gap: 30px;
    margin: 15px 0;
}

.final-score-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    color: white;
}

/* Play button */
.play-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--button-color), #a78bfa);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.5);
}

/* Controls info */
.controls-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.control-item .material-symbols-rounded {
    font-size: 20px;
    background: rgba(255,255,255,0.2);
    padding: 3px;
    border-radius: 5px;
}

.key {
    background: rgba(255,255,255,0.2);
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.8rem;
}

/* Footer */
footer {
    margin-top: 15px;
}

.created-by {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--accent-color), #ec4899);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 500px) {
    header h1 {
        font-size: 1.4rem;
    }

    .score-board {
        gap: 10px;
    }

    .team-display {
        padding: 8px 12px;
        font-size: 1rem;
    }

    .difficulty-buttons {
        flex-direction: column;
    }

    .difficulty-btn {
        flex-direction: row;
    }
}
