/* ===================================
   RETRO SNAKE GAME - STYLING
   Theme: Win95 / Classic Arcade
   =================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    color: #00ff41;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 600px;
    width: 100%;
}

/* Header */
.game-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
}

.game-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 10px #00ff41, 0 0 20px #00ff41;
    margin-bottom: 5px;
}

.game-subtitle {
    font-size: 0.9rem;
    color: #00cc33;
    letter-spacing: 2px;
}

/* Info Panel */
.info-panel {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
}

.score-display,
.high-score-display,
.speed-display {
    flex: 1;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ff41;
    padding: 12px;
    text-align: center;
    border-radius: 4px;
    box-shadow: inset 0 0 10px rgba(0, 255, 65, 0.2);
}

.label {
    display: block;
    font-size: 0.7rem;
    color: #00cc33;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ff41;
    text-shadow: 0 0 5px #00ff41;
}

/* AI Coach Panel */
.ai-coach-panel {
    background: rgba(0, 100, 255, 0.1);
    border: 2px solid #0080ff;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    min-height: 80px;
    box-shadow: 0 0 15px rgba(0, 128, 255, 0.3);
}

.coach-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.coach-icon {
    font-size: 1.2rem;
}

.coach-title {
    font-size: 0.8rem;
    color: #0080ff;
    font-weight: bold;
    letter-spacing: 2px;
}

.coach-message {
    color: #66b3ff;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 40px;
}

/* Game Container */
.game-container {
    position: relative;
    margin: 0 auto 20px;
    width: 400px;
    height: 400px;
}

#gameCanvas {
    display: block;
    background: #000000;
    border: 3px solid #00ff41;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4),
                inset 0 0 20px rgba(0, 255, 65, 0.1);
}

/* Game Overlay */
.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    z-index: 10;
}

.game-overlay.hidden {
    display: none;
}

.overlay-content {
    text-align: center;
    padding: 30px;
}

#overlayTitle {
    font-size: 2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #00ff41;
    letter-spacing: 3px;
}

#overlayMessage {
    font-size: 1rem;
    color: #00cc33;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Buttons */
.game-button,
.control-button {
    background: linear-gradient(180deg, #00ff41 0%, #00cc33 100%);
    color: #000;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 0 #008822, 0 0 20px rgba(0, 255, 65, 0.5);
    transition: all 0.1s ease;
}

.game-button:hover,
.control-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #008822, 0 0 30px rgba(0, 255, 65, 0.7);
}

.game-button:active,
.control-button:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #008822, 0 0 15px rgba(0, 255, 65, 0.5);
}

.control-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

/* Control Panel */
.control-panel {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.control-button {
    flex: 1;
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* Instructions */
.instructions {
    background: rgba(0, 255, 65, 0.05);
    border: 2px solid #00ff41;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

.instructions h3 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1rem;
    letter-spacing: 2px;
    color: #00ff41;
}

.control-grid {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.control-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.control-item span {
    font-size: 0.8rem;
    color: #00cc33;
}

kbd {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #00ff41;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #00ff41;
    box-shadow: 0 2px 0 #008822, inset 0 0 5px rgba(0, 255, 65, 0.2);
    display: inline-block;
    min-width: 35px;
    text-align: center;
}

/* Footer */
.game-footer {
    text-align: center;
    padding: 15px;
    font-size: 0.75rem;
    color: #00cc33;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 480px) {
    .game-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .game-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }
    
    #gameCanvas {
        width: 100%;
        height: 100%;
    }
    
    .info-panel {
        flex-direction: column;
    }
    
    .control-grid {
        flex-direction: column;
        gap: 15px;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.coach-message {
    animation: pulse 2s ease-in-out infinite;
}
