/* Harare Drive - Game Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    overflow: hidden;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#game-canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Screens */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    background: linear-gradient(180deg,
            rgba(15, 52, 96, 0.95) 0%,
            rgba(26, 26, 46, 0.98) 50%,
            rgba(22, 33, 62, 0.95) 100%);
    padding: 20px;
}

.hidden {
    display: none !important;
}

/* Title */
.title-container {
    text-align: center;
    margin-bottom: 20px;
}

.game-title {
    font-family: 'Racing Sans One', cursive;
    font-size: clamp(3rem, 15vw, 6rem);
    color: #ffd700;
    text-shadow:
        0 0 10px #ffd700,
        0 0 20px #ff6b00,
        0 0 40px #ff6b00,
        4px 4px 0px #c70039;
    letter-spacing: 0.1em;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

.game-subtitle {
    font-family: 'Racing Sans One', cursive;
    font-size: clamp(2rem, 10vw, 4rem);
    color: #00ff88;
    text-shadow:
        0 0 10px #00ff88,
        0 0 20px #00cc6a,
        3px 3px 0px #006633;
    letter-spacing: 0.3em;
    margin-top: -10px;
}

@keyframes titleGlow {
    from {
        text-shadow:
            0 0 10px #ffd700,
            0 0 20px #ff6b00,
            0 0 40px #ff6b00,
            4px 4px 0px #c70039;
    }

    to {
        text-shadow:
            0 0 20px #ffd700,
            0 0 40px #ff6b00,
            0 0 60px #ff6b00,
            4px 4px 0px #c70039;
    }
}

.tagline {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: #ff4757;
    margin-bottom: 30px;
    animation: flash 1s ease-in-out infinite;
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.instructions {
    text-align: center;
    margin-bottom: 30px;
}

.instructions p {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    color: #ffffff;
    margin: 10px 0;
    opacity: 0.9;
}

/* Buttons */
.game-btn {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 700;
    padding: 20px 50px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, #ff6b00 0%, #c70039 100%);
    color: white;
    cursor: pointer;
    box-shadow:
        0 8px 25px rgba(199, 0, 57, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.game-btn:hover,
.game-btn:active {
    transform: scale(1.05);
    box-shadow:
        0 12px 35px rgba(199, 0, 57, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.controls-hint {
    margin-top: 30px;
    text-align: center;
}

.controls-hint p {
    font-size: clamp(0.7rem, 2.5vw, 0.9rem);
    color: #888;
    margin: 5px 0;
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 50;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
}

.score-container,
.health-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label,
.health-label {
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 0.2em;
}

#score {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 10px #00ff88;
}

.score-unit {
    font-size: 0.8rem;
    color: #00ff88;
}

.health-bar {
    width: 100px;
    height: 12px;
    background: #333;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #555;
    margin-top: 5px;
}

#health-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff4757, #ffd700, #00ff88);
    transition: width 0.3s ease;
}

/* Speed Bar */
.speed-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.speed-label {
    font-size: 0.7rem;
    color: #888;
    letter-spacing: 0.2em;
}

.speed-bar {
    width: 100px;
    height: 12px;
    background: #333;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #555;
    margin-top: 5px;
}

#speed-fill {
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, #00aaff, #00ff88, #ffff00, #ff6600);
    transition: width 0.1s ease;
}

/* Police Warning */
#police-warning {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 0, 0.8);
    color: white;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: clamp(0.8rem, 3vw, 1rem);
    font-weight: 700;
    z-index: 60;
    animation: warningFlash 0.5s ease-in-out infinite;
}

@keyframes warningFlash {

    0%,
    100% {
        background: rgba(255, 0, 0, 0.9);
    }

    50% {
        background: rgba(255, 100, 0, 0.9);
    }
}

/* Game Over */
.game-over-title {
    font-family: 'Racing Sans One', cursive;
    font-size: clamp(3rem, 12vw, 5rem);
    color: #ff4757;
    text-shadow:
        0 0 20px #ff4757,
        4px 4px 0px #8b0000;
    margin-bottom: 10px;
}

.game-over-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    color: #ffd700;
    margin-bottom: 40px;
}

.final-score,
.high-score {
    text-align: center;
    margin: 15px 0;
}

.final-score .score-label,
.high-score .score-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 5px;
}

#final-score {
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 900;
    color: #00ff88;
    text-shadow: 0 0 20px #00ff88;
}

#high-score {
    font-size: clamp(1.5rem, 6vw, 2rem);
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 0 10px #ffd700;
}

#restart-btn {
    margin-top: 30px;
}

/* Responsive */
@media (max-height: 600px) {
    .instructions {
        margin-bottom: 15px;
    }

    .instructions p {
        margin: 5px 0;
    }

    .game-btn {
        padding: 15px 40px;
    }

    .controls-hint {
        margin-top: 15px;
    }
}