﻿:root {
    --bus-color: #5ef5b9;
    --road-color: #2c3e50;
    --rim-color: #ecf0f1;
    --tire-color: #1a1a1a;
    --glass-color: #34495e;
    --sky-color: #d6eaf8;
}

.bus-scene {
    position: relative;
    width: 100%;
    height: 180px;
    background: var(--sky-color);
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    border: 1px solid #fff !important;
    outline: none !important;
    /* Purana box-shadow yahan se hata sakte hain kyunki hum overlay use karenge */
}

    /* Yeh naya block charo taraf perfect faded shadow layega */
    .bus-scene::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        pointer-events: none; /* Taaki click karne mein problem na ho */
        z-index: 10; /* Sabse upar: Road aur Bus ke bhi upar */
        /* Perfect Inner Faded Shadow on all 4 sides */
        box-shadow: inset 0px 9px 12px 15px #fff;
        border: 1px solid #fff !important;
        outline: none !important;
    }

/* --- PARALLAX BACKGROUND LAYERS --- */

/* Mountains (Far) */
.mountains {
    position: absolute;
    bottom: 40px;
    width: 200%;
    height: 40px;
    background: repeating-linear-gradient(to right, #aeb6bf 0%, #85929e 25%, #aeb6bf 50%);
    background-size: 300px 100%;
    clip-path: polygon(0% 100%, 10% 20%, 20% 70%, 35% 10%, 50% 60%, 65% 20%, 80% 80%, 90% 30%, 100% 100%);
    animation: moveBack 15s linear infinite;
    opacity: 0.5;
}

/* =============================================
   Realistic, Fluffy Clouds (Replacements)
   ============================================= */

/* Base style for all cloud datasets */
.cloud-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60%; /* Top area of sky */
    overflow: hidden;
    z-index: 1; /* Behind bus */
}

.realistic-cloud {
    position: absolute;
    background: #fff;
    opacity: 0.85;
    animation: moveBack linear infinite;
    filter: blur(0.5px); /* Soft edges */
    z-index: 1;
}

    /* Cloud shape logic (using multiple overlapping shapes) */
    .realistic-cloud,
    .realistic-cloud::before,
    .realistic-cloud::after {
        content: "";
        border-radius: 50%;
    }

        .realistic-cloud::before {
            position: absolute;
            background: inherit;
            filter: blur(0.3px);
        }

        .realistic-cloud::after {
            position: absolute;
            background: inherit;
            filter: blur(0.3px);
        }

/* --- CLOUD SHAPES & TIMING --- */

/* Big, slow-moving distant clouds */
.cloud-big {
    width: 90px;
    height: 35px;
    background: rgba(255, 255, 255, 0.7);
    filter: blur(1px); /* More distant */
    animation-duration: 16s;
}

    .cloud-big::before {
        width: 50px;
        height: 50px;
        top: -25px;
        left: 15px;
    }

    .cloud-big::after {
        width: 40px;
        height: 40px;
        top: -15px;
        right: 15px;
    }

/* Medium-sized, faster clouds */
.cloud-medium {
    width: 60px;
    height: 25px;
    animation-duration: 9s;
}

    .cloud-medium::before {
        width: 35px;
        height: 35px;
        top: -18px;
        left: 10px;
    }

    .cloud-medium::after {
        width: 28px;
        height: 28px;
        top: -10px;
        right: 10px;
    }

/* Small, whispy, fast foreground clouds */
.cloud-small {
    width: 35px;
    height: 12px;
    opacity: 0.9;
    animation-duration: 5s;
    background: rgba(255, 255, 255, 0.9);
}

    .cloud-small::before {
        width: 20px;
        height: 20px;
        top: -10px;
        left: 7px;
    }

/* --- INDIVIDUAL PLACEMENTS & LAYERS --- */

/* Dataset 1 (Distant) */
.c1 {
    top: 15px;
    left: 100%;
    animation-delay: 0s;
}

.c2 {
    top: 40px;
    left: 100%;
    animation-delay: 4s;
    opacity: 0.6;
}

/* Dataset 2 (Medium) */
.c3 {
    top: 25px;
    left: 100%;
    animation-delay: 2s;
}

.c4 {
    top: 50px;
    left: 100%;
    animation-delay: 7s;
}

/* Dataset 3 (Fast/Whispy) */
.c5 {
    top: 35px;
    left: 100%;
    animation-delay: 1s;
}

.c6 {
    top: 10px;
    left: 100%;
    animation-delay: 5s;
    opacity: 0.7;
}

/* Trees (Middle) */
.tree {
    position: absolute;
    bottom: 30px;
    width: 20px;
    height: 45px;
    background: #27ae60;
    clip-path: polygon(50% 0%, 0% 80%, 100% 80%);
    animation: moveBack 4s linear infinite;
}

    .tree::after {
        /* Trunk */
        content: "";
        position: absolute;
        bottom: -10px;
        left: 8px;
        width: 4px;
        height: 10px;
        background: #5d4037;
    }

.t1 {
    animation-delay: 0s;
}

.t2 {
    animation-delay: 1.5s;
    transform: scale(0.8);
    opacity: 0.8;
}

.t3 {
    animation-delay: 3s;
}

/* --- BUS COMPONENTS --- */

.bus-body {
    position: relative;
    width: 200px;
    height: 65px;
    /* --- NEW GRADIENT COLOR --- */
    background: linear-gradient(to bottom, #eef0da 0%, /* Light Mint top */ #3ac3e6 50%, /* Medium shade */ #3a515a 100% /* Darker shade for depth */ );
    /* -------------------------- */
    border-radius: 8px 25px 5px 8px;
    margin-bottom: 38px;
    z-index: 5;
    /* Soft top highlight for 3D effect */
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.5), inset -5px -5px 10px rgba(0, 0, 0, 0.1);
    animation: busVibration 0.3s infinite alternate ease-in-out;
}
/* Shadow under bus */
.bus-shadow {
    position: absolute;
    bottom: 38px;
    width: 170px;
    height: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    filter: blur(2px);
    z-index: 2;
    animation: shadowPulse 0.3s infinite alternate;
}

.bus-windows {
    display: flex;
    flex-direction: row-reverse;
    padding: 10px 12px;
    gap: 5px;
}

.front-glass {
    width: 30px;
    height: 25px;
    background: var(--glass-color);
    border-radius: 4px 15px 4px 4px;
    position: relative;
    overflow: hidden;
}
    /* Glass Shine */
    .front-glass::before {
        content: "";
        position: absolute;
        top: -100%;
        left: -100%;
        width: 200%;
        height: 200%;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        animation: shine 3s infinite;
    }

.win {
    width: 20px;
    height: 22px;
    background: var(--glass-color);
    border-radius: 3px;
}

.headlight {
    position: absolute;
    right: -1px;
    bottom: 15px;
    width: 5px;
    height: 15px;
    background: #f8e69e;
    border-radius: 50% 20% 20% 50%;
    box-shadow: 15px 0 30px rgba(241, 196, 15, 0.6);
}

/* --- EXHAUST SMOKE --- */
.exhaust {
    position: absolute;
    left: -10px;
    bottom: 10px;
    width: 10px;
    height: 10px;
}

.smoke {
    position: absolute;
    background: rgba(127, 140, 141, 0.6);
    border-radius: 50%;
    width: 8px;
    height: 8px;
    animation: smokeMove 0.6s infinite;
}

.s2 {
    animation-delay: 0.2s;
}

.s3 {
    animation-delay: 0.4s;
}

/* --- WHEELS --- */
.bus-wheel {
    position: absolute;
    bottom: -15px;
    width: 32px;
    height: 32px;
    background: var(--tire-color);
    border-radius: 50%;
    border: 3px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.w-front {
    right: 30px;
}

.w-back {
    left: 30px;
}

.rim {
    width: 18px;
    height: 18px;
    background: var(--rim-color);
    border-radius: 50%;
    border: 2px dashed #7f8c8d;
    animation: wheelSpin 0.6s linear infinite;
}

/* --- ROAD --- */
.bus-road {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 45px;
    background: var(--road-color);
    border-top: 4px solid #555;
}

.road-lines {
    width: 200%;
    height: 3px;
    position: absolute;
    top: 50%;
    background: linear-gradient(to right, #fff 30%, transparent 30%);
    background-size: 60px 100%;
    animation: moveBack 1.4s linear infinite;
}

/* --- WIND FLOW STREAKS --- */
.wind-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6; /* Bus ke upar (front layer) */
    pointer-events: none; /* Mouse interaction block na ho */
}

.wind-streak {
    position: absolute;
    height: 8px;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
    border-radius: 2px;
    filter: blur(1px);
    left: 100%;
    animation: moveBack linear infinite;
}

/* Different speeds and positions for wind */
.w1 {
    width: 100px;
    top: 70px;
    animation-duration: 0.8s;
    opacity: 0.6;
}

.w2 {
    width: 150px;
    top: 100px;
    animation-duration: 0.5s;
    opacity: 0.4;
}

.w3 {
    width: 80px;
    top: 130px;
    animation-duration: 1.2s;
    opacity: 0.5;
}

.w4 {
    width: 120px;
    top: 40px;
    animation-duration: 0.7s;
    opacity: 0.3;
}

/* MoveBack is already updated to -650px, so wind will cross perfectly */

/* --- ANIMATIONS --- */
@keyframes moveBack {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-600px);
    }
}

@keyframes wheelSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes busVibration {
    from {
        transform: translateY(0) rotate(0deg);
    }

    to {
        transform: translateY(-3px) rotate(0.5deg);
    }
}

@keyframes shadowPulse {
    from {
        width: 170px;
        opacity: 0.2;
    }

    to {
        width: 160px;
        opacity: 0.3;
    }
}

@keyframes shine {
    0% {
        top: -100%;
        left: -100%;
    }

    50% {
        top: 100%;
        left: 100%;
    }

    100% {
        top: 100%;
        left: 100%;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

@keyframes smokeMove {
    0% {
        transform: scale(1) translate(0, 0);
        opacity: 0.8;
    }

    100% {
        transform: scale(3) translate(-40px, -20px);
        opacity: 0;
    }
}

.loading-text {
    color: #2c3e50;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 1px;
}
