/* --- ANTIGRAVITY PREMIUM DESIGN SYSTEM --- */
:root {
    /* Base Gradients & Backgrounds */
    --bg-grad-1: #0f172a;
    --bg-grad-2: #1e293b;
    --bg-grad-3: #020617;

    /* Neo-Glass Tokens */
    --glass-bg: rgba(30, 41, 59, 0.65);
    --glass-bg-solid: rgba(30, 41, 59, 0.95);
    /* Fallback for no-blur */
    --glass-border: rgba(255, 255, 255, 0.08);
    /* More subtle border */
    --glass-highlight: rgba(255, 255, 255, 0.03);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    /* Deeper shadow */

    /* Typography */
    --text-main: #f8fafc;
    /* Brighter white for contrast */
    --text-muted: #94a3b8;
    --text-accent: #38bdf8;

    /* Brand Colors */
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.4);
    --primary-gradient: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --secondary-gradient: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    --accent-gradient: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
    --danger-gradient: linear-gradient(135deg, #f87171 0%, #dc2626 100%);

    /* UI Dimensions */
    --radius-lg: 32px;
    /* Increased rounding */
    --radius-md: 24px;
    --radius-sm: 14px;

    /* Animation Speeds */
    --anim-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --anim-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --anim-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
    --bg-grad-1: #f8fafc;
    --bg-grad-2: #e2e8f0;
    --bg-grad-3: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-solid: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(0, 0, 0, 0.06);
    --glass-highlight: rgba(255, 255, 255, 0.8);
    --glass-shadow: 0 10px 40px rgba(148, 163, 184, 0.2);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-accent: #0284c7;
    --primary-glow: rgba(16, 185, 129, 0.25);
}

[data-theme="natural"] {
    /* --- ORGANIC PALETTE --- */
    --bg-grad-1: #FDFCF8;
    /* Soft Paper White */
    --bg-grad-2: #E6E2DE;
    /* Warm Stone */
    --bg-grad-3: #D6D3CD;
    /* Deep Pebble */

    /* Glass Morphism - Organic/Frosted */
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-bg-solid: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(120, 113, 108, 0.15);
    --glass-highlight: rgba(255, 255, 255, 0.8);
    --glass-shadow:
        0 4px 20px rgba(68, 64, 60, 0.06),
        inset 0 0 20px rgba(255, 255, 255, 0.5);

    /* Typography - Earth Tones */
    --text-main: #44403C;
    /* Warm Charcoal */
    --text-muted: #78716C;
    /* Stone Grey */
    --text-accent: #57534E;
    /* Darker Stone */

    /* Brand Colors - Nature Inspired */
    --primary: #65a30d;
    /* Leaf Green */
    --primary-glow: rgba(101, 163, 13, 0.3);
    --primary-gradient: linear-gradient(135deg, #84cc16 0%, #4d7c0f 100%);

    /* Animation Variables */
    --natural-anim-speed: 20s;
}

/* --- NATURAL MODE ANIMATIONS --- */
/* 1. Animated Mesh Gradient Background */
body[data-theme="natural"] {
    background: linear-gradient(-45deg, #FDFCF8, #f0fdf4, #fefce8, #E6E2DE);
    background-size: 400% 400%;
    animation: naturalGradientFlow 20s ease infinite;
    position: relative;
    overflow-x: hidden;
}

/* 2. Floating Organic Orbs (Pseudo-elements) */
body[data-theme="natural"]::before,
body[data-theme="natural"]::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: floatOrb 15s infinite ease-in-out alternate;
}

body[data-theme="natural"]::before {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(163, 230, 53, 0.2), transparent 70%);
    animation-delay: -5s;
}

body[data-theme="natural"]::after {
    bottom: -10%;
    right: -10%;
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, rgba(250, 204, 21, 0.15), transparent 70%);
}

/* 3. Subtle Leaf/Texture Overlay */
body[data-theme="natural"] .main-content::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle noise/texture for paper feel */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

@keyframes naturalGradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(20px, 40px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 10px) scale(0.95);
    }
}

/* Enhancing Cards in Natural Mode */
[data-theme="natural"] .glass-panel,
[data-theme="natural"] .mosque-card,
[data-theme="natural"] .prayer-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 8px 32px rgba(68, 64, 60, 0.05);
    backdrop-filter: blur(12px) saturate(140%);
}

[data-theme="natural"] .icon-btn {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary);
    border-color: rgba(163, 230, 53, 0.3);
}

[data-theme="natural"] .nav-item.active::before {
    background: linear-gradient(135deg, #a3e635 0%, #65a30d 100%);
    box-shadow: 0 8px 20px rgba(101, 163, 13, 0.4);
}

/* Fix for Hero Card in Natural Mode */
[data-theme="natural"] .hero-card {
    background: var(--primary-gradient);
    border: none;
    box-shadow: 0 15px 35px var(--primary-glow);
}

* {
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-grad-1);
    /* Subtle geometric pattern */
    background-image:
        radial-gradient(at 0% 0%, rgba(56, 189, 248, 0.08) 0px, transparent 40%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.08) 0px, transparent 40%);
    background-attachment: fixed;
    color: var(--text-main);
    padding-bottom: calc(110px + env(safe-area-inset-bottom));
    padding-top: env(safe-area-inset-top);
    /* Space for Nav & Safe Areas */
    transition: background 0.5s ease, color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- COMPONENTS --- */

/* Glass Card */
.glass-panel {
    background: var(--bg-grad-2);
    /* Fallback for low-end */
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .glass-panel {
        background: var(--glass-bg);
        /* Standard Glass */
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

.glass-panel:active {
    transform: scale(0.98);
}

/* Header */
header {
    padding: calc(12px + env(safe-area-inset-top)) 20px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    background: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background 0.3s;
}

header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid var(--glass-border);
}

[data-theme="light"] header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.header-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

/* --- SPLASH SCREEN --- */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-grad-1);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease-out, visibility 0.6s;
}

#splashScreen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: scaleIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.splash-logo {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
}

.splash-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.splash-loader {
    margin-top: 20px;
    border-width: 3px;
    border-color: var(--text-muted);
    border-bottom-color: transparent;
}

/* --- BENTO GRID LAYOUT --- */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 24px;
    position: relative;
    z-index: 10;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

.bento-col-span-2 {
    grid-column: span 2;
}

/* Hero Card (Countdown) */
.hero-card {
    padding: 32px 24px;
    text-align: center;
    background: var(--primary-gradient);
    color: white;
    border: none;
    box-shadow: 0 15px 35px var(--primary-glow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.glass-inner-timer {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 28px;
    padding: 12px 30px;
    margin: 8px 0;
    box-shadow: 
        inset 0 0 20px rgba(255, 255, 255, 0.05),
        0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.countdown-timer {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -2px;
    margin: 4px 0;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    background: linear-gradient(to bottom, #ffffff 60%, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: font-size 0.3s ease;
}

.next-prayer-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.85;
    margin-bottom: 2px;
    transition: font-size 0.3s ease;
}

@media (max-width: 480px) {
    .container {
        padding: 16px 20px;
    }
    .hero-card {
        padding: 24px 16px;
    }
    .hero-header {
        gap: 6px;
        margin-bottom: 8px;
    }
    .glass-inner-timer {
        padding: 8px 20px;
        border-radius: 22px;
    }
    .countdown-timer {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }
    .next-prayer-label {
        font-size: 0.7rem;
        letter-spacing: 0.8px;
    }
    .friday-badge {
        font-size: 0.55rem;
        padding: 4px 10px;
        margin-bottom: 2px;
    }
}

@media (max-width: 360px) {
    .countdown-timer {
        font-size: 2.5rem;
    }
}

/* Royal Friday - Professional Glassmorphic Silk Aesthetic */
.hero-card.friday-royal {
    background: #064e3b; /* Fallback */
    background: 
        radial-gradient(circle at 0% 0%, #064e3b 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, #059669 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, #10b981 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, #065f46 0%, transparent 50%),
        linear-gradient(135deg, #064e3b 0%, #059669 100%);
    background-size: 200% 200%;
    animation: fridayMeshFlow 15s ease infinite alternate;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(6, 78, 59, 0.5);
    position: relative;
    overflow: hidden;
}

@keyframes fridayMeshFlow {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.hero-card.friday-royal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.05) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 20%);
    pointer-events: none;
    z-index: 1;
}

.friday-badge {
    position: relative;
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 800;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 10;
    transition: all 0.5s ease;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.friday-badge.hidden {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

.friday-badge.hidden {
    display: none;
    opacity: 0;
    transform: translateY(-10px);
}

@keyframes fridayElegantFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Wisdom Card - Premium Minimalist Emerald Aesthetic */
.info-card {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--anim-smooth);
    grid-column: 1 / 3 !important;
    width: 100% !important;
    box-shadow: var(--glass-shadow), 0 4px 12px rgba(16, 185, 129, 0.05);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at -20% 50%, rgba(16, 185, 129, 0.1), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="light"] .info-card {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.03);
}

[data-theme="natural"] .info-card {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--primary);
}

.info-card:hover {
    transform: translateY(-2px);
    background: var(--glass-bg-solid);
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.08), var(--glass-shadow);
}

.wisdom-bg-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%) rotate(-10deg);
    font-size: 5rem;
    opacity: 0.02;
    color: var(--primary);
    pointer-events: none;
    z-index: 0;
}

.info-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.6;
    text-transform: uppercase;
    margin-bottom: 14px;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-label::after {
    content: '';
    height: 1px;
    width: 20px;
    background: var(--primary);
    opacity: 0.2;
}

.wisdom-text {
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-main);
    font-style: italic;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.wisdom-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 5px;
    position: relative;
    z-index: 1;
}

.wisdom-source {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.share-wisdom-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--anim-smooth);
}

.share-wisdom-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.share-wisdom-btn:active {
    transform: scale(0.9);
}

/* --- PROFESSIONAL FLOATING SEARCH BAR --- */
.search-floating-bar {
    margin: -15px 0 25px 0;
    position: sticky;
    top: 72px; /* Adjusted to sit perfectly below the header */
    z-index: 90;
    padding: 0 2px;
}

.search-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 6px;
}

.v-separator {
    width: 1px;
    height: 20px;
    background: var(--glass-border);
    margin: 0 6px;
    opacity: 0.5;
}

.gps-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--primary-gradient);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 6px 15px var(--primary-glow);
    transition: var(--anim-bounce);
}

.gps-btn-icon:active {
    transform: scale(0.9);
}

.voice-btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s var(--anim-smooth);
}

.voice-btn-icon:hover {
    background: rgba(56, 189, 248, 0.15);
    color: var(--text-accent);
    border-color: rgba(56, 189, 248, 0.3);
}

.voice-btn-icon:active {
    transform: scale(0.9);
}

.voice-btn-icon.listening {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.4);
    animation: pulseRecording 1.5s infinite;
}

@keyframes pulseRecording {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}


.search-pill-wrapper {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-top: 1px solid var(--glass-highlight);
    border-radius: 22px;
    padding: 6px;
    transition: all 0.4s var(--anim-smooth);
    display: flex;
    align-items: center;
    box-shadow: var(--glass-shadow);
    z-index: 50;
}

.search-pill-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15), 0 0 0 4px rgba(16, 185, 129, 0.1);
    background: var(--glass-bg-solid);
    transform: translateY(-2px);
}

.search-icon-box {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 4px;
}

.search-input-modern {
    flex: 1;
    min-width: 0;
    /* Fix for flex child overflow */
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-weight: 500;
    padding: 0 16px;
    font-size: 0.95rem;
    height: 100%;
}

.clear-search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0 16px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.clear-search-btn:hover {
    color: var(--text-main);
}

.search-pill-wrapper {
    z-index: 50; /* Ensure dropdown is above rest */
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--glass-bg-solid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    overflow: hidden;
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    animation: fadeDown 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    color: var(--text-main);
    transition: background 0.2s;
    border-bottom: 1px solid var(--glass-border);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover, .suggestion-item.active {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .suggestion-item:hover, [data-theme="light"] .suggestion-item.active {
    background: rgba(0, 0, 0, 0.04);
}

.suggestion-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.suggestion-main {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-message {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- UPDATED MOSQUE CARD --- */
.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 35px 0 15px 5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mosque-card {
    padding: 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border-radius: 24px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    transition: all 0.3s var(--anim-smooth);
}

.mosque-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.mc-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-muted);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.mosque-card:hover .mc-icon-wrapper {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

.mc-info {
    flex: 1;
    min-width: 0;
    /* Allow truncation */
}

.m-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.m-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dist-badge {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mosque-card:hover .dist-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.2);
}

.mc-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    transition: 0.3s;
}

.mosque-card:hover .mc-arrow {
    background: white;
    color: var(--primary);
    transform: translateX(3px);
}

/* Prayer Times List - Modern Cards */
.prayer-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Increased gap */
    margin-top: 25px;
    padding-bottom: 80px;
    /* Extra scroll space for phone */
}

.prayer-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    /* Slightly rounder */
    padding: 22px 24px;
    /* Larger padding for touch */
    display: flex;
    align-items: center;
    gap: 20px;
    /* More spacing */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.prayer-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.prayer-card.active {
    background: rgba(16, 185, 129, 0.12);
    /* Stronger highlight */
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.15);
    transform: scale(1.02);
    /* Slight pop */
}

.prayer-card.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    /* Thicker indicator */
    background: #10b981;
}

/* Icon Wrapper */
.pc-icon-wrapper {
    width: 56px;
    /* Larger icon box */
    height: 56px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    /* Larger icon */
    color: var(--text-muted);
    flex-shrink: 0;
}

.prayer-card.active .pc-icon-wrapper {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Info Layout */
.pc-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pc-name {
    font-size: 1.25rem;
    /* Larger prayer name */
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    min-width: 80px;
}

.pc-times {
    display: flex;
    gap: 24px;
    /* More space between times */
    text-align: right;
}

.time-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Fix for shifted labels */
}

.time-group .label {
    font-size: 0.75rem;
    /* More readable label */
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.time-group .time {
    font-size: 1.15rem;
    /* Larger adhaan time */
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Highlight Iqamah */
.time-group.highlight .time {
    font-size: 1.5rem;
    /* Significantly larger Iqamah */
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.prayer-card.active .time-group.highlight .time {
    color: var(--primary);
}

/* Bottom Nav - Premium Floating Dock */
.bottom-nav {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 85%;
    max-width: 320px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    padding: 6px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    /* iOS Safe Area Support */
    border-radius: 40px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 2px 4px rgba(255, 255, 255, 0.08) inset;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] .bottom-nav {
    background: rgba(255, 255, 255, 0.9);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.03) inset;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    flex: 1;
    height: 50px;
    border-radius: 40px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.nav-item:hover {
    transform: translateY(-2px);
}

.nav-icon {
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    line-height: 1;
    z-index: 2;
    opacity: 1;
    color: inherit;
}

.nav-label {
    font-size: 0.6rem;
    font-weight: 700;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: absolute;
    bottom: 8px;
    z-index: 2;
    letter-spacing: 0.3px;
}

/* Active State - Luminous Pill */
.nav-item.active {
    color: white;
}

.nav-item.active .nav-icon {
    transform: translateY(-4px) scale(1.1);
    opacity: 1;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
}

.nav-item.active .nav-label {
    opacity: 1;
    transform: translateY(0);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 42px;
    background: var(--primary-gradient);
    border-radius: 40px;
    z-index: 1;
    box-shadow:
        0 8px 24px var(--primary-glow),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    animation: morphIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes morphIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
        border-radius: 50%;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        border-radius: 40px;
    }
}

/* Malayalam Scoped Layout Fixes */
html[lang="ml"] .nav-item.active::before {
    width: 68px;
}
html[lang="ml"] .nav-label {
    font-size: 0.55rem;
    letter-spacing: -0.2px;
}
html[lang="ml"] .bottom-nav {
    padding: 6px 2px;
    width: 95%;
    max-width: 380px;
}
html[lang="ml"] #dailyWisdom {
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
html[lang="ml"] .action-btn {
    font-size: 0.9rem !important; /* Prevent button text overlapping icon */
    letter-spacing: -0.2px;
}

/* Search Input */
.search-wrapper {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0 18px;
    display: flex;
    align-items: center;
    height: 60px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
}

/* Floating Button */
.btn-float {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--text-main);
    color: var(--bg-grad-1);
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 900;
    transition: 0.3s var(--anim-bounce);
}

.btn-float:hover {
    transform: scale(1.1);
}

/* --- UTILITIES & ANIMATIONS --- */
.hidden {
    display: none !important;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid var(--text-muted);
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: rgba(255, 255, 255, 0.08);
    /* Lighter skeleton */
    border-radius: 6px;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        opacity: 0.5;
    }
}

.action-btn {
    width: 100%;
    border: none;
    padding: 16px;
    border-radius: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
}

.btn-p {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-s {
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-report {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.7s var(--anim-smooth) forwards;
    opacity: 1;
    /* Guaranteed visibility */
}

.animate-scale-in {
    animation: scaleIn 0.6s var(--anim-smooth) forwards;
    opacity: 0;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(40px) saturate(180%);
    border-top-left-radius: 32px;
    border-top-right-radius: 32px;
    padding: 24px;
    padding-bottom: 60px;
    z-index: 2000;
    transition: cubic-bezier(0.19, 1, 0.22, 1) 0.5s;
    box-shadow: 0 -10px 50px rgba(0, 0, 0, 0.3);
}

.bottom-sheet.active {
    bottom: 0;
}

.sheet-handle {
    width: 50px;
    height: 5px;
    background: var(--text-muted);
    border-radius: 10px;
    margin: 0 auto 30px;
    opacity: 0.3;
}

.sheet-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s;
    cursor: pointer;
}

.sheet-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* Toast */
#toast {
    visibility: hidden;
    min-width: 250px;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    text-align: center;
    border-radius: 50px;
    padding: 16px 24px;
    position: fixed;
    z-index: 3000;
    left: 50%;
    bottom: 100px;
    transform: translateX(-50%);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        bottom: 50px;
        opacity: 0;
    }

    to {
        bottom: 100px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 100px;
        opacity: 1;
    }

    to {
        bottom: 50px;
        opacity: 0;
    }
}

.setting-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.setting-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.settings-group {
    margin-bottom: 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.status-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-alert {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.65rem;
    border: 1px solid rgba(239, 68, 68, 0.3);
    display: inline-flex;
    align-items: center;
}

/* Modern Settings Cards */
.setting-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s;
}

[data-theme="light"] .setting-card {
    background: rgba(0, 0, 0, 0.02);
}

.setting-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .setting-card:hover {
    background: rgba(0, 0, 0, 0.04);
}

.setting-label-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* Segmented Control */
.segmented-control {
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 14px;
    display: grid;
    gap: 4px;
    position: relative;
}

[data-theme="light"] .segmented-control {
    background: rgba(0, 0, 0, 0.06);
}

.segmented-control[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr 1fr;
}

.segmented-control:not([style*="grid-template-columns"]) {
    grid-template-columns: 1fr 1fr 1fr;
}

.segment-btn {
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.segment-btn:hover {
    color: var(--text-main);
}

.segment-btn.active {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: translateY(-1px);
}

[data-theme="light"] .segment-btn.active {
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--glass-border);
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked+.slider {
    background: var(--primary-gradient);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

.custom-select {
    appearance: none;
    background: var(--glass-bg);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 8px 30px 8px 12px;
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
    font-weight: 600;
    /* Custom Arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right .7em top 50%;
    background-size: .65em auto;
}

/* --- MOBILE RESPONSIVENESS IMPROVEMENTS --- */
@media (max-width: 480px) {
    .segment-btn {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .prayer-card {
        padding: 14px 16px;
        /* More compact padding */
        gap: 12px;
    }

    .pc-icon-wrapper {
        width: 42px;
        /* Smaller icon */
        height: 42px;
        font-size: 1.1rem;
        border-radius: 14px;
    }

    .pc-info {
        gap: 8px;
        flex-wrap: wrap;
        /* Allow wrapping for reading style */
    }

    .pc-name {
        font-size: 1.1rem;
        min-width: unset;
        width: 100%;
        /* Full width for stacked view */
        margin-bottom: 4px;
        margin-right: 0;
    }

    .pc-times {
        gap: 24px;
        width: 100%;
        justify-content: flex-start;
        /* Align times to start */
    }

    .time-group .label {
        font-size: 0.65rem;
        margin-bottom: 2px;
    }

    .time-group .time {
        font-size: 1rem;
    }

    .time-group.highlight .time {
        font-size: 1.3rem;
    }

    /* Ensure list is fully visible above nav */
    .prayer-list {
        padding-bottom: 120px;
    }
}

.link-status-text {
    font-size: 0.8rem;
    margin-top: -10px;
    margin-bottom: 15px;
    margin-left: 5px;
    height: 1.2em;
    /* Reserve space */
    color: var(--primary);
    /* Uses your existing green variable */
    font-weight: 500;
}

.link-status-text.error {
    color: #ef4444;
}

/* ERROR ANIMATION */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

.shake-error {
    animation: shake 0.4s ease-in-out;
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.3) !important;
}

/* --- ADMIN PANEL INPUTS --- */
.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05); /* Glass bg */
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    outline: none;
    transition: 0.3s;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.custom-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05); /* Glass bg */
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    appearance: none; /* Remove default arrow */
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2394a3b8%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

.custom-select:focus {
    border-color: var(--primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-select option {
    background: #1e293b;
    color: #fff;
}
[data-theme="light"] .custom-select option {
    background: #fff;
    color: #000;
}

/* --- EXTRA-SMALL MOBILE FIXES --- */
@media (max-width: 400px) {
    .container {
        padding: 16px;
    }
    .search-card-modern {
        padding: 16px;
        gap: 12px;
    }
    .gps-btn-modern {
        padding: 12px;
        font-size: 0.82rem;
    }
    .search-input-modern {
        padding: 0 10px;
        font-size: 0.82rem;
    }
    .search-icon-box {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    .clear-search-btn {
        padding: 0 10px;
        font-size: 1rem;
    }
    .suggestion-item {
        padding: 12px 14px;
        gap: 10px;
    }
    .suggestion-icon {
        width: 32px;
        height: 32px;
    }
}
/* FAIL-SAFE LAYOUT FIXES */
.full-width-fix {
    grid-column: 1 / 3 !important;
    width: 100% !important;
    display: flex !important;
}