:root {
    /* Theme Colors (Default: Electric Blue) */
    --primary-color: #00E5FF;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --primary-rgb: 0, 229, 255;

    /* Dark Theme (Default) */
    --bg-color: #121212;
    --surface-color: #1e1e1e;
    --surface-hover: #2a2a2a;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333;
    --danger-color: #ff5252;
    --sidebar-width: 250px;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
    --bg-color: #fcfcfd;
    /* Slightly cleaner white */
    --surface-color: rgba(255, 255, 255, 0.8);
    --surface-hover: rgba(255, 255, 255, 0.9);
    --text-main: #1d1d1f;
    --text-muted: #6e6e73;
    --border-color: rgba(0, 0, 0, 0.08);
    --danger-color: #ff3b30;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #080808;
    /* Deep dark base */
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Premium Aurora Mesh Background */
.bg-mesh {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 30%, rgba(var(--primary-rgb), 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(98, 0, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(var(--primary-rgb), 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 60%, rgba(98, 0, 234, 0.2) 0%, transparent 50%);
    filter: blur(100px);
    animation: auroraMove 30s infinite linear;
    transition: background 1s ease;
}

@keyframes auroraMove {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

[data-theme="light"] .bg-mesh {
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 229, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(98, 0, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 229, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 65%, rgba(98, 0, 234, 0.12) 0%, transparent 50%);
    filter: blur(80px);
}

.app-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.sidebar-header .app-logo {
    width: 40px;
    height: 40px;
}

.nav-toggle,
.theme-toggle {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-toggle {
    display: flex;
}

@media (max-width: 900px) {
    .app-container {
        max-width: 600px;
    }
}

.nav-toggle:hover,
.theme-toggle:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.app-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--primary-glow));
    animation: slowPulse 3s infinite ease-in-out;
}

@keyframes slowPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px var(--primary-glow));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 15px var(--primary-glow));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px var(--primary-glow));
    }
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

[data-theme="dark"] h1 {
    background: linear-gradient(90deg, #fff, #a0a0a0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.controls {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeIn 1s ease-out;
}

/* Search Mode Toggle */
.mode-toggle {
    display: flex;
    background: var(--bg-color);
    border-radius: 10px;
    padding: 0.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.btn-toggle {
    flex: 1;
    padding: 0.75rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-toggle.active {
    background: var(--surface-color);
    color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.search-mode-container {
    display: none;
    animation: fadeIn 0.4s ease;
}

.search-mode-container.active {
    display: block;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input-wrap {
    display: flex;
    gap: 0.5em;
}

.search-input-wrap input {
    flex: 1;
}

.search-btn {
    width: auto;
    padding: 0 1.5rem;
    margin: 0;
}

.voice-search-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0.5rem;
    transition: all 0.2s ease;
}

.voice-search-btn:hover {
    color: var(--primary-color);
}

.voice-search-btn svg {
    width: 20px;
    height: 20px;
}

.voice-search-btn.recording {
    color: #ff4757;
    animation: flashRecording 1s infinite alternate;
}

@keyframes flashRecording {
    from {
        opacity: 1;
        filter: drop-shadow(0 0 5px rgba(255, 71, 87, 0.8));
    }

    to {
        opacity: 0.5;
    }
}

.location-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.location-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: var(--border-color);
    z-index: 1;
}

.location-divider span {
    position: relative;
    z-index: 2;
    background: var(--surface-color);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.location-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.input-group,
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input,
select {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    text-decoration: none;
    padding: 0.75rem;
}

.btn-primary:hover {
    background: #00ffff;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-2px);
}

.results h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.results-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .results-container {
        grid-template-columns: 1.2fr 1fr;
        align-items: start;
    }
}

.map-container {
    height: 400px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    z-index: 1;
    /* Lower than station cards */
}

@media (min-width: 1024px) {
    .map-container {
        height: 600px;
        position: sticky;
        top: 100px;
    }
}

/* Custom Leaflet Dark Theme Styles */
.leaflet-container {
    background: var(--bg-color);
    font-family: inherit;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--surface-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--text-muted);
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: var(--primary-color);
}

.map-popup-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}

.map-popup-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.stations-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 50;
    /* Ensure this is above the map container */
}

.station-card {
    background: rgba(42, 42, 42, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
    overflow: visible;
    /* Ensure buttons pop out if needed */
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

/* Staggered entrance is handled by .staggered-item */

.station-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--primary-glow);
    background: var(--surface-hover);
}

/* Removed blocking pseudo-element */

.station-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.station-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.station-distance {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.station-details {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.detail-value {
    font-weight: 600;
    font-size: 0.95rem;
}

.power-high {
    color: var(--primary-color);
}

.power-low {
    color: #ff5252;
}

/* Station Amenities */
.amenities-list {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.amenity-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
}

.amenity-tag:hover {
    border-color: var(--primary-color);
    color: var(--text-main);
    background: rgba(0, 229, 255, 0.05);
}

/* PWA Install Button */
.pwa-install-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), #0099ff);
    color: #000 !important;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 12px var(--primary-glow);
    white-space: nowrap;
}

.pwa-install-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.pwa-install-btn svg {
    stroke: #000;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    70% {
        transform: scale(1.02);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px var(--primary-glow));
    }

    50% {
        transform: scale(1.1);
        filter: drop-shadow(0 0 15px var(--primary-color));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 8px var(--primary-glow));
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.page-btn {
    background: var(--surface-color);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.page-btn.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Developer Footer Redesign */
.dev-footer {
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.dev-card {
    background: linear-gradient(135deg, var(--surface-color), #252525);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 500px;
    width: 100%;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.dev-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.dev-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.dev-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff, #bbb);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dev-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.dev-photo-wrap {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    position: relative;
    z-index: 2;
}

.dev-contact {
    margin-top: 1rem;
}

.dev-email {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.dev-email:hover {
    background: var(--primary-glow);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

.dev-photo-wrap {
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-img {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    object-fit: cover;
    z-index: 2;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.photo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    z-index: 1;
    animation: pulse 3s infinite;
}

@media (max-width: 500px) {
    .dev-card {
        flex-direction: column-reverse;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    z-index: 2000;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: var(--text-main);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-item:hover {
    background: var(--surface-hover);
    color: var(--primary-color);
}

.sidebar-item svg {
    width: 20px;
    height: 20px;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 0 1rem;
}

.nav-link {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }
}

/* Sidebar Tool - Charger Finder */
.sidebar-tool {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.sidebar-tool h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.sidebar-tool p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.finder-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.finder-inputs select {
    width: 100%;
    padding: 0.6rem;
    font-size: 0.85rem;
    background: var(--bg-color);
}

.finder-result {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border-color);
    display: none;
    animation: fadeIn 0.3s ease;
}

.finder-result.active {
    display: block;
}

.result-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.recommended-value {
    background: var(--primary-glow);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid var(--primary-color);
}

/* Light Mode specific tweaks */
[data-theme="light"] h1 {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--text-main);
}

/* Responsive */
/* AI Chatbot */
.chatbot-fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3), 0 0 20px var(--primary-glow);
    z-index: 3000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: floatingFAB 4s ease-in-out infinite;
}

@keyframes floatingFAB {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0);
    }
}

.chatbot-fab:hover {
    transform: scale(1.1);
}

.chatbot-fab svg {
    width: 28px;
    height: 28px;
}

.chat-window {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 380px;
    height: 600px;
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 2999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    overflow: hidden;
}

.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: var(--primary-color);
    color: #000;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.15rem;
}

.chat-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: brightness(0);
}

.chat-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    color: #000;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(0, 0, 0, 0.2);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scroll-behavior: smooth;
}

/* Custom Scrollbar for Chat */
.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    padding: 0.85rem 1.1rem;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: messageIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.user {
    align-self: flex-end;
    background: var(--primary-color);
    color: #000;
    border-bottom-right-radius: 4px;
}

.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.message.bot strong {
    color: var(--primary-color);
}

.message.bot ul,
.message.bot ol {
    margin: 0.5rem 0 0.5rem 1.2rem;
    padding: 0;
}

/* Thinking Indicator */
.thinking {
    display: flex;
    gap: 0.3rem;
    padding: 10px 15px !important;
}

.thinking .dot {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.4;
    animation: thinkingDot 1.4s infinite ease-in-out;
}

.thinking .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinkingDot {

    0%,
    80%,
    100% {
        transform: scale(0.5);
        opacity: 0.4;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Suggestion Chips */
.suggestion-chips {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem 1rem 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.suggestion-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.chat-input-area {
    padding: 1.25rem 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#chat-input:focus {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

#chat-send {
    background: var(--primary-color);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chat-send:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 15px var(--primary-glow);
}

#chat-send svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .app-container {
        padding: 1rem 1rem;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
    }

    .desktop-nav {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .location-inputs {
        grid-template-columns: 1fr;
    }

    .stations-grid {
        grid-template-columns: 1fr;
    }

    .search-input-wrap {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .app-logo {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }

    .sidebar.open {
        left: 0;
    }

    .card,
    .station-card {
        padding: 1rem;
    }

    .station-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .chat-window {
        width: 100vw;
        right: 0;
        bottom: 0;
        height: 100%;
        border-radius: 0;
    }

    .chat-window.open {
        transform: translateY(0);
    }
}

/* Theme Presets */
.theme-customization {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    animation: fadeIn 0.8s ease-out;
}

.theme-customization h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-weight: 700;
}

.color-presets {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.color-swatch:hover {
    transform: scale(1.2);
}

.color-swatch.active {
    border-color: #fff;
    transform: scale(1.1);
}

[data-theme="light"] .color-swatch.active {
    border-color: #1d1d1f;
}

/* --- Station Details Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Slightly darker for better focus */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 5000;
    /* Ensure it's above everything */
    display: none;
    /* Changed from flex/opacity combo to simple display for reliability */
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow: hidden;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    /* Reduced a bit for safety */
    border-radius: 28px;
    /* Softer corners */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--primary-color);
    color: #000;
    transform: rotate(90deg);
}

/* Modal Gallery */
.modal-gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 250px;
    background: #111;
    border-bottom: 1px solid var(--border-color);
}

.modal-gallery img {
    height: 100%;
    min-width: 100%;
    object-fit: cover;
    scroll-snap-align: start;
}

/* Modal Body */
.modal-body {
    padding: 2rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin: 0;
    color: var(--text-main);
    line-height: 1.2;
}

.modal-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.spec-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Amenities */
.modal-amenities h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.amenities-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.amenity-tag {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

@media (max-width: 600px) {
    .modal-overlay {
        padding: 0;
        /* Full bleed on small mobile if needed */
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .modal-gallery {
        height: 220px;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-actions {
        flex-direction: column;
        padding: 0 1.5rem 1.5rem;
    }
}

/* --- Favorites Feature --- */
.fav-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    color: var(--text-muted);
}

.fav-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.6);
}

.fav-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.fav-btn.active {
    border-color: var(--primary-color);
    background: rgba(0, 0, 0, 0.8);
}

.fav-btn.active svg {
    fill: var(--primary-color);
    stroke: var(--primary-color);
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

.station-card {
    position: relative;
    /* Ensure the absolute fav-btn positions relative to this */
}

/* Ensure header text doesn't overlap the heart button */
.station-header {
    padding-right: 2.5rem;
}

/* Sidebar Favorite Mini Cards */
.fav-mini-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.fav-mini-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
}

.fav-mini-info {
    display: flex;
    flex-direction: column;
}

.fav-mini-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.2rem;
}

.fav-mini-power {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.fav-mini-nav {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.fav-mini-nav:hover {
    background: var(--primary-color);
    color: #000;
}

/* --- Community Reviews --- */
.review-snippet {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.review-author {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.review-stars {
    color: #FFD700;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.review-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

#rating-input-stars span {
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

#rating-input-stars span:hover,
#rating-input-stars span.active {
    color: #FFD700 !important;
    transform: scale(1.2);
}

/* --- Route Savings Estimator --- */
.savings-card {
    background: linear-gradient(145deg, rgba(57, 255, 20, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    animation: fadeIn 0.5s ease-out;
}

.savings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.savings-title {
    font-weight: 700;
    color: var(--text-main);
}

.savings-distance {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.savings-split {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cost-item {
    display: flex;
    flex-direction: column;
}

.cost-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.cost-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.ev-cost {
    color: var(--primary-color);
}

.petrol-cost {
    color: #ff4757;
}

.savings-total {
    background: rgba(57, 255, 20, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label {
    color: #39FF14;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.total-value {
    color: #39FF14;
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(57, 255, 20, 0.3);
}

/* Trip Planner Stop Styles */
.trip-stops-container {
    margin-top: 1.5rem;
}

.trip-stop-card {
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.stop-indicator {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.stop-info {
    flex: 1;
}

.stop-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

.stop-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stop-tag {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Station Popularity & Status Badges */
.popular-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: bounceSlow 3s infinite;
}

@keyframes bounceSlow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

.station-meta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
}

.status-badge.working {
    color: #39FF14;
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.status-badge.unknown {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.distance-badge {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.75rem;
}

/* --- Phase 8: Liquid Animation Engine --- */
@keyframes liquidPop {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(40px);
        filter: blur(10px);
    }

    50% {
        opacity: 1;
        transform: scale(1.1) translateY(-10px);
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes bubbleBurst {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(20px);
    }

    60% {
        opacity: 1;
        transform: scale(1.02) translateY(-5px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes blobGlow {
    0% {
        filter: drop-shadow(0 0 5px var(--primary-glow));
    }

    50% {
        filter: drop-shadow(0 0 15px var(--primary-color));
    }

    100% {
        filter: drop-shadow(0 0 5px var(--primary-glow));
    }
}

/* Organic Staggered Entrance (No container filter to avoid click blocking) */
.staggered-item {
    animation: liquidPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
    will-change: transform, opacity, filter;
    pointer-events: auto;
}

/* Organic Card Interaction */
.station-card {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.5s ease,
        border-color 0.4s ease;
    border-radius: 20px;
    pointer-events: auto;
}

.station-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 229, 255, 0.2);
    border-color: var(--primary-color);
}

/* Liquid Primary Buttons (Supercharged) */
.btn-primary,
.btn-secondary {
    border-radius: 50px;
    transition: border-radius 0.4s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    cursor: pointer !important;
    pointer-events: auto !important;
    z-index: 100;
    /* Extremely high to avoid click blockage */
    position: relative;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px var(--primary-glow);
}

.station-card {
    background: rgba(42, 42, 42, 0.3);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 51;
}

/* Blob Markers */
.marker-dot {
    background-color: var(--primary-color);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 15px var(--primary-color);
    animation: blobGlow 2s infinite ease-in-out;
}

/* Bubble Modal Transition */
#station-modal .modal-content {
    transition: none;
    /* Handled by animation */
}

#station-modal.active .modal-content {
    animation: bubbleBurst 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Skeleton Liquid Shimmer */
.skeleton {
    background: linear-gradient(90deg, var(--surface-color) 25%, var(--surface-hover) 50%, var(--surface-color) 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite linear;
    border-radius: 15px;
}

/* ===== Header Actions ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-btn {
    padding: 0.5rem 1.25rem;
    background: var(--primary-color);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 12px var(--primary-glow);
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px var(--primary-glow);
}

/* ===== Route Cost Estimator ===== */
.route-cost-section {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.8s ease-out;
}

[data-theme="light"] .route-cost-section {
    background: rgba(255, 255, 255, 0.6);
}

.route-cost-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.route-cost-header svg {
    color: var(--primary-color);
    filter: drop-shadow(0 0 8px var(--primary-glow));
    flex-shrink: 0;
}

.route-cost-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

.section-badge {
    background: var(--primary-color);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.route-cost-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.route-cost-body {
    position: relative;
}

.route-cost-inputs {
    display: grid;
    gap: 1rem;
}

.route-cost-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .route-cost-row {
        grid-template-columns: 1fr;
    }
}

.route-cost-result {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 600px) {
    .route-cost-result {
        grid-template-columns: 1fr;
    }
}

.rc-result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.rc-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.rc-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.rc-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.rc-ev .rc-value {
    color: var(--primary-color);
}

.rc-petrol .rc-value {
    color: var(--danger-color);
}

.rc-savings .rc-value {
    color: #39FF14;
}

/* Sign-in gate overlay */
.route-cost-gate {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.5s, transform 0.5s;
}

.route-cost-gate.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
}

.gate-inner {
    text-align: center;
    padding: 2rem;
}

.gate-inner svg {
    color: var(--primary-color);
    filter: drop-shadow(0 0 15px var(--primary-glow));
    margin-bottom: 1rem;
}

.gate-inner h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.gate-inner p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.rc-signin-btn {
    padding: 0.75rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    box-shadow: 0 0 20px var(--primary-glow) !important;
}

/* ===== Auth Modal ===== */
.auth-modal {
    max-width: 420px;
    width: 100%;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    text-align: center;
}

.auth-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--primary-color), #fff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.social-auth {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.social-btn svg {
    width: 20px;
    height: 20px;
}

.social-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.social-btn.google:hover {
    box-shadow: 0 0 15px rgba(66, 133, 244, 0.3);
}

.social-btn.facebook:hover {
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.3);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
}

.auth-form {
    display: grid;
    gap: 1.25rem;
    text-align: left;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    transition: border-color 0.3s;
}

.auth-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 10px var(--primary-glow);
}

.auth-submit {
    margin-top: 0.5rem;
    font-weight: 700;
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--danger-color);
}