/* Self-hosted font — eliminates render-blocking Google Fonts request */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans.woff2') format('woff2');
    font-weight: 300 800;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #000000;
    --surface: rgba(15, 23, 42, 0.95);
    --surface-2: rgba(30, 41, 59, 1);
    --accent: #3B82F6;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --radius: 24px;
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.is-android-native {
    --safe-area-top: var(--android-safe-area-top, 0px) !important;
}

.is-android-native body,
.is-android-native html {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.is-android-native #proximity-hint-banner,
.is-android-native #stale-data-banner {
    margin-top: 0 !important;
    top: 0 !important;
}

.br-colon {
    color: #F59E0B;
}

.br-meteo {
    color: #3B82F6;
}

html {
    font-size: 16px;
    /* Stable baseline for rem units */
}

/* --- Theme definitions --- */
.theme-amoled {
    --bg: #000000;
    --surface: rgba(15, 23, 42, 0.95);
    --surface-2: rgba(30, 41, 59, 1);
}

.theme-midnight {
    --bg: #020617;
    --surface: rgba(30, 41, 59, 0.95);
    --surface-2: rgba(51, 65, 85, 1);
}

.theme-classic {
    --bg: #1e293b;
    --surface: rgba(51, 65, 85, 0.95);
    --surface-2: rgba(71, 85, 105, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: radial-gradient(circle at 50% -20%, var(--surface-2), var(--bg) 90%);
    background-attachment: fixed;
    color: var(--text);
    padding-bottom: 0;
    user-select: none;
    transition: background 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

/* --- Static Modern Backdrop (Replaced animated mesh for performance) --- */

/* --- View Transitions API Animations --- */
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.3s;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

::view-transition-old(root) {
    animation-name: fade-out;
}

::view-transition-new(root) {
    animation-name: fade-in;
    mix-blend-mode: normal;
}

@keyframes fade-out {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.98);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: scale(1.02);
    }

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

/* Osigurava da zaglavlje ostane stabilno prilikom prelaska */
header {
    view-transition-name: portal-header;
}

/* --- Skeleton Shimmer Animation --- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

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

.skeleton-shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.03) 25%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
    display: inline-block;
    min-width: 40px;
    min-height: 1em;
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

.skeleton-text {
    width: 60px;
    height: 1.2rem;
    margin: 4px 0;
}

.skeleton-value {
    width: 90px;
    height: 3.2rem;
    margin: 8px 0;
    border-radius: 12px;
}

/* Header/Splash Area */
header {
    padding: calc(10px + var(--safe-area-top)) 20px 5px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 800;
}

header p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Main dashboard grid */
.container {
    padding: 5px 20px 110px;
    /* Sufficient bottom padding for fixed nav */
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

html.is-native-app .container {
    padding-bottom: calc(120px + var(--safe-area-bottom, 0px)) !important;
}

.map-view-transition {
    view-transition-name: portal-content;
    padding: 0;
    margin: 0;
    height: 100%;
}

.aqi-mini-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
}

.kpi-aqi {
    transition: background 0.5s ease, border-color 0.5s ease;
}

@media (max-width: 400px) {
    .aqi-mini-badge {
        font-size: 0.6rem;
        padding: 2px 6px;
    }
}

.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    margin-top: 2px;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.kpi-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.01) 40%, rgba(0, 0, 0, 0.25) 100%), var(--surface);
    border-radius: var(--radius);
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    /* Simulated glass bevel highlight */
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 1;
    min-width: 0;
}

/* Removed card entry stagger animations for exact Android layout persistence */

.kpi-card:not(.full-width) {
    min-height: 5.8rem;
    /* Ensures symmetry between Humidity, Rain, etc. */
    justify-content: space-between;
}

.full-width {
    grid-column: span 2;
}

.kpi-icon {
    width: clamp(30px, 4.5vh, 40px);
    height: clamp(30px, 4.5vh, 40px);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.kpi-card:hover .kpi-icon {
    background: var(--accent-glow);
    border-color: var(--accent);
    transform: scale(1.1) rotate(3deg);
    box-shadow: 0 0 20px var(--accent-glow);
}

.kpi-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    width: 100%;
}


/* â”€â”€ NOTIFICATIONS â”€â”€ */
.notification-wrapper {
    position: relative;
    display: inline-flex;
}

.icon-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    color: #fff;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex-shrink: 0;
}

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

.icon-btn svg {
    width: 22px;
    height: 22px;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

.notif-badge {
    display: none !important;
    /* Replaced by bell pulsing animation */
}

@keyframes bell-pulse-red {
    0% {
        color: inherit;
        transform: scale(1);
    }

    50% {
        color: #EF4444;
        transform: scale(1.15);
        filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
    }

    100% {
        color: inherit;
        transform: scale(1);
    }
}

#notification-bell.has-new svg {
    animation: bell-pulse-red 1.5s infinite;
}

.menu-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: #EF4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #0D1629;
    padding: 0 4px;
    animation: pulse-red 2s infinite;
    z-index: 10;
}

/* â”€â”€ CHIP CLOUD STATION SELECTOR â”€â”€ */
.settings-search-wrap {
    margin-bottom: 20px;
    position: relative;
}

.settings-search-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 16px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.settings-search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 15px var(--accent-glow);
}

.station-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.st-chip {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.st-chip.active {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 12px var(--accent-glow);
    transform: translateY(-2px);
}

.st-chip:active {
    transform: scale(0.95);
}

.st-chip.hidden {
    display: none;
}

@keyframes pulse-red-subtle {
    0% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
    }

    50% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
    }

    100% {
        box-shadow: 0 0 8px rgba(239, 68, 68, 0.2);
    }
}

.holiday-active {
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(37, 99, 235, 0.05) 100%) !important;
}

.holiday-badge {
    position: absolute;
    top: 10px;
    right: 15px;

    background: rgba(239, 68, 68, 0.9);

    color: white;
    font-size: 0.45rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    z-index: 20;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulse-blue-urgent {
    0% {
        background: rgba(59, 130, 246, 0.4);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }

    70% {
        background: rgba(59, 130, 246, 0.8);
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        background: rgba(59, 130, 246, 0.4);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.rain-active {
    background: #3B82F6 !important;
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    opacity: 1 !important;
    animation: pulse-blue-urgent 2s infinite !important;
    font-weight: 800 !important;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.notif-panel {
    position: fixed;
    top: env(safe-area-inset-top, 20px);
    margin-top: 60px;
    right: 15px;
    left: 15px;
    background: rgba(13, 22, 41, 0.75);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    z-index: 10000;
    display: none;
    flex-direction: column;
    max-height: 80vh;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateY(-20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.notif-panel.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.notif-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notif-overlay.active {
    display: block;
    opacity: 1;
}

.notif-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notif-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.close-notif {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    position: relative;
    z-index: 10;
}

.close-notif:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.25);
}

.close-notif svg {
    width: 20px;
    height: 20px;
}

.notif-list {
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.topbar-map {
    height: calc(68px + var(--safe-area-top));
    padding: var(--safe-area-top) 16px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1001;
}

.notif-item {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.notif-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08);
}

.notif-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notif-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notif-item.type-info {
    border-left: none;
}

.notif-item.type-info .notif-item-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.notif-item.type-warning .notif-item-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.notif-item.type-danger .notif-item-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
}

.notif-item-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    letter-spacing: -0.2px;
}

.notif-item-body {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

.notif-item-img {
    width: 100%;
    height: 140px;
    border-radius: 12px;
    object-fit: cover;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
}

.notif-badge-new {
    background: var(--accent);
    color: #000;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.notif-item .notif-time {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 10px;
    font-weight: 500;
}

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* â”€â”€ ANIMATIONS â”€â”€ */
@keyframes svg-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes svg-float {

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

    50% {
        transform: translateY(-3px);
    }
}

@keyframes svg-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

@keyframes rain-fall {
    0% {
        transform: translateY(-4px);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(4px);
        opacity: 0;
    }
}

.anim-wind {
    animation: svg-spin var(--wind-speed, 3s) linear infinite;
    will-change: transform;
}

.anim-float {
    animation: svg-float 3s ease-in-out infinite;
    will-change: transform;
}

.anim-pulse {
    animation: svg-pulse 2s ease-in-out infinite;
    will-change: opacity, transform;
}

.anim-rain-drop {
    opacity: 0;
}

.is-raining .anim-rain-drop {
    animation: rain-fall var(--rain-speed, 1s) linear infinite;
}

.anim-lightning {
    opacity: 0;
    transform-origin: center top;
}

.is-stormy .anim-lightning {
    opacity: 1;
}

/* â”€â”€ LIGHTNING FLASH â”€â”€ */
@keyframes lightning-flash {
    0% {
        opacity: 0;
    }

    10% {
        opacity: 0.7;
    }

    15% {
        opacity: 0.2;
    }

    20% {
        opacity: 0.8;
    }

    30% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

.lightning-flash-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}

.lightning-flash-active .lightning-flash-overlay {
    animation: lightning-flash 0.7s ease-out forwards;
}

.lightning-bolt-mini {
    color: #FACC15;
    filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.8));
    animation: lightning-bolt-flicker 2s infinite;
}

@keyframes lightning-bolt-flicker {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }

    55% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.kpi-icon svg {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 0 5px rgba(59, 130, 246, 0.2));
}

/* â”€â”€ DYNAMIC THERMOMETER â”€â”€ */
.temp-scale line {
    transition: stroke-opacity 0.3s ease;
}

.kpi-card:hover .temp-scale line {
    stroke-opacity: 0.5;
}

.therm_frame {
    transition: stroke-opacity 0.3s ease;
}

.kpi-card:hover .therm_frame {
    stroke-opacity: 0.4;
}

.temp-liquid-bulb,
.temp-liquid-tube {
    transition: fill 1.2s ease, transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.2));
    will-change: transform, fill;
}

.temp-icon-container.is-hot {
    animation: heat-wave 2s infinite alternate ease-in-out;
}

@keyframes heat-wave {
    0% {
        filter: drop-shadow(0 0 2px #ef4444);
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 10px #ef4444);
        transform: scale(1.08);
    }
}

/* â”€â”€ DYNAMIC UV SUN â”€â”€ */
.uv-sun-core,
.uv-sun-rays {
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Optimized for stabilization */
}

.uv-icon-container.is-extreme {
    animation: uv-extreme-radiate 1.5s infinite alternate ease-in-out;
}

@keyframes uv-extreme-radiate {
    0% {
        filter: drop-shadow(0 0 5px var(--uv-color));
        transform: scale(1);
    }

    100% {
        filter: drop-shadow(0 0 20px var(--uv-color));
        transform: scale(1.15);
    }
}

/* â”€â”€ RAIN GAUGE INSTRUMENT â”€â”€ */
.rain-card-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.rain-gauge-container {
    width: 20px;
    height: 60px;
    /* Reduced from 80px for symmetry */
    flex-shrink: 0;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    margin-right: 12px;
}

.rain-gauge-glass {
    fill: rgba(255, 255, 255, 0.03);
    stroke: rgba(255, 255, 255, 0.15);
    stroke-width: 1.5;
}

.rain-water-fill {
    fill: url(#rain-grad);
    transition: transform 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom;
    filter: drop-shadow(0 2px 4px rgba(59, 130, 246, 0.4));
    will-change: transform;
}

.rain-gauge-scale {
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 1;
    stroke-dasharray: 2 4;
}

/* â”€â”€ UV RISK METER â”€â”€ */
.uv-meter-container {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 20px;
    height: 80px;
    flex-shrink: 0;
    /* Lock width regardless of text sibling size */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    margin-right: 12px;
}

.uv-meter-segment {
    flex: 1;
    width: 100%;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
    will-change: background, box-shadow;
}

.uv-meter-segment.active[data-level="low"] {
    background: #10B981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.uv-meter-segment.active[data-level="moderate"] {
    background: #F59E0B;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

.uv-meter-segment.active[data-level="high"] {
    background: #F97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
}

.uv-meter-segment.active[data-level="very-high"] {
    background: #EF4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

.uv-meter-segment.active[data-level="extreme"] {
    background: #A855F7;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.uv-risk-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    color: var(--uv-color, #fff);
    transition: color 0.4s ease;
}

/* â”€â”€ HUMIDITY DROPLET â”€â”€ */
.hum-droplet-container {
    width: 35px;
    height: 62px;
    /* Reduced from 80px for symmetry */
    flex-shrink: 0;
    filter: drop-shadow(0 5px 15px rgba(59, 130, 246, 0.4));
    margin-right: 12px;
}

.droplet-glass {
    transition: all 0.4s ease;
}

.hum-status-label,
.rain-status-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    color: #60A5FA;
}

/* â”€â”€ BAROMETER GAUGE â”€â”€ */
.barometer-container {
    width: 60px;
    height: 40px;
    flex-shrink: 0;
    margin-right: 12px;
    margin-bottom: -5px;
    /* Optical alignment for semi-circle */
}

.pres-trend-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.trend-up {
    color: #10B981;
}

/* Stable/Rising (Safe) */
.trend-down {
    color: #F59E0B;
}

/* Falling (Potential change) */

/* â”€â”€ HORIZONTAL BAROMETER SCALE â”€â”€ */
.pres-scale-area {
    position: relative;
    padding: 5px 0 15px;
    width: 100%;
}

.pres-gradient-bar {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right,
            #EF4444 0%,
            /* Stormy */
            #F59E0B 25%,
            /* Rain */
            #10B981 50%,
            /* Change/Normal */
            #3B82F6 75%,
            /* Fair */
            #8B5CF6 100%
            /* Dry */
        );
    opacity: 0.8;
}

.pres-marker {
    position: absolute;
    top: 5px;
    /* Aligned with grad bar top */
    left: 50%;
    /* Dynamic */
    width: 2px;
    height: 10px;
    background: #fff;
    box-shadow: 0 0 8px #fff;
    border-radius: 1px;
    transform: translateX(-50%);
    transition: left 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
    will-change: left;
}

.pres-marker::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid #fff;
}

.pres-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dir-instrument {
    margin-right: 12px;
}

/* â”€â”€ MODERN WIND CARD â”€â”€ */
.wind-card-wide {
    /* Reverted span 2 â€“ kept as 1x1 tile per user request */
    display: flex;
    flex-direction: column;
}

.wind-dual-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
}

.wind-instrument {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.wind-main-val {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wind-footer {
    width: 100%;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
    /* Align footer to the left */
}

.wind-dir-label {
    font-size: 0.55rem;
    /* Reduced font size as requested */
    font-weight: 700;
    color: var(--accent);
    margin-top: 4px;
    display: block;
    opacity: 0.9;
    text-align: left;
}

.picker-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2px;
    padding-right: 8px;
    /* Changed from left to right */
    border-radius: 12px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
    width: auto;
    max-width: clamp(180px, 50vw, 400px);
    /* Sharper limits for multi-device support */
    overflow: visible;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.gps-btn {
    background: rgba(56, 189, 248, 0.1);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.gps-btn:active {
    transform: scale(0.9);
    background: rgba(56, 189, 248, 0.2);
}

.gps-btn.searching {
    animation: gpsSearching 1.5s infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes gpsSearching {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.1);
        filter: brightness(1.5);
        box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

.gps-btn svg {
    width: 20px;
    height: 20px;
}

.icon-windmill,
.icon-compass-mini,
.icon-wind-vane {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.windmill-blades {
    animation: wind-spin var(--wind-speed, 0s) linear infinite;
}

.compass-needle {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

@keyframes wind-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.kpi-label {
    font-size: 0.62rem;
    /* Shrunk for density */
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.kpi-value {
    font-size: clamp(0.9rem, 4.2vw, 1.2rem);
    /* Proportional to width for stability */
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
}

.kpi-value small {
    font-size: clamp(0.6rem, 2.5vw, 0.85rem);
    margin-left: 3px;
    color: rgba(255, 255, 255, 0.6);
    -webkit-text-fill-color: rgba(255, 255, 255, 0.6);
}

/* Primary Temperature - Larger scaling */
#m-temp {
    font-size: clamp(1.4rem, 7vw, 2.3rem);
}

#m-temp small {
    font-size: clamp(0.7rem, 3.5vw, 1rem);
}

/* Humidity Expansion Override if full-width */
.kpi-card.full-width #m-hum {
    font-size: clamp(1.4rem, 4vh, 2.3rem);
}

/* Bottom Nav - Floating Island */
.bottom-nav {
    position: fixed;
    bottom: calc(var(--safe-area-bottom) + 16px);
    left: 16px;
    right: 16px;
    height: 64px;
    background: rgba(13, 22, 41, 0.6);
    /* Restored transparency for glass effect */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 28px;
    /* Smoother corners */
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 4000;
    /* Ensure it stays above all content/ads */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    /* Pronounced floating shadow */
    transition: all var(--transition);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
    /* For active indicator */
}

/* Adjustments for Native App - Lower the nav closer to system bar */
html.is-native-app .bottom-nav {
    bottom: calc(var(--safe-area-bottom, 0px) + 4px) !important;
    border-radius: 24px;
}

html.is-native-app .container {
    padding-bottom: calc(90px + var(--safe-area-bottom, 0px)) !important;
}

.nav-indicator {
    position: absolute;
    bottom: 8px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: 20px;
    z-index: -1;
    transition: all var(--spring);
    pointer-events: none;
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: block !important;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #cbd5e1;
    /* Higher contrast muted color */
    text-decoration: none;
    font-size: 0.68rem;
    /* Slightly larger */
    font-weight: 700;
    /* Bolder for "High Density" clarity */
    gap: 4px;
    transition: color 0.3s, transform 0.2s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    z-index: 1;
    width: 20%;
    /* Flexible width for 5 items */
}

.nav-item:active {
    transform: scale(0.9);
}

.nav-item.active svg {
    stroke: var(--accent);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.8;
    /* Slightly thicker icons for better contrast */
    opacity: 0.85;
    transition: transform var(--spring), stroke 0.3s;
}

/* Notification Badge */
.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #FF3B30;
    /* iOS style red */
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: calc(var(--safe-area-bottom) + 90px);
    left: 20px;
    right: 20px;
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px 20px;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 1900;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    animation: slideUpPWA 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpPWA {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

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

.pwa-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-icon-box {
    width: 40px;
    height: 40px;
    background: var(--accent-glow);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.pwa-text h4 {
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0;
    color: #fff;
}

.pwa-text p {
    font-size: 0.7rem;
    margin: 0;
    color: var(--text-muted);
}

.pwa-install-btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 10px var(--accent-glow);
}

.pwa-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0 0 0 5px;
    cursor: pointer;
}

/* Pull to refresh style logic */
/* Station Picker */
/* Pin Station Component */
.pin-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex-shrink: 0;
}

.pin-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.pin-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text);
}

.pin-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #3B82F6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.pin-btn.active svg {
    fill: currentColor;
    transform: rotate(-45deg);
}

.m-select {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 18px 6px 4px;
    /* Adjusted for left-side button */
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%2394a3b8' stroke-width='3' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 2px center !important;
    background-size: 13px !important;
    cursor: pointer;
    flex: 1;
    min-width: 60px;
    outline: none;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    line-height: normal;
}

.refresh-hint {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 10px;
}

.chart-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
}

/* View Segments Toggle */
.view-switcher {
    display: flex;
    background: var(--surface);
    border-radius: 12px;
    padding: 4px;
    margin: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.view-btn {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 10px;
    border: none;
    background: transparent;
    transition: 0.2s;
}

.view-btn.active {
    background: var(--surface-2);
    color: var(--accent);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Forecast Table for Mobile */
.forecast-table {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: rgba(255, 255, 255, 0.05);
    /* Divider lines effect */
    border-radius: 12px;
    overflow: hidden;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.f-row {
    display: flex;
    align-items: center;
    background: var(--surface-2);
    padding: 12px 10px;
    gap: 8px;
}

.f-row.header {
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 10px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

.f-col-day {
    width: 45px;
    font-weight: 700;
    font-size: 0.8rem;
}

.f-col-icons {
    flex: 1;
    display: flex;
    justify-content: space-around;
    gap: 4px;
    padding: 0 5px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.f-icon-small {
    width: 22px;
    height: 22px;
    opacity: 0.9;
}

.f-icon-small svg {
    width: 100%;
    height: 100%;
}

.f-col-temp {
    width: 55px;
    text-align: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.f-col-rain {
    width: 40px;
    text-align: right;
    color: #60A5FA;
    font-weight: 700;
    font-size: 0.75rem;
}

.f-col-wind {
    width: 45px;
    text-align: right;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Advertisement Placeholder Styles */
.ad-unit-wrapper {
    grid-column: span 2;
    margin: 8px 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    text-align: center;
    width: 100%;
    display: block;
    position: relative;
    overflow: hidden;
}

ins.adsbygoogle {
    display: block !important;
    width: 100% !important;
    min-width: 250px;
    min-height: 60px;
    max-height: 120px;
}

.ad-label {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-content-test {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 700;
}

.ad-sub-test {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Weather Backgrounds - Mesh Gradients */
@keyframes mesh-pulse {
    0% {
        background-position: 0% 50%;
    }

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

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

body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    z-index: -1;
    transition: opacity 1.5s ease;
    background-size: 200% 200%;
    animation: mesh-pulse 15s ease infinite;
}

.bg-sunny::before {
    background:
        radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.1) 0%, transparent 50%),
        var(--bg);
    opacity: 1;
}

.bg-night::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        var(--bg);
    opacity: 1;
}

.bg-rainy::before {
    background:
        radial-gradient(circle at 50% 0%, rgba(30, 64, 175, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(71, 85, 105, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(15, 23, 42, 0.3) 0%, transparent 50%),
        var(--bg);
    opacity: 1;
}

.bg-cloudy::before {
    background:
        radial-gradient(circle at 50% 50%, rgba(31, 41, 55, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 90% 10%, rgba(71, 85, 105, 0.15) 0%, transparent 50%),
        var(--bg);
    opacity: 1;
}

/* Shimmer Loading Effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

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

.loading-shimmer {
    background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.05) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* â”€â”€ PREMIUM SYSTEM â”€â”€ */
.is-premium .ad-unit-wrapper {
    display: none !important;
}

.premium-only {
    display: none;
}

.is-premium .premium-only {
    display: block !important;
}

.is-premium .status-badge-premium {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 100%);
    color: #fff;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

/* â”€â”€ AJAX NAVIGATION & VIEW TRANSITIONS â”€â”€ */
#nav-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #60A5FA, var(--accent));
    background-size: 200% 100%;
    z-index: 10000;
    transition: width 0.4s cubic-bezier(0.1, 0.5, 0.5, 1);
    box-shadow: 0 0 10px var(--accent-glow);
    pointer-events: none;
}

#nav-loading-bar.active {
    animation: loading-shimmer 2s infinite linear;
}

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

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

/* View Transitions API Names */
header {
    view-transition-name: portal-header;
}

.bottom-nav {
    view-transition-name: portal-nav;
}

/* Container Transition */
.container {
    view-transition-name: portal-content;
}

/* Chrome/Safari 18+ View Transition Overrides */
::view-transition-old(portal-content) {
    animation: 250ms cubic-bezier(0.4, 0, 0.2, 1) both fade-out;
}

::view-transition-new(portal-content) {
    animation: 350ms cubic-bezier(0.4, 0, 0.2, 1) both fade-in;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

@keyframes fade-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

/* Fix for fixed elements doubling during transition */
::view-transition-group(portal-header),
::view-transition-group(portal-nav) {
    z-index: 5000;
}

/* Card Entry Micro-animations (Refined) */

/* --- Sync Countdown & Update Time Refinement --- */
.sync-timer-svg {
    width: 12px;
    height: 12px;
    transform: rotate(-90deg);
}

.sync-timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3;
}

.sync-timer-progress {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 63;
    stroke-dashoffset: 63;
    transition: stroke-dashoffset 0.5s linear;
}

#m-update-time-val {
    font-size: 0.65rem !important;
    /* Force smaller font as requested */
    font-weight: 700;
    letter-spacing: 0.3px;
}

.native-ad-v2 {
    width: 100%;
    height: 115px;
    min-height: 115px;
    max-height: 115px;
    margin-top: 10px;
    margin-bottom: 0px;
    /* REMOVED MARGINS TO PREVENT STACKING WHEN HIDDEN */
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: none !important;
    /* HIDDEN BY DEFAULT TO PREVENT FLICKER */
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ONLY SHOW NATIVE ADS WHEN IS-NATIVE CLASS IS ADDED BY JS */
html.is-native .native-ad-v2 {
    display: flex !important;
}

/* --- Global Ad Suppression (Cooldown) --- */
html.ads-suppressed .native-ad-v2,
html.ads-suppressed .native-ad-label,
html.ads-suppressed [id^="native-ad-"],
html.ads-suppressed .ad-unit-wrapper,
html.ads-suppressed .smart-ad-slot,
html.ads-suppressed .local-ad-container,
html.onboarding-active .native-ad-v2,
html.onboarding-active .native-ad-label,
html.onboarding-active [id^="native-ad-"],
html.onboarding-active .ad-unit-wrapper,
html.onboarding-active .smart-ad-slot,
html.onboarding-active .local-ad-container {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ¦¦ PREMIUM AD SUPPRESSION ¦¦ */
html.is-premium .ad-unit-wrapper,
html.is-premium .native-ad-v2,
html.is-premium .smart-ad-slot,
html.is-premium ins.adsbygoogle {
    display: none !important;
}

/* Hide AdSense containers in native app (AdMob is used instead) */
html.is-native-app .ad-unit-wrapper,
html.is-native-app .smart-ad-slot,
html.is-native-app .web-ad-placeholder,
html.is-native-app ins.adsbygoogle,
html.onboarding-active ins.adsbygoogle {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* ── ADSENSE LAYOUT PROTECTION ── */
ins.adsbygoogle {
    background: rgba(255, 255, 255, 0.01);
    border-radius: 12px;
    overflow: hidden;
    max-height: 320px !important;
    /* PREVENT MASSIVE VERTICAL GAPS */
    display: block;
    margin: 0 auto;
}

.ad-unit-wrapper {
    margin: 15px 0;
    width: 100%;
    overflow: hidden;
    min-height: 50px; /* Give it at least some height to allow AdSense to detect it */
    transition: all 0.3s ease;
}

/* --- FORECAST SECTION & BOTTOM SHEET --- */
.forecast-section {
    margin: 20px 0;
    padding: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-left: 5px;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
}

.forecast-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 5px 5px 20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Hide for Firefox */
    -ms-overflow-style: none;
    /* Hide for IE */
}

.forecast-row::-webkit-scrollbar {
    display: none;
    /* Hide for Chrome/Safari */
}

.forecast-card {
    min-width: 90px;
    flex: 0 0 auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%), rgba(13, 22, 41, 0.95);
    /* Removed backdrop-filter due to artifacts on older Android GPUs */
    border-radius: 20px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    scroll-snap-align: start;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transform: translateZ(0); /* Hardware Acceleration */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.forecast-card:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.12);
}

.fc-day {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-date {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    margin-top: -6px;
}

.fc-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0;
}

.fc-icon img,
.fc-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fc-temp {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fc-temp-max {
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
}

.fc-temp-min {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.fc-rain {
    font-size: 0.65rem;
    font-weight: 800;
    color: #60A5FA;
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    margin-top: 4px;
}

/* Bottom Sheet (Forecast Detail) */
.fd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transform: translateZ(0);
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fd-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 1));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 32px 32px 0 0;
    z-index: 10002;
    transform: translateY(100%) translateZ(0.1px);
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 12px 0 calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
}

.fd-sheet.active {
    transform: translateY(0) translateZ(0);
}

.fd-overlay.active {
    display: block;
    opacity: 1;
}

.fd-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 auto 20px;
}

.fd-header {
    padding: 0 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fd-title-wrap h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.fd-title-wrap p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.fd-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fd-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
}

.fd-hourly-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 20px;
}

.fd-hour-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: 45px 1fr 45px 75px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.fdh-time {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.fdh-forecast {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.fdh-icon {
    width: 28px;
    height: 28px;
}

.fdh-desc {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fdh-temp {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    text-align: right;
}

.fdh-extras {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fdh-rain {
    font-size: 0.7rem;
    font-weight: 800;
    color: #60A5FA;
}

.fdh-wind {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
}

.fd-premium-promo {
    padding: 30px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.fd-premium-promo .p-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
    filter: drop-shadow(0 0 15px var(--accent));
}

.fd-premium-promo h3 {
    font-size: 1.2rem;
    font-weight: 800;
}

.fd-premium-promo p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 260px;
    line-height: 1.5;
}

.btn-activate {
    margin-top: 10px;
    background: var(--accent);
    color: #fff;
    padding: 12px 30px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px var(--accent-glow);
}

@media (min-width: 768px) {
    .fd-sheet {
        max-width: 500px;
        left: 50%;
        margin-left: -250px;
        border-radius: 32px 32px 32px 32px;
        bottom: 40px;
        height: auto;
        min-height: 500px;
    }
}

/* Forecast Source Selector */
.forecast-source-selector {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
}

.source-btn {
    padding: 5px 12px;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    border-radius: 7px;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
}

.source-btn.active {
    background: var(--surface-2);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.source-btn:not(.active):hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

@keyframes blink-pnmeteo {
    0%, 100% { 
        background: rgba(59, 130, 246, 0.2); 
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.4);
        color: #fff;
    }
    50% { 
        background: rgba(245, 158, 11, 0.4); 
        box-shadow: 0 0 15px rgba(245, 158, 11, 0.6);
        color: #fff;
        transform: scale(1.05);
    }
}

.source-btn.blink-new {
    animation: blink-pnmeteo 1.2s infinite ease-in-out;
    position: relative;
    z-index: 2;
}

.source-btn.blink-new::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 8px;
    height: 8px;
    background: #EF4444;
    border-radius: 50%;
    border: 1px solid #000;
}

/* --- Utility Classes --- */
/* Skeleton Shimmer Animation */
.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.skeleton-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.08) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmer-wipe 1.5s infinite;
}

@keyframes shimmer-wipe {
    100% {
        transform: translateX(100%);
    }
}

.skeleton-text {
    color: transparent !important;
    display: inline-block;
    vertical-align: middle;
}

.skeleton-value {
    color: transparent !important;
    min-height: 24px;
    min-width: 60px;
    display: inline-block;
    vertical-align: middle;
}

/* Sync Timer Fix */
.sync-timer-svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    overflow: visible;
    transform-origin: center;
    transform: rotate(-90deg);
}

.sync-timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 3.5;
}

.sync-timer-progress {
    fill: none;
    stroke: #3b82f6;
    /* Plava boja */
    stroke-width: 3.5;
    stroke-dasharray: 63;
    stroke-dashoffset: 63;
    transition: stroke-dashoffset 1s linear;
}

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

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

input:checked+.slider {
    background-color: var(--accent);
}

input:focus+.slider {
    box-shadow: 0 0 1px var(--accent);
}

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

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* --- Station Picker Bottom Sheet --- */
.sp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.sp-overlay.active {
    display: block;
    opacity: 1;
}

.sp-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 1));
    backdrop-filter: blur(30px);
    border-radius: 32px 32px 0 0;
    z-index: 10002;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 12px 0 calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.8);
}

.sp-sheet.active {
    transform: translateY(0);
}

.sp-handle {
    width: 40px;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 0 auto 20px;
}

.sp-header {
    padding: 0 24px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sp-title-wrap h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.sp-title-wrap p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 2px 0 0;
}

.sp-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sp-search-wrap {
    padding: 0 24px 15px;
    position: relative;
}

.sp-search-icon {
    position: absolute;
    left: 40px;
    top: 12px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.sp-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 12px 12px 42px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.sp-search-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.sp-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px;
    -webkit-overflow-scrolling: touch;
}

.sp-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 20px;
}

.sp-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
}

.sp-item:active {
    transform: scale(0.98);
    background: rgba(255, 255, 255, 0.08);
}

.sp-item.active-station {
    border-color: var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.sp-item-aqicn {
    border-left: 3px solid #8b5cf6 !important;
    background: linear-gradient(to right, rgba(139, 92, 246, 0.05), transparent) !important;
}

.sp-item-aqicn .sp-item-icon {
    color: #a78bfa;
}

.sp-item-sc {
    border-left: 3px solid #3b82f6 !important;
    background: linear-gradient(to right, rgba(59, 130, 246, 0.05), transparent) !important;
}

.sp-item-sc .sp-item-icon {
    color: #60a5fa;
}

.sp-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-item-icon {
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.sp-item.active-station .sp-item-icon {
    background: var(--accent);
    color: #fff;
}

.sp-item-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 2px;
}

.sp-item-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.sp-status-dot.online {
    background: #10b981;
    box-shadow: 0 0 5px #10b981;
}

.sp-status-dot.offline {
    background: #ef4444;
}

.sp-item-dist {
    font-size: 0.8rem;
    color: #3b82f6;
    font-weight: 800;
    background: rgba(59, 130, 246, 0.15);
    padding: 4px 8px;
    border-radius: 8px;
}

/* Trigger Button replacing the select */
.sp-trigger-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 14px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.sp-trigger-btn:active {
    transform: scale(0.96);
}

.sp-trigger-label {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-trigger-icon {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

@media (min-width: 768px) {
    .sp-sheet {
        max-width: 450px;
        left: 50%;
        margin-left: -225px;
        border-radius: 32px 32px 32px 32px;
        bottom: 40px;
        height: auto;
        min-height: 500px;
    }
}


/* Hide Navigation and Header when Chart is Fullscreen */
body.chart-is-fullscreen .bottom-nav,
body.chart-is-fullscreen header {
    display: none !important;
}

/* Fullscreen Chart Overlay */
.chart-fullscreen-overlay {
    position: fixed;
    z-index: 100000;
    background: var(--bg);
    display: flex !important;
    flex-direction: column !important;
    padding: 20px;
    border-radius: 0;
    border: none;
    margin: 0;
    box-sizing: border-box;
}

@media screen and (orientation: portrait) {
    .chart-fullscreen-overlay {
        top: 0;
        left: 100vw;
        width: 100vh !important;
        height: 100vw !important;
        transform: rotate(90deg);
        transform-origin: 0 0;
    }
}

@media screen and (orientation: landscape) {
    .chart-fullscreen-overlay {
        top: 0;
        left: 0;
        width: 100vw !important;
        height: 100vh !important;
        transform: none;
    }
}

.chart-fullscreen-overlay .chart-wrap {
    flex: 1;
    position: relative;
    height: 100% !important;
    min-height: 0;
    margin-top: 10px;
}

.chart-fullscreen-overlay .chart-title {
    font-size: 1rem;
    margin-bottom: 5px;
}

.chart-close-fullscreen {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
    transition: all 0.2s ease;
}

.chart-close-fullscreen:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.2);
}

.chart-expand-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    margin-left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.chart-expand-btn:hover,
.chart-expand-btn:active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
}

.chart-fullscreen-overlay .chart-expand-btn {
    display: none;
}

/* --- ONBOARDING OVERLAY --- */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.onboarding-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.onboarding-card {
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.02) 100%), var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 32px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9);
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.onboarding-overlay.active .onboarding-card {
    transform: translateY(0) scale(1);
}

.onboarding-logo {
    width: 64px;
    height: 64px;
    background: var(--accent-glow);
    border-radius: 20px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.onboarding-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.onboarding-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 30px;
}

.onboarding-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ob-btn {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    -webkit-tap-highlight-color: transparent;
}

.ob-btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 25px var(--accent-glow);
}

.ob-btn-primary:active {
    transform: scale(0.96);
    background: #2563EB;
}

.ob-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.ob-btn-secondary:active {
    background: rgba(255, 255, 255, 0.1);
}

.ob-city-select-wrap {
    margin-top: 15px;
    display: none;
    flex-direction: column;
    gap: 10px;
    animation: fadeInDown 0.4s ease;
}

.ob-select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 14px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* --- LOCAL PARTNER ADS --- */
.local-ad-container {
    width: 100%;
    margin: 10px 0;
    display: none;
    /* Controlled by JS */
}

.local-ad-link {
    display: block;
    width: 100%;
    text-decoration: none;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.local-ad-link:hover {
    transform: scale(1.005);
    border-color: rgba(255, 255, 255, 0.1);
}

.local-ad-img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 120px;
    object-fit: contain;
}

.local-ad-badge {
    position: absolute;
    top: 6px;
    right: 8px;
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* --- Aeropalynological Calendar (SEPA Style) --- */
.pollen-calendar-modal {
    position: fixed;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #020617;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    z-index: 200000;
    display: none;
    flex-direction: column;
    padding: 30px 20px;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pollen-calendar-modal.active {
    display: flex;
    opacity: 1;
}

.pollen-calendar-content {
    background: transparent;
    width: 100%;
    max-width: 1000px;
    padding: 0;
    position: relative;
    box-shadow: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.pollen-calendar-modal.active .pollen-calendar-content {
    transform: translateY(0);
}

.pollen-grid {
    display: grid;
    grid-template-columns: minmax(60px, 80px) repeat(9, 1fr);
    gap: clamp(2px, 1vw, 8px);
    margin-top: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.pollen-grid-header {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-align: center;
    font-weight: 800;
    padding-bottom: 8px;
    text-transform: uppercase;
}

.pollen-row-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.pollen-cell {
    aspect-ratio: 1;
    border-radius: clamp(3px, 1vw, 6px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease;
    min-width: 25px;
}

.pollen-cell.low {
    background: #10b981;
    opacity: 0.3;
}

.pollen-cell.mod {
    background: #f59e0b;
    opacity: 0.5;
}

.pollen-cell.high {
    background: #ef4444;
    opacity: 0.75;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.pollen-cell.extreme {
    background: #7c3aed;
    opacity: 1;
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.4);
}

.pollen-cell.current-month {
    border: 2px solid #fff;
    transform: scale(1.15);
    z-index: 2;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.pollen-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.legend-box {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* --- DASHBOARD MODULE CUSTOMIZATION (User Toggles) --- */
html.hide-agro .agro-widget { display: none !important; }
html.hide-pigeon .pigeon-widget { display: none !important; }
html.hide-biker .biker-widget { display: none !important; }

/* SweetAlert2 Z-Index Overrides */
.swal2-container {
    z-index: 999999 !important;
}

/* Fix scrolling over ads - Pass all touch events to the parent (body/html) */
.native-ad-v2, 
.local-ad-container,
.ad-unit-wrapper {
    pointer-events: none !important; /* Forces events to pass through to the page scroll */
    touch-action: pan-y !important;
}

/* Ensure all children (including iframes) also don't block anything */
.native-ad-v2 *, 
.local-ad-container *,
.ad-unit-wrapper * {
    pointer-events: none !important;
}