/* uPirate Taxi Driver Styles */
:root {
    --primary-color: #FFD700;
    --secondary-color: #FFA500;
    --taxi-yellow: #FFFF00;
    --road-gray: #696969;
    --text-dark: #2F4F4F;
    --success-green: #32CD32;
    --danger-red: #DC143C;
    --bg-dark: #1a1a1a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--road-gray) 100%);
    color: white;
    overflow: hidden;
    height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen.overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

/* Main Menu */
.menu-container {
    text-align: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    max-width: 600px;
    width: 90%;
}

h1 {
    font-size: 3rem;
    color: var(--taxi-yellow);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.info-card {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: left;
}

.info-card h3 {
    color: var(--taxi-yellow);
    margin-bottom: 1rem;
}

.info-card ul {
    list-style: none;
    padding-left: 0;
}

.info-card li {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.info-card li::before {
    content: "🚗";
    position: absolute;
    left: 0;
}

/* Lesson Selector */
.lesson-selector {
    margin: 2rem 0;
}

.lesson-selector label {
    display: block;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.lesson-selector select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 1rem;
}

/* Buttons */
.menu-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.menu-btn {
    padding: 1rem 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
}

.menu-btn:hover {
    background: var(--primary-color);
    color: black;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.menu-btn.primary {
    background: var(--primary-color);
    color: black;
}

.menu-btn.primary:hover {
    background: var(--secondary-color);
}

/* Game HUD */
.game-hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
}

.hud-left, .hud-center, .hud-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: bold;
}

.stat-label {
    color: var(--primary-color);
}

/* Destination Display */
.destination-display {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 0.8rem 1.5rem;
    text-align: center;
    min-width: 300px;
}

.destination-label {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

#destinationText {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--taxi-yellow);
    margin: 0.2rem 0;
}

.language-hint {
    font-size: 0.8rem;
    color: #ccc;
}

/* HUD Button */
.hud-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hud-btn:hover {
    background: var(--primary-color);
    color: black;
}

/* Game Canvas */
#gameCanvas {
    position: fixed;
    top: 80px;
    left: 0;
    background: #228B22;
    border: 3px solid var(--primary-color);
    cursor: crosshair;
}

/* Parking Progress */
.parking-progress {
    position: fixed;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--taxi-yellow);
    border-radius: 10px;
    padding: 1rem 2rem;
    text-align: center;
    z-index: 200;
}

.parking-label {
    color: var(--taxi-yellow);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.progress-bar {
    width: 200px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success-green) 0%, var(--taxi-yellow) 100%);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 10px;
}

/* Instructions */
.instructions-container {
    max-width: 800px;
    width: 90%;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

.instructions-content {
    margin: 2rem 0;
}

.instruction-step {
    background: rgba(255, 215, 0, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 15px 15px 0;
}

.instruction-step h3 {
    color: var(--taxi-yellow);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.instruction-step p {
    line-height: 1.6;
    margin: 0.5rem 0;
}

.instruction-step strong {
    color: var(--primary-color);
}

.instruction-step em {
    color: var(--taxi-yellow);
    font-style: normal;
    font-weight: bold;
}

/* Pause Screen */
.pause-container, .gameover-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.95);
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.pause-buttons, .gameover-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* Game Over Stats */
.final-stats {
    background: rgba(255, 215, 0, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: left;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-row span:first-child {
    color: var(--primary-color);
    font-weight: bold;
}

.stat-row span:last-child {
    color: var(--taxi-yellow);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Loading Screen */
.loading-container {
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    padding: 3rem;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255, 215, 0, 0.3);
    border-top: 6px solid var(--taxi-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    .game-hud {
        height: 100px;
        flex-direction: column;
        padding: 0.5rem;
    }
    
    .hud-left, .hud-center, .hud-right {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    #gameCanvas {
        top: 100px;
        width: 100vw;
        height: calc(100vh - 100px);
    }
    
    .destination-display {
        min-width: 200px;
        padding: 0.5rem 1rem;
    }
    
    .menu-container {
        padding: 1rem;
    }
    
    .instructions-container {
        padding: 1rem;
    }
}