* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: #F8FAFC; color: #1E293B; min-height: 100vh; overflow-x: hidden; }

:root { --primary: #7C3AED; --primary-dark: #6D28D9; --primary-light: #DDD6FE; --secondary: #64748B; --dark: #0F172A; --white: #FFFFFF; --success: #10B981; --danger: #EF4444; --warning: #F59E0B; --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); --glass-bg: rgba(255, 255, 255, 0.9); }

.toast-container { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; width: 90%; max-width: 400px; }
.toast { background: #333; color: white; padding: 16px 24px; border-radius: 12px; box-shadow: 0 15px 30px rgba(0,0,0,0.2); font-size: 14px; font-weight: 500; display: flex; align-items: flex-start; gap: 12px; opacity: 0; transform: translateY(50px); transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); pointer-events: auto; line-height: 1.4; }
.toast.active { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: #fff; }
.toast i { font-size: 18px; margin-top: 2px; }

.page-section { display: none; padding-top: 80px; min-height: 100vh; animation: fadeInPage 0.5s ease-out; }
#homePage { display: block; }

.passenger-only { display: flex !important; }
.driver-only { display: none !important; }
body.driver-mode .passenger-only { display: none !important; }
body.driver-mode .driver-only { display: flex !important; }

.btn-header { padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: 14px; cursor: pointer; transition: 0.3s; display: flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--secondary); border: 1px solid #E2E8F0; }
.btn-ghost:hover { background: #F8FAFC; color: var(--primary); border-color: var(--primary); transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; box-shadow: 0 4px 6px rgba(124, 58, 237, 0.2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 12px rgba(124, 58, 237, 0.3); }

.btn-cancel-ride { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; margin-left: auto; }
.btn-cancel-ride:hover { background: #fecaca; }
.btn-continue-ride { background: #F1F5F9; color: var(--dark); border: 1px solid #E2E8F0; }
.btn-continue-ride:hover { background: #E2E8F0; }

.loading-spinner { border: 3px solid #F1F5F9; border-top: 3px solid var(--primary); border-radius: 50%; width: 20px; height: 20px; animation: spin 0.8s linear infinite; margin-left: auto; display: none; }

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes shake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-5px); } 100% { transform: translateX(0); } }
@keyframes fadeInPage { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes zoomIn { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes expandLine { from { width: 0; } to { width: 150px; } }

#gosaathLoader { position: fixed; width: 100%; height: 100%; background: linear-gradient(135deg, #0F172A, #7C3AED); display: flex; align-items: center; justify-content: center; z-index: 99999; transition: opacity 0.8s ease; }
.loader-inner { text-align: center; }
.loader-text { font-size: 60px; font-weight: 900; color: white; letter-spacing: 3px; animation: zoomIn 1.2s ease forwards; }
.loader-underline { width: 0; height: 4px; background: white; margin: 15px auto 0; animation: expandLine 1.5s ease forwards; }

/* =========================================
   🟢 PREMIUM GOSAATH INTRO LOADER (GLASSY & BIG)
========================================= */
#gosaathLoader { 
    position: fixed; 
    top: 0; left: 0; width: 100vw; height: 100vh; 
    background: linear-gradient(135deg, #2E1065 0%, #7C3AED 50%, #4C1D95 100%); 
    display: flex; align-items: center; justify-content: center; 
    z-index: 999999; 
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out; 
}

.loader-inner { 
    display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; max-width: 400px; 
}

.loader-logo { 
    display: block !important;
    width: 220px !important; height: 220px !important; 
    min-width: 220px !important; min-height: 220px !important;
    max-width: 220px !important; max-height: 220px !important;
    object-fit: contain !important; margin: 0 auto 24px auto !important; 
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important;
    border: 2px solid rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important; padding: 20px !important; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.4), inset 0 0 20px rgba(255,255,255,0.4) !important;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7)) !important;
    opacity: 0; transform: translateY(20px) scale(0.9); 
    animation: logoEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; 
}

.loader-text { 
    font-size: 42px; font-weight: 900; color: white; letter-spacing: 6px; margin: 0; text-transform: uppercase;
    opacity: 0; text-shadow: 0 4px 15px rgba(0,0,0,0.3); transform: translateY(15px);
    animation: textEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s forwards; 
}

.loader-underline { 
    width: 0; height: 4px; background: rgba(255, 255, 255, 0.9); border-radius: 4px; margin-top: 15px; 
    box-shadow: 0 0 10px rgba(255,255,255,0.5); 
    animation: lineEntrance 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.6s forwards; 
}

@keyframes logoEntrance { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes textEntrance { to { opacity: 1; transform: translateY(0); } }
@keyframes lineEntrance { to { width: 140px; opacity: 1; } }

/* Scales down beautifully for Mobile Phones */
@media screen and (max-width: 768px) {
    .loader-logo {
        width: 160px !important; height: 160px !important;
        min-width: 160px !important; min-height: 160px !important;
        max-width: 160px !important; max-height: 160px !important;
        padding: 15px !important; margin-bottom: 20px !important;
    }
    .loader-text { font-size: 32px; letter-spacing: 4px; }
    @keyframes lineEntrance { to { width: 100px; opacity: 1; } }
}
