/* Urban Drive - Open World Driving Simulator Styles */

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

:root {
    --primary-color: #ff6b35;
    --secondary-color: #1a1a2e;
    --accent-color: #4ecdc4;
    --text-light: #ffffff;
    --text-dark: #1a1a2e;
    --hud-bg: rgba(0, 0, 0, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #000;
    overflow: hidden;
    user-select: none;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Loading Screen */
#loading-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    color: var(--text-light);
}

.loading-content h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 0.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 0 30px rgba(255, 107, 53, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.02); }
}

.loading-bar {
    width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 2rem auto;
}

.loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 3px;
    animation: loading 3s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    100% { width: 100%; }
}

#loading-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.1rem;
}

/* Main Menu */
#main-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(15, 52, 96, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
}

.menu-content {
    text-align: center;
    color: var(--text-light);
    padding: 3rem;
}

.menu-content h1 {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: 1rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
    letter-spacing: 0.3rem;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

.menu-btn {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--glass-bg);
    color: var(--text-light);
    border-color: var(--glass-border);
    min-width: 250px;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.menu-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), #e85a2d);
    border-color: transparent;
}

.menu-btn.primary:hover {
    background: linear-gradient(135deg, #ff7b4a, #f06b3e);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
}

.controls-hint {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: inline-block;
}

.controls-hint p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.speedometer {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--hud-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 20px 30px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.speed-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

#speed-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-light);
    line-height: 1;
}

.speed-unit {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.rpm-gauge {
    width: 150px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.rpm-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #ff6b35, #ff0000);
    border-radius: 4px;
    transition: width 0.1s ease;
}

.gear-display {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--primary-color);
    color: var(--text-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* Minimap */
.minimap-container {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: var(--hud-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 15px;
    backdrop-filter: blur(10px);
}

#minimap {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.5);
}

.compass {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 5px 15px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Vehicle Info */
.vehicle-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    background: var(--hud-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px 25px;
    backdrop-filter: blur(10px);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item .label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
}

.damage-bar, .fuel-bar {
    width: 100px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.damage-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #4ecdc4, #ff6b35, #ff0000);
    border-radius: 5px;
    transition: width 0.3s ease;
}

.fuel-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #4ecdc4);
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* Environment Info */
.environment-info {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.time-display {
    background: var(--hud-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
}

#game-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    font-family: 'Courier New', monospace;
}

.weather-display {
    background: var(--hud-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
}

#weather-icon {
    font-size: 1.5rem;
}

#weather-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Camera Indicator */
.camera-indicator {
    position: absolute;
    top: 30px;
    left: 30px;
    background: var(--hud-bg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 20px;
    backdrop-filter: blur(10px);
}

#camera-mode {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
}

/* Notifications */
#notifications {
    position: absolute;
    top: 100px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.notification {
    background: var(--hud-bg);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 10px 10px 0;
    padding: 15px 20px;
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-text {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Pause Menu */
#pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 800;
    backdrop-filter: blur(5px);
}

.pause-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(15, 52, 96, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    min-width: 350px;
}

.pause-content h2 {
    font-size: 2.5rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    letter-spacing: 0.3rem;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Settings Menu */
#settings-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 850;
    backdrop-filter: blur(10px);
}

.settings-content {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(15, 52, 96, 0.95));
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    min-width: 500px;
    max-width: 600px;
}

.settings-content h2 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 0.2rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.setting-item label {
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
}

.setting-item select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    padding: 0.5rem 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 150px;
}

.setting-item select option {
    background: var(--secondary-color);
    color: var(--text-light);
}

#btn-settings-back {
    width: 100%;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .loading-content h1 {
        font-size: 2.5rem;
    }
    
    .menu-content h1 {
        font-size: 3rem;
    }
    
    .speedometer {
        bottom: 15px;
        right: 15px;
        padding: 15px 20px;
    }
    
    #speed-number {
        font-size: 2.5rem;
    }
    
    .minimap-container {
        bottom: 15px;
        left: 15px;
    }
    
    #minimap {
        width: 150px;
        height: 150px;
    }
    
    .vehicle-info {
        bottom: 15px;
        padding: 10px 15px;
        gap: 15px;
    }
    
    .environment-info {
        top: 15px;
        right: 15px;
    }
    
    .camera-indicator {
        top: 15px;
        left: 15px;
    }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-out {
    animation: fadeOut 0.5s ease;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

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