* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Orbitron', 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a5d1a, #ffcc00, #cc0000, #1a5d1a, #ffcc00);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes rastaNeonGlow {
    0%, 100% { text-shadow: 0 0 5px #ffcc00, 0 0 10px #1a5d1a, 0 0 15px #cc0000; }
    50% { text-shadow: 0 0 10px #1a5d1a, 0 0 20px #ffcc00, 0 0 30px #cc0000; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.game-container {
    text-align: center;
    background: rgba(26, 93, 26, 0.9);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 0 50px rgba(255, 204, 0, 0.4), 0 8px 32px rgba(204, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    border: 3px solid rgba(255, 204, 0, 0.6);
    position: relative;
    overflow: hidden;
}

.game-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #1a5d1a, #ffcc00, #cc0000, #1a5d1a);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
    border-radius: 20px;
    z-index: -1;
}

.game-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(45deg, #ffcc00, #1a5d1a, #cc0000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rastaNeonGlow 3s ease-in-out infinite alternate;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.score-display {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    font-size: 1.2rem;
    gap: 15px;
}

.current-score, .high-score, .level-display {
    background: rgba(26, 93, 26, 0.3);
    padding: 15px 25px;
    border-radius: 30px;
    font-weight: bold;
    border: 2px solid rgba(255, 204, 0, 0.6);
    box-shadow: inset 0 0 10px rgba(255, 204, 0, 0.2);
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    color: #ffcc00;
    flex: 1;
    text-align: center;
}

.current-score:hover, .high-score:hover, .level-display:hover {
    background: rgba(255, 204, 0, 0.3);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
    transform: translateY(-2px);
}

.game-main {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    justify-content: center;
}

.rasta-face-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(26, 93, 26, 0.4);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 204, 0, 0.6);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
}

#rastaFace {
    border-radius: 10px;
    border: 2px solid #ffcc00;
    background: radial-gradient(circle at center, #1a5d1a, #0d2818);
    margin-bottom: 15px;
}

.stats-panel {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    color: #ffcc00;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.chill-bar {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border: 1px solid #ffcc00;
    overflow: hidden;
    margin-bottom: 5px;
}

.chill-fill {
    height: 100%;
    background: linear-gradient(90deg, #1a5d1a, #32cd32, #ffcc00);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

#chillText {
    color: #ffcc00;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
}

.powerups-display {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    min-height: 30px;
}

.powerup-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 1px solid #ffcc00;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ffcc00;
    background: rgba(26, 93, 26, 0.6);
}

.game-area {
    position: relative;
    display: inline-block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#gameCanvas {
    background: radial-gradient(circle at center, #0d2818, #0a1f0a);
    display: block;
    border: 3px solid #ffcc00;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.6), inset 0 0 30px rgba(26, 93, 26, 0.3);
    transition: all 0.3s ease;
}

#gameCanvas:hover {
    box-shadow: 0 0 40px rgba(255, 204, 0, 0.8), inset 0 0 40px rgba(26, 93, 26, 0.4);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 93, 26, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 10px;
    border: 2px solid rgba(255, 204, 0, 0.6);
}

.overlay-content {
    text-align: center;
}

.overlay-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.8);
    animation: pulse 2s ease-in-out infinite;
}

.overlay-content p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ffcc00;
    font-family: 'Orbitron', sans-serif;
    text-shadow: 0 0 5px rgba(255, 204, 0, 0.5);
}

.controls {
    font-size: 0.9rem !important;
    color: #aaa !important;
    margin-top: 15px !important;
}

.hidden {
    display: none;
}

.mobile-controls {
    display: none;
    margin-top: 20px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.control-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #ffcc00;
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
    font-size: 20px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.control-btn:hover {
    background: rgba(255, 204, 0, 0.4);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
    transform: scale(1.1);
}

.control-btn:active {
    transform: scale(0.95);
    background: rgba(255, 204, 0, 0.6);
}

@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }

    .game-container {
        padding: 20px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .score-display {
        flex-direction: column;
        gap: 10px;
    }

    .game-main {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .rasta-face-panel {
        order: 2;
        width: 100%;
        max-width: 300px;
    }

    .game-area {
        order: 1;
    }

    #gameCanvas {
        width: 300px;
        height: 300px;
    }

    #rastaFace {
        width: 150px;
        height: 180px;
    }

    .stats-panel {
        flex-direction: row;
        justify-content: space-around;
    }

    .stat-item {
        flex: 1;
    }
}