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

body {
    font-family: 'Courier New', monospace;
    background: #222;
    color: #fff;
    overflow: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HUD Styles */
#hud {
    background: linear-gradient(to bottom, #333, #555);
    border-bottom: 3px solid #666;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hud-left, .hud-center, .hud-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

#timer {
    font-size: 24px;
    font-weight: bold;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

#score {
    font-size: 28px;
    font-weight: bold;
    color: #ffff00;
    text-shadow: 2px 2px 0px #000;
}

#teams {
    font-size: 14px;
    color: #ccc;
}

/* Button Styles */
button {
    background: linear-gradient(to bottom, #666, #333);
    border: 2px solid #888;
    color: #fff;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

button:hover {
    background: linear-gradient(to bottom, #777, #444);
    border-color: #aaa;
}

button:active {
    background: linear-gradient(to bottom, #333, #666);
    transform: translateY(1px);
}

button.active {
    background: linear-gradient(to bottom, #4a7c59, #2d5a33);
    border-color: #6a9c79;
    box-shadow: 0 0 10px #4a7c59;
}

/* Main Content */
#main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

#canvas {
    background: #4a7c59;
    border: 3px solid #333;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Controls Panel */
#controls {
    width: 300px;
    background: linear-gradient(to bottom, #2a2a2a, #1a1a1a);
    border-left: 3px solid #333;
    padding: 20px;
    overflow-y: auto;
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #444;
}

.control-section h3 {
    color: #00ff00;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

select {
    width: 100%;
    background: #333;
    border: 2px solid #555;
    color: #fff;
    padding: 8px;
    font-family: 'Courier New', monospace;
}

.style-btn {
    width: 100%;
    margin-bottom: 5px;
}

/* Range Sliders */
input[type="range"] {
    width: 70%;
    background: #333;
    outline: none;
    margin-right: 10px;
}

input[type="range"]::-webkit-slider-track {
    background: #555;
    height: 5px;
    border-radius: 3px;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 15px;
    height: 15px;
    background: #00ff00;
    border-radius: 50%;
    cursor: pointer;
}

/* Stats Panel */
#stats-panel {
    position: absolute;
    top: 80px;
    right: 20px;
    width: 250px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #555;
    padding: 15px;
    border-radius: 5px;
}

#stats-panel h3 {
    color: #00ff00;
    margin-bottom: 10px;
    text-align: center;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: #333;
    margin: 0 10px;
    display: flex;
    border-radius: 3px;
    overflow: hidden;
}

.stat-fill.home {
    background: #e74c3c;
}

.stat-fill.away {
    background: #3498db;
}

#closeStats {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    padding: 0;
    font-size: 14px;
    line-height: 16px;
}

/* Event Overlay */
#event-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #ff6b00, #ff8c00);
    border: 3px solid #fff;
    padding: 20px 40px;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 2px 2px 0px #000;
    animation: pulse 0.5s ease-in-out;
    z-index: 1000;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    #controls {
        width: 250px;
    }
    
    #canvas {
        width: calc(100vw - 250px);
        height: calc(100vh - 60px);
    }
}

@media (max-width: 900px) {
    #main-content {
        flex-direction: column;
    }
    
    #controls {
        width: 100%;
        height: 200px;
        border-left: none;
        border-top: 3px solid #333;
    }
    
    #canvas {
        width: 100%;
        height: calc(100vh - 260px);
    }
    
    .control-section {
        display: inline-block;
        width: 30%;
        margin-right: 3%;
        vertical-align: top;
    }
}

/* Retro CRT Effect (Optional) */
@media (min-width: 1200px) {
    #canvas::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.1) 2px,
            rgba(0, 0, 0, 0.1) 4px
        );
        pointer-events: none;
        z-index: 1;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #333;
}

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}