/* ==========================================================================
   UU Bus Service - Modern Native Mobile App UI & Real-Time Animations
   Designed for High Performance, In-App Live Tracking & Instant Responsiveness
   ========================================================================== */

:root {
    --font-primary: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Light Theme Palette */
    --bg-page: #f1f5f9;
    --bg-shell: #ffffff;
    --bg-card: #ffffff;
    --bg-subtle: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-subtle: #f1f5f9;
    
    /* Brand Colors */
    --primary: #0284c7;
    --primary-dark: #0369a1;
    --primary-light: #e0f2fe;
    --primary-glow: rgba(2, 132, 199, 0.28);
    --accent: #2563eb;
    
    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Shadows */
    --shadow-card: 0 4px 18px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 12px 28px rgba(2, 132, 199, 0.2);
    --shadow-top: 0 -4px 20px rgba(15, 23, 42, 0.08);
    --shadow-header: 0 2px 14px rgba(15, 23, 42, 0.05);
    
    /* Layout */
    --max-app-width: 620px;
    --bottom-nav-height: 64px;
    --radius-xl: 20px;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-full: 9999px;
}

[data-theme="dark"] {
    --bg-page: #040812;
    --bg-shell: #090e1a;
    --bg-card: #121a2c;
    --bg-subtle: #192339;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #1e2c45;
    --border-subtle: #121b2d;
    
    --primary: #38bdf8;
    --primary-dark: #0ea5e9;
    --primary-light: rgba(56, 189, 248, 0.14);
    --primary-glow: rgba(56, 189, 248, 0.3);
    
    --shadow-card: 0 4px 22px rgba(0, 0, 0, 0.45);
    --shadow-hover: 0 12px 32px rgba(56, 189, 248, 0.25);
    --shadow-top: 0 -4px 24px rgba(0, 0, 0, 0.6);
    --shadow-header: 0 2px 16px rgba(0, 0, 0, 0.4);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

/* App Shell */
.app-shell {
    width: 100%;
    max-width: var(--max-app-width);
    min-height: 100vh;
    background-color: var(--bg-shell);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 35px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Header / Top Navigation
   ========================================================================== */
.app-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-shell);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-header);
    padding: env(safe-area-inset-top, 0px) 0 0 0;
}

.topbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    box-shadow: 0 4px 14px var(--primary-glow);
    position: relative;
}

.live-radar-avatar .avatar-radar-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 18px;
    border: 2px solid var(--primary);
    opacity: 0;
    animation: radar-pulse 2.2s infinite ease-out;
}

@keyframes radar-pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.35); opacity: 0; }
}

.app-name {
    font-size: 1.18rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
    line-height: 1.2;
}

.app-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--success);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.8); }
    70% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-install-app {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px var(--primary-glow);
    transition: transform 0.15s ease;
}

.pulse-anim {
    animation: btn-glow 2s infinite ease-in-out;
}

@keyframes btn-glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.btn-app-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-app-icon:active {
    transform: scale(0.92);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.app-main-content {
    flex: 1;
    padding: 1rem 1rem calc(var(--bottom-nav-height) + 1.5rem) 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Search Bar Section */
.app-search-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-subtle);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 0 16px;
    transition: all 0.25s ease;
}

.glow-focus:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-card);
}

.app-search-bar i.bi-search {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-right: 10px;
    transition: color 0.2s ease;
}

.app-search-bar:focus-within i.bi-search {
    color: var(--primary);
}

.app-search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 13px 0;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    color: var(--text-main);
    outline: none;
}

.app-search-bar input::placeholder {
    color: var(--text-muted);
}

.btn-clear-search {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 4px;
}

/* Filter Pill Tabs */
.app-pill-tabs {
    display: flex;
    gap: 10px;
}

.pill-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pill-tab.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 3px 12px var(--primary-glow);
    transform: translateY(-1px);
}

/* ==========================================================================
   Bus Cards Grid (Animated, Reactive)
   ========================================================================== */
.app-cards-container {
    flex: 1;
}

.app-bus-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mobile-bus-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 12px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.22s ease;
    overflow: hidden;
}

[data-theme="dark"] .mobile-bus-card {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    border-color: rgba(56, 189, 248, 0.15);
}

.anim-card-in {
    animation: card-appear 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes card-appear {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mobile-bus-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 28px rgba(2, 132, 199, 0.18);
    transform: translateY(-3px) scale(1.015);
}

.mobile-bus-card:active {
    transform: scale(0.97);
}

.btn-card-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.btn-card-fav:active {
    transform: scale(1.35) rotate(15deg);
}

.btn-card-fav.active {
    color: var(--warning);
}

/* Clean Card Base - No overlapping bottom background */

.card-icon-bubble {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 8px;
    margin-top: 4px;
    position: relative;
    z-index: 2;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Continuous Autonomous Float & Radar (No Hover Required) */
.auto-float {
    display: inline-block;
    animation: bus-idle-engine 2.2s infinite ease-in-out;
}

@keyframes bus-idle-engine {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px) scale(1.03); }
}

.card-radar-ring.auto-radar {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 20px;
    border: 2px solid var(--primary);
    opacity: 0.6;
    animation: radar-pulse 2s infinite ease-out !important;
}

.card-bus-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 3px;
    position: relative;
    z-index: 2;
}

.auto-pulse-dot {
    animation: pulse-ring 1.5s infinite cubic-bezier(0.66, 0, 0, 1) !important;
}

.card-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-subtle);
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
}

.live-dot-sm {
    width: 7px;
    height: 7px;
    background-color: var(--success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-ring 1.8s infinite cubic-bezier(0.66, 0, 0, 1);
}

/* Animated Runway Button (Bus drives across then reveals Track Location) */
.btn-app-track-runway {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0284c7 0%, #1e40af 100%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-app-track-runway:hover {
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.5);
    filter: brightness(1.08);
}

.btn-app-track-runway:active {
    transform: scale(0.96);
}

/* Road Lane Divider Lines inside Button */
.runway-road-stripes {
    position: absolute;
    bottom: 4px;
    left: 0;
    width: 250%;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.55) 8px, transparent 8px, transparent 16px);
    animation: runway-stripes-zoom 1s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes runway-stripes-zoom {
    0% { transform: translateX(0); }
    100% { transform: translateX(-32px); }
}

/* Moving Bus Slider across button */
.runway-bus-slider {
    position: absolute;
    bottom: 3px;
    left: -48px;
    width: 38px;
    height: 15px;
    z-index: 2;
    pointer-events: none;
    animation: runway-bus-pass 3.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.runway-bus-svg {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

@keyframes runway-bus-pass {
    0% {
        left: -48px;
        opacity: 0;
        transform: scale(0.92);
    }
    10% {
        opacity: 1;
        transform: scale(1);
    }
    40% {
        left: 108%;
        opacity: 1;
        transform: scale(1);
    }
    45%, 100% {
        left: 108%;
        opacity: 0;
    }
}

/* The Revealed Track Location Text */
.runway-text-revealed {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    pointer-events: none;
    animation: runway-text-reveal 3.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes runway-text-reveal {
    0%, 15% {
        opacity: 0.25;
        transform: scale(0.94);
        filter: blur(0.8px);
    }
    35% {
        opacity: 0.8;
        transform: scale(0.98);
        filter: blur(0px);
    }
    45%, 85% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.95);
    }
}

/* Empty State */
.app-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1.5px dashed var(--border);
    margin-top: 1rem;
}

.empty-icon {
    font-size: 2.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.anim-bounce {
    animation: bounce-subtle 2s infinite ease-in-out;
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.app-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.app-empty-state p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.btn-app-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Campus Banner Card */
.campus-banner-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.btn-campus-direct-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.campus-banner-card:hover .btn-campus-direct-link {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.anim-pulse-subtle {
    position: relative;
}

.campus-banner-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.campus-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.campus-banner-info {
    flex: 1;
    overflow: hidden;
}

.campus-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
    flex-wrap: wrap;
}

.campus-title-row h4 {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-main);
}

.plus-code-badge {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.campus-banner-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-campus-info {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.campus-banner-card:hover .btn-campus-info {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* ==========================================================================
   Bottom Navigation Bar (Dock)
   ========================================================================== */
.app-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--max-app-width);
    height: var(--bottom-nav-height);
    background: var(--bg-shell);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-shadow: var(--shadow-top);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 100%;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s ease;
}

.nav-tab i {
    font-size: 1.3rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-tab.active {
    color: var(--primary);
}

.nav-tab.active i {
    transform: translateY(-3px) scale(1.1);
}

/* ==========================================================================
   IN-APP LIVE TRACKER SCREEN (SAME PAGE FULLSCREEN VIEW)
   ========================================================================== */
.inapp-tracker-screen {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: var(--max-app-width);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-shell);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0,0,0,0.25);
    visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s ease;
}

.inapp-tracker-screen.active {
    transform: translateX(-50%) translateY(0);
    visibility: visible;
}

/* Tracker Topbar */
.tracker-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--bg-shell);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-header);
    z-index: 10;
    padding-top: max(0.75rem, env(safe-area-inset-top, 0.75rem));
}

.btn-tracker-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-tracker-back:active {
    transform: scale(0.93);
}

.btn-tracker-back i {
    font-size: 1.1rem;
    color: var(--primary);
}

.tracker-header-info {
    text-align: center;
}

.tracker-header-info h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.tracker-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--success);
}

.tracker-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-tracker-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-tracker-icon:hover {
    background: var(--primary-light);
    color: var(--primary);
}

/* Tracker Frame & Radar Loader */
.tracker-frame-wrapper {
    flex: 1;
    position: relative;
    background: #0b1120;
    overflow: hidden;
}

.tracker-radar-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #0b1120;
    color: #ffffff;
    z-index: 5;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tracker-radar-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.radar-circle-outer {
    position: absolute;
    width: 140px;
    height: 140px;
    border: 2px dashed rgba(56, 189, 248, 0.4);
    border-radius: 50%;
    animation: radar-spin 10s linear infinite;
}

.radar-circle-inner {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(56, 189, 248, 0.7);
    border-radius: 50%;
    animation: radar-pulse 2s infinite ease-out;
}

.radar-bus-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ffffff;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.8);
    z-index: 2;
    margin-bottom: 20px;
}

@keyframes radar-spin {
    100% { transform: rotate(360deg); }
}

.tracker-radar-loader p {
    font-size: 0.9rem;
    font-weight: 600;
    color: #94a3b8;
    z-index: 2;
    margin-top: 10px;
}

#trackerIframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Tracker Bottom Dock */
.tracker-bottom-bar {
    background: var(--bg-shell);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
}

.tracker-status-text {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
}

.btn-tracker-return {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-tracker-return:active {
    transform: scale(0.95);
}

/* ==========================================================================
   Campus Modal / Map Preview Card
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal-sheet {
    background: var(--bg-card);
    width: 100%;
    max-width: var(--max-app-width);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 1rem 1.25rem 2rem 1.25rem;
    box-shadow: var(--shadow-top);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 88vh;
    overflow-y: auto;
}

.modal-backdrop.show .modal-sheet {
    transform: translateY(0);
}

.sheet-handle {
    width: 38px;
    height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    margin: 0 auto 12px auto;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sheet-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
}

.btn-close-sheet {
    background: var(--bg-subtle);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
}

.sheet-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 1.5rem;
}

/* Campus Map Card */
.campus-map-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    position: relative;
    box-shadow: var(--shadow-card);
}

.map-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 10px;
}

.campus-map-card h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.campus-sub {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 12px;
}

.plus-code-box {
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.plus-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.plus-code-val {
    font-size: 0.88rem;
    color: var(--primary);
}

.btn-google-maps-direct {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 11px;
    border-radius: var(--radius-md);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.25);
    transition: filter 0.2s ease, transform 0.15s ease;
}

.btn-google-maps-direct:hover {
    filter: brightness(1.08);
}

.btn-google-maps-direct:active {
    transform: scale(0.97);
}

.info-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.info-row i {
    font-size: 1.3rem;
    color: var(--primary);
    margin-top: 2px;
}

.info-row strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.info-row p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.info-row a {
    color: var(--primary);
    text-decoration: none;
    word-break: break-all;
}

.btn-sheet-close-full {
    width: 100%;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.app-toast {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.94);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 0.86rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 3500;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
}

.app-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   FULLSCREEN RUNNING BUS LOADER TRANSITION OVERLAY
   ========================================================================== */
.bus-running-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 8, 18, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.bus-running-transition-overlay.active {
    opacity: 1;
    visibility: visible;
}

.transition-modal-box {
    background: linear-gradient(180deg, #0e172a 0%, #070d1e 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.3);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.25);
    transform: scale(0.9);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bus-running-transition-overlay.active .transition-modal-box {
    transform: scale(1);
}

/* Highway Scene */
.transition-highway-scene {
    position: relative;
    height: 180px;
    background: radial-gradient(circle at 50% 30%, #1e293b 0%, #090e1a 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Wind Speed Streaks */
/* Night Sky Stars */
.night-sky-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    pointer-events: none;
}

.night-sky-backdrop .star {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0.6;
    animation: stars-fly 1.2s linear infinite;
}

.night-sky-backdrop .star.s-1 { top: 18px; left: 85%; animation-duration: 0.9s; }
.night-sky-backdrop .star.s-2 { top: 38px; left: 65%; animation-duration: 1.1s; animation-delay: 0.3s; }
.night-sky-backdrop .star.s-3 { top: 22px; left: 40%; animation-duration: 1.4s; animation-delay: 0.5s; }
.night-sky-backdrop .star.s-4 { top: 48px; left: 20%; animation-duration: 1s; animation-delay: 0.7s; }

@keyframes stars-fly {
    0% { transform: translateX(100px); opacity: 0; }
    40% { opacity: 0.8; }
    100% { transform: translateX(-220px); opacity: 0; }
}

/* Speed Wind Streaks */
.speed-streaks {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 80px;
    pointer-events: none;
    z-index: 2;
}

.streak {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.85), transparent);
    border-radius: 2px;
}

.streak.s1 {
    width: 100px;
    top: 20px;
    animation: streak-fly 0.6s infinite linear;
}

.streak.s2 {
    width: 140px;
    top: 48px;
    animation: streak-fly 0.8s infinite linear 0.15s;
}

.streak.s3 {
    width: 80px;
    top: 72px;
    animation: streak-fly 0.55s infinite linear 0.35s;
}

@keyframes streak-fly {
    0% { transform: translateX(260px); opacity: 0; }
    30% { opacity: 0.9; }
    100% { transform: translateX(-260px); opacity: 0; }
}

/* Realistic Side Coach Bus Container */
.side-coach-bus-container {
    position: relative;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
    animation: bus-engine-vibe 0.22s infinite alternate ease-in-out;
    margin-bottom: 2px;
}

@keyframes bus-engine-vibe {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-3px) rotate(0.4deg); }
}

.custom-side-bus-svg {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.6));
}

/* Headlight Projection Beam */
.headlight-beam-glow {
    animation: beam-flicker 0.18s infinite alternate ease-in-out;
    transform-origin: 198px 53px;
}

@keyframes beam-flicker {
    0% { opacity: 0.88; }
    100% { opacity: 1; }
}

/* High Speed Spinning Wheel Spokes */
.spinning-rim {
    animation: rim-spin-cycle 0.22s infinite linear;
    transform-origin: 0px 0px;
}

@keyframes rim-spin-cycle {
    100% { transform: rotate(360deg); }
}

/* Dynamic Road Shadow Underneath Coach Bus */
.side-bus-shadow {
    width: 210px;
    height: 10px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 75%);
    border-radius: 50%;
    margin-top: -6px;
    z-index: 5;
    animation: shadow-squeeze 0.22s infinite alternate ease-in-out;
}

@keyframes shadow-squeeze {
    0% { transform: scaleX(1); opacity: 0.7; }
    100% { transform: scaleX(0.96); opacity: 0.9; }
}

/* Realistic Highway Asphalt Road with Zooming Dashed Divider */
.realistic-highway-road {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: #090e1a;
    overflow: hidden;
    border-top: 2px solid #1e293b;
}

.road-asphalt-texture {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #101726 0%, #060911 100%);
}

.road-dashed-divider {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    width: 300%;
    height: 5px;
    background: repeating-linear-gradient(90deg, #f8fafc 0, #f8fafc 30px, transparent 30px, transparent 65px);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    animation: highway-speed-drift 0.45s linear infinite;
}

@keyframes highway-speed-drift {
    0% { transform: translateY(-50%) translateX(0); }
    100% { transform: translateY(-50%) translateX(-65px); }
}

/* Status Info Container */
.transition-status-container {
    padding: 1.5rem 1.25rem 1.75rem 1.25rem;
    text-align: center;
    color: #ffffff;
}

.live-connecting-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--success);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-bottom: 8px;
}

.transition-bus-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 4px;
}

.transition-status-desc {
    font-size: 0.88rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
}

/* Running Progress Bar */
.running-progress-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.running-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #38bdf8 0%, #2563eb 100%);
    border-radius: var(--radius-full);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
    transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.transition-bottom-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #64748b;
}

/* ==========================================================================
   ALL SECTIONS ANIMATION LOADING
   ========================================================================== */
.anim-section-drop {
    animation: section-drop 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes section-drop {
    0% { transform: translateY(-30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.anim-section-fade {
    animation: section-fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@keyframes section-fade-up {
    0% { transform: translateY(20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.anim-section-scale {
    animation: section-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s both;
}

@keyframes section-pop {
    0% { transform: scale(0.94); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.anim-section-dock {
    animation: dock-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes dock-rise {
    0% { transform: translate(-50%, 40px); opacity: 0; }
    100% { transform: translate(-50%, 0); opacity: 1; }
}

/* Student Header Profile Badge */
.student-header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--success);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    transition: background-color 0.2s ease;
}

.student-header-badge:hover {
    background: rgba(16, 185, 129, 0.12);
}

/* ==========================================================================
   STUDENT AUTHENTICATION MODAL GATE (1ST TIME VISITOR)
   ========================================================================== */
.auth-gate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 8, 18, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.auth-gate-modal.active {
    opacity: 1;
    visibility: visible;
}

.auth-modal-card {
    background: var(--bg-card);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 420px;
    padding: 2rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(56, 189, 248, 0.2);
    text-align: center;
    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-gate-modal.active .auth-modal-card {
    transform: scale(1);
}

.auth-avatar-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 14px auto;
    box-shadow: 0 6px 18px var(--primary-glow);
}

.auth-card-header h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.auth-card-header p {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.auth-form-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 1.25rem;
}

.auth-input-group {
    margin-bottom: 2px;
}

.auth-input-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.auth-input-group label .input-field-icon {
    color: var(--primary);
    font-size: 0.95rem;
}

/* Sleek Professional Input with Vector Icon */
.input-with-sleek-icon {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-with-sleek-icon input {
    width: 100%;
    padding: 13px 40px 13px 14px;
    background: var(--bg-subtle);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: var(--font-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.input-with-sleek-icon input::placeholder {
    color: var(--text-muted);
    opacity: 0.75;
}

.input-with-sleek-icon input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3.5px var(--primary-glow);
}

.input-with-sleek-icon .input-check-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    opacity: 0.45;
    font-size: 1.05rem;
    pointer-events: none;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.input-with-sleek-icon input:focus + .input-check-icon {
    color: var(--primary);
    opacity: 0.9;
}

/* Subtle, Elegant Sheen (Fintech / iOS Style) */
@keyframes live-sheen-slide {
    0% { transform: translateX(-150%) skewX(-20deg); }
    35%, 100% { transform: translateX(250%) skewX(-20deg); }
}

/* Executive Gradient Button */
.btn-auth-primary {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.32);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

[data-theme="dark"] .btn-auth-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 6px 22px rgba(56, 189, 248, 0.25);
}

.btn-auth-primary:hover {
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.45);
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-auth-primary:active {
    transform: translateY(1px) scale(0.99);
}

.btn-auth-primary i {
    font-size: 1.15rem;
}

.btn-live-sheen {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    pointer-events: none;
    animation: live-sheen-slide 3.5s infinite;
}

.auth-footer-toggle {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-toggle-auth {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 4px;
    transition: opacity 0.2s ease;
}

.btn-toggle-auth:hover {
    opacity: 0.8;
}

/* Student Profile Modal Content */
.student-profile-badge-box {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    text-align: center;
    margin-bottom: 1rem;
}

.profile-big-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 10px auto;
}

.student-profile-badge-box h3 {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.student-profile-badge-box p {
    font-size: 0.84rem;
    color: var(--text-muted);
}

.badge-prof-id {
    color: var(--primary);
    font-weight: 800;
}

.badge-prof-dept {
    color: #38bdf8;
    font-weight: 800;
}

.badge-prof-batch {
    color: var(--success);
    font-weight: 800;
}

/* Responsive */
@media (max-width: 360px) {
    .app-bus-grid {
        grid-template-columns: 1fr;
    }
}
