/*
 * Weather scene styling, reorganized for readability while preserving
 * the existing layout and visual design.
 */

/* -------------------------------------------------------------------------- */
/* Scene shell and overlay                                                   */
/* -------------------------------------------------------------------------- */
.weather-scene-shell {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: clamp(280px, 42vh, 640px);
    border-radius: 1.5rem;
    overflow: hidden;
}

.primary-widget .weather-scene-shell {
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
    max-height: none;
}

.scene-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: clamp(1rem, 4vw, 2.75rem);
    font-size: clamp(1rem, 2vw, 1.2rem);
    pointer-events: none;
    background: linear-gradient(180deg, rgba(4, 7, 15, 0.08) 0%, rgba(4, 7, 15, 0.2) 45%, rgba(4, 7, 15, 0.85) 100%);
    text-shadow: 0 12px 40px rgba(4, 7, 15, 0.8);
}

.overlay-content {
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 2vw, 1.75rem);
    align-items: stretch;
    width: min(100%, 1200px);
    margin-inline: auto;
}

.primary-details {
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 2vw, 1.75rem);
}

.overlay-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    flex-wrap: wrap;
}

.scene-overlay .date-display {
    margin: 0;
}

.scene-overlay .time-display {
    margin: 0;
    text-align: center;
}


.scene-overlay .current-weather {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border: 1px solid rgba(94, 234, 212, 0.35);
    background: linear-gradient(135deg, rgba(6, 16, 38, 0.7), rgba(5, 35, 38, 0.55));
    padding: 1.1rem 1.35rem;
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.55);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.scene-overlay .current-weather p {
    color: inherit;
}

.scene-overlay .moon-phase-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(94, 234, 212, 0.4);
    background: linear-gradient(135deg, rgba(10, 25, 50, 0.7), rgba(5, 40, 40, 0.65));
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #bfdbfe;
    box-shadow: 0 12px 32px rgba(2, 6, 23, 0.45);
}

body.theme-day .scene-overlay .moon-phase-chip {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(14, 165, 233, 0.35);
    color: #2563eb;
}

.scene-overlay .current-weather-details {
    margin-left: auto;
    text-align: right;
}

body.theme-day .scene-overlay .current-weather {
    background: rgba(255, 255, 255, 0.9);
    color: #0f172a;
}

.scene-overlay .current-weather-details .pressure-reading {
    font-size: 0.95em;
}

/* Moon phase chip ---------------------------------------------------------- */
.moon-phase-card {
    background: linear-gradient(135deg, rgba(10, 25, 50, 0.65), rgba(5, 40, 40, 0.65));
    border: 1px solid rgba(94, 234, 212, 0.3);
    border-radius: 1rem;
    padding: 0.85rem 1.1rem;
    min-width: min(280px, 100%);
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.55);
}

body.theme-day .moon-phase-card {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(14, 165, 233, 0.3);
}

.moon-phase-value {
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* -------------------------------------------------------------------------- */
/* Forecast panel                                                            */
/* -------------------------------------------------------------------------- */
.forecast-card .card-body {
    display: flex;
    height: 100%;
    min-height: 0;
}

.forecast-panel {
    --forecast-scale: 1;
    display: flex;
    flex-direction: column;
    gap: calc(var(--forecast-scale) * clamp(0.35rem, 0.8vw, 0.65rem));
    height: 100%;
    min-height: 0;
    padding: calc(var(--forecast-scale) * clamp(0.85rem, 2vw, 1.25rem));
    border-radius: 1rem;
    border: 1px solid rgba(94, 234, 212, 0.28);
    background: linear-gradient(180deg, rgba(9, 25, 46, 0.78), rgba(6, 31, 42, 0.9));
    box-shadow: 0 20px 45px rgba(2, 6, 23, 0.55);
    font-size: calc(var(--forecast-scale) * clamp(0.9rem, 0.3vw + 0.85rem, 1.05rem));
}

.forecast-panel.h-100 {
    max-height: 100%;
}

body.theme-day .forecast-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(224, 255, 247, 0.9));
    border-color: rgba(34, 197, 94, 0.2);
}

.forecast-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--forecast-scale) * 0.75rem);
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-bottom: calc(var(--forecast-scale) * clamp(0.2rem, 0.6vw, 0.5rem));
}

.forecast-panel-header #forecast-note {
    text-align: right;
}

.forecast-list {
    display: flex;
    flex-direction: column;
    gap: calc(var(--forecast-scale) * clamp(0.3rem, 0.7vw, 0.55rem));
    width: 100%;
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    overflow: hidden;
    padding-right: 0;
}

.forecast-item {
    display: flex;
    flex-direction: column;
    gap: calc(var(--forecast-scale) * 0.5rem);
    align-items: stretch;
    text-align: left;
    padding: calc(var(--forecast-scale) * clamp(0.65rem, 1.2vw, 0.95rem));
    border-radius: 0.85rem;
    min-height: calc(var(--forecast-scale) * clamp(78px, 8.5vw, 110px));
    flex: 1 1 0;
    border: 1px solid rgba(94, 234, 212, 0.18);
    background: linear-gradient(135deg, rgba(9, 25, 46, 0.8), rgba(4, 47, 46, 0.75));
    transition: background 0.6s ease, border-color 0.6s ease, box-shadow 0.3s ease;
}

.forecast-item-muted {
    background: linear-gradient(135deg, rgba(5, 13, 26, 0.9), rgba(4, 27, 32, 0.85));
    border-color: rgba(94, 234, 212, 0.12);
    color: rgba(226, 232, 240, 0.9);
    filter: saturate(0.92);
}

body.theme-day .forecast-item-muted {
    background: linear-gradient(135deg, rgba(231, 241, 252, 0.92), rgba(211, 236, 232, 0.86));
    border-color: rgba(22, 163, 74, 0.14);
    color: #0f172a;
}

.forecast-item-muted .forecast-summary {
    color: rgba(226, 232, 240, 0.75);
}

body.theme-day .forecast-item-muted .forecast-summary {
    color: #1f2937;
}

.forecast-item .day-label {
    font-weight: 600;
    color: inherit;
    font-size: calc(var(--forecast-scale) * clamp(0.88rem, 1.25vw, 1rem));
}

.forecast-item .temp-range {
    margin: 0;
    font-weight: 600;
    font-size: calc(var(--forecast-scale) * clamp(0.85rem, 1.15vw, 0.98rem));
    color: #67e8f9;
}

body.theme-day .forecast-item .temp-range {
    color: #0d9488;
}

.forecast-item .forecast-emoji {
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.forecast-item .forecast-emoji .weather-icon-img {
    width: calc(var(--forecast-scale) * 2.1rem);
    height: calc(var(--forecast-scale) * 2.1rem);
    display: block;
}

.weather-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.35rem;
}

.weather-icon-img {
    width: 2.3rem;
    height: 2.3rem;
    display: block;
}

.forecast-item .forecast-row-top,
.forecast-item .forecast-row-bottom {
    display: flex;
    align-items: center;
    gap: calc(var(--forecast-scale) * 0.65rem);
}

.forecast-item .forecast-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--forecast-scale) * 0.45rem);
    min-width: 0;
}

.forecast-item .forecast-row-top {
    justify-content: space-between;
}

.forecast-item .forecast-row-bottom {
    justify-content: space-between;
    flex-wrap: wrap;
}

.forecast-item .forecast-primary-line {
    display: flex;
    align-items: baseline;
    gap: calc(var(--forecast-scale) * 0.6rem);
    flex-wrap: wrap;
    width: 100%;
}

.forecast-item .forecast-summary {
    font-weight: 500;
    color: rgba(226, 232, 240, 0.9);
    font-size: calc(var(--forecast-scale) * clamp(0.82rem, 1.2vw, 0.95rem));
    flex: 1 1 140px;
    min-width: 0;
}

.forecast-item .forecast-pressure {
    font-weight: 600;
    color: rgba(125, 249, 255, 0.9);
    font-size: calc(var(--forecast-scale) * clamp(0.78rem, 1.1vw, 0.9rem));
}

body.theme-day .forecast-item .forecast-pressure {
    color: #0ea5e9;
}

body.theme-day .forecast-item .forecast-summary {
    color: #0f172a;
}

.forecast-item-today {
    border-color: var(--accent-color);
    box-shadow: 0 0.75rem 1.5rem rgba(94, 234, 212, 0.22);
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.28), rgba(56, 189, 248, 0.18));
    color: #e0f2f1;
}

@media (max-width: 992px) {
    .forecast-panel-header {
        gap: 0.5rem;
    }
}

/* -------------------------------------------------------------------------- */
/* Core scene                                                                 */
/* -------------------------------------------------------------------------- */
.weather-scene {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: clamp(240px, 35vh, 420px);
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: inset 0 0 35px rgba(2, 6, 23, 0.55);
    isolation: isolate;
    transition: border-color 0.6s ease;
    --sky-top: #0b1b33;
    --sky-bottom: #0f243c;
    --cloud: rgba(226, 232, 240, 0.9);
    --cloud-shadow: rgba(51, 65, 85, 0.55);
    --cloud-highlight: rgba(255, 255, 255, 0.9);
    --cloud-outline: rgba(255, 255, 255, 0.18);
}

.weather-scene.theme-day {
    border-color: rgba(22, 163, 74, 0.42);
    box-shadow: inset 0 0 35px rgba(34, 197, 94, 0.28), inset 0 0 90px rgba(255, 255, 255, 0.28);
    --cloud: rgba(248, 251, 255, 0.95);
    --cloud-shadow: rgba(71, 85, 105, 0.4);
    --cloud-highlight: rgba(255, 255, 255, 0.98);
    --cloud-outline: rgba(148, 163, 184, 0.35);
}

.weather-scene.theme-night {
    border-color: rgba(94, 234, 212, 0.28);
    box-shadow: inset 0 0 40px rgba(12, 74, 110, 0.5), inset 0 0 120px rgba(6, 17, 38, 0.6);
}

/* Condition palettes ------------------------------------------------------- */
.weather-scene.theme-day.scene-clear {
    --sky-top: #c7e3ff;
    --sky-bottom: #f2ebc8;
}

.weather-scene.theme-night.scene-clear {
    --sky-top: #061430;
    --sky-bottom: #0a2c52;
}

.weather-scene.theme-day.scene-mild {
    --sky-top: #c4d5ec;
    --sky-bottom: #dfe7f1;
}

.weather-scene.theme-night.scene-mild {
    --sky-top: #0c1a32;
    --sky-bottom: #1a2639;
}

.weather-scene.theme-day.scene-rain {
    --sky-top: #5b8ac3;
    --sky-bottom: #9bb8de;
    --cloud-shadow: rgba(30, 64, 175, 0.8);
}

.weather-scene.theme-night.scene-rain {
    --sky-top: #0a152d;
    --sky-bottom: #14233f;
}

.weather-scene.theme-day.scene-storm {
    --sky-top: #58708f;
    --sky-bottom: #90a2b8;
    --cloud-shadow: rgba(30, 41, 59, 0.95);
}

.weather-scene.theme-night.scene-storm {
    --sky-top: #0b172f;
    --sky-bottom: #192a48;
}

.weather-scene.theme-day.scene-snow {
    --sky-top: #b2d0f6;
    --sky-bottom: #d6e4fb;
}

.weather-scene.theme-night.scene-snow {
    --sky-top: #08152f;
    --sky-bottom: #1c3f8f;
}

/* -------------------------------------------------------------------------- */
/* Background layers                                                          */
/* -------------------------------------------------------------------------- */
.weather-scene .scene-backdrop,
.weather-scene .sky-gradient,
.weather-scene .scene-illustration,
.weather-scene .stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.weather-scene .scene-backdrop {
    z-index: 0;
}

.weather-scene .sky-gradient {
    background: linear-gradient(180deg, var(--sky-top), var(--sky-bottom));
    transition: background 0.6s ease;
    z-index: 0;
}

.weather-scene .stars {
    opacity: 0.9;
    mix-blend-mode: screen;
    transition: opacity 0.4s ease;
    z-index: 2;
}

body.theme-day .weather-scene .stars,
.weather-scene.theme-day .stars {
    opacity: 0;
}

.weather-scene .star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
    animation: twinkle 6s ease-in-out infinite;
}

.weather-scene .star-1 { top: 12%; left: 15%; }
.weather-scene .star-2 { top: 8%; left: 55%; }
.weather-scene .star-3 { top: 20%; left: 75%; }
.weather-scene .star-4 { top: 30%; left: 35%; }
.weather-scene .star-5 { top: 18%; left: 85%; }
.weather-scene .star-6 { top: 25%; left: 5%; }

.scene-illustration {
    background-position: center bottom;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0.96;
    transform-origin: center;
    transition: opacity 0.4s ease, filter 0.6s ease;
    pointer-events: none;
    z-index: 1;
}

.weather-scene.theme-day .scene-illustration,
.weather-scene.scene-mild .scene-illustration,
.weather-scene.scene-clear .scene-illustration {
    background-image: url('../img/scene-clear-day.svg');
}

.weather-scene.theme-night .scene-illustration {
    background-image: url('../img/scene-clear-night.svg');
}

.weather-scene.scene-rain.theme-day .scene-illustration { background-image: url('../img/scene-rain-day.svg'); }
.weather-scene.scene-rain.theme-night .scene-illustration { background-image: url('../img/scene-rain-night.svg'); }
.weather-scene.scene-storm.theme-day .scene-illustration { background-image: url('../img/scene-storm-day.svg'); }
.weather-scene.scene-storm.theme-night .scene-illustration { background-image: url('../img/scene-storm-night.svg'); }
.weather-scene.scene-snow.theme-day .scene-illustration { background-image: url('../img/scene-snow-day.svg'); }
.weather-scene.scene-snow.theme-night .scene-illustration { background-image: url('../img/scene-snow-night.svg'); }

/* Slightly tone down the illustration when heavy precipitation is active */
.weather-scene.scene-rain .scene-illustration,
.weather-scene.scene-storm .scene-illustration {
    filter: saturate(0.9) contrast(0.96);
}

.weather-scene.scene-snow .scene-illustration {
    filter: saturate(1.05) contrast(1);
}

/* -------------------------------------------------------------------------- */
/* Celestial bodies                                                           */
/* -------------------------------------------------------------------------- */
.weather-scene .sun {
    position: absolute;
    top: 10%;
    right: 8%;
    width: 120px;
    aspect-ratio: 1;
    border-radius: 50%;
    display: grid;
    place-items: center;
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
    transition: opacity 0.4s ease, transform 0.6s ease;
    filter: drop-shadow(0 0 24px rgba(252, 211, 77, 0.6));
    z-index: 2;
}

.weather-scene.scene-clear .sun,
.weather-scene.scene-mild .sun,
.weather-scene.scene-rain .sun,
.weather-scene.scene-storm .sun,
.weather-scene.scene-snow .sun {
    opacity: 1;
    transform: translateY(0) scale(1);
}

body.theme-night .weather-scene .sun,
.weather-scene.theme-night .sun {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
}

.weather-scene .sun-core {
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, #fef9c3 0%, #fdba74 65%, #f59e0b 100%);
}

.weather-scene .sun-rays {
    position: absolute;
    inset: -12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 65%);
    animation: pulse 5s ease-in-out infinite;
}

.weather-scene .moon {
    position: absolute;
    top: 12%;
    right: 10%;
    width: 120px;
    height: 120px;
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    transition: opacity 0.5s ease, transform 0.6s ease;
    filter: drop-shadow(0 0 22px rgba(148, 197, 255, 0.5));
    z-index: 2;
}

body.theme-night .weather-scene .moon,
.weather-scene.theme-night .moon {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.moon-backdrop { fill: rgba(255, 255, 255, 0.15); }
.moon-crater { fill: rgba(255, 255, 255, 0.25); }

/* -------------------------------------------------------------------------- */
/* Clouds                                                                     */
/* -------------------------------------------------------------------------- */
.weather-scene .clouds {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    opacity: 0.78;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.weather-scene .cloud {
    position: absolute;
    width: 200px;
    height: 110px;
    background:
        radial-gradient(140% 120% at 30% 38%, var(--cloud-highlight), var(--cloud)),
        radial-gradient(110% 100% at 72% 45%, rgba(255, 255, 255, 0.9), var(--cloud)),
        radial-gradient(140% 120% at 50% 70%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
    border-radius: 50% 56% 48% 60%;
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.12),
        0 18px 38px rgba(15, 23, 42, 0.18),
        0 0 0 1px var(--cloud-outline),
        0 24px 32px var(--cloud-shadow);
    filter: drop-shadow(0 6px 12px rgba(15, 23, 42, 0.18));
    opacity: 0.96;
}

.weather-scene .cloud::before,
.weather-scene .cloud::after {
    content: "";
    position: absolute;
    background: radial-gradient(130% 120% at 50% 45%, var(--cloud-highlight), var(--cloud));
    border-radius: 55%;
}

.weather-scene .cloud::before {
    width: 76%;
    height: 74%;
    top: -32%;
    left: 14%;
    box-shadow:
        0 12px 22px rgba(15, 23, 42, 0.12),
        0 0 0 1px var(--cloud-outline);
}

.weather-scene .cloud::after {
    width: 88%;
    height: 52%;
    left: 6%;
    bottom: -24%;
    background:
        radial-gradient(120% 120% at 40% 20%, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0)),
        linear-gradient(180deg, rgba(148, 163, 184, 0.25), rgba(148, 163, 184, 0));
    filter: blur(14px);
    opacity: 0.82;
}

.weather-scene .cloud-1 { top: 16%; left: 12%; animation: drift 26s linear infinite, float 18s ease-in-out infinite; }
.weather-scene .cloud-2 { top: 26%; left: 45%; width: 230px; animation: drift 34s linear infinite reverse, float 20s ease-in-out infinite; }
.weather-scene .cloud-3 { top: 12%; left: 70%; width: 210px; animation: drift 30s linear infinite, float 16s ease-in-out infinite; }
.weather-scene .cloud-4 { top: 36%; left: 24%; width: 170px; animation: drift 32s linear infinite reverse, float 22s ease-in-out infinite; }

.weather-scene.scene-clear .clouds { display: none; }
.weather-scene.scene-rain .clouds,
.weather-scene.scene-storm .clouds { opacity: 0.95; }

/* -------------------------------------------------------------------------- */
/* Precipitation and lightning                                                */
/* -------------------------------------------------------------------------- */
.precipitation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 4;
}

.precipitation .raindrop,
.precipitation .snowflake {
    position: absolute;
    top: -10%;
    left: 50%;
    pointer-events: none;
}

.precipitation .raindrop {
    width: 2px;
    height: var(--drop-length, 18px);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.9), rgba(14, 116, 144, 0.25));
    transform: translateX(-50%);
    opacity: 0;
    box-shadow: 0 0 6px rgba(14, 116, 144, 0.35);
    animation: dynamicRain var(--drop-duration, 0.9s) linear infinite;
}

.precipitation .snowflake {
    width: var(--flake-size, 8px);
    height: var(--flake-size, 8px);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 244, 255, 0.95) 40%, rgba(148, 163, 184, 0.75));
    transform: translateX(-50%);
    opacity: 0;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.28);
    animation: dynamicSnow var(--flake-duration, 7s) ease-in infinite;
}

.lightning {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.lightning-bolt {
    position: absolute;
    top: var(--bolt-top, 5%);
    left: var(--bolt-left, 50%);
    width: 10px;
    height: calc(100% - var(--bolt-top, 5%));
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 249, 235, 0.95) 0%, rgba(253, 224, 71, 0.9) 55%, rgba(202, 138, 4, 0.65) 100%);
    box-shadow: 0 0 20px rgba(253, 224, 71, 0.75), 0 0 40px rgba(202, 138, 4, 0.55);
    opacity: 0;
    transform: rotate(-6deg) skewX(-4deg);
    clip-path: polygon(45% 0, 65% 12%, 40% 28%, 68% 40%, 38% 60%, 62% 68%, 32% 88%, 52% 100%, 35% 100%, 50% 72%, 24% 60%, 54% 38%, 26% 26%, 46% 0);
    animation: boltFlash var(--bolt-duration, 3.2s) ease-in infinite;
    animation-delay: var(--bolt-delay, 0s);
    filter: drop-shadow(0 0 12px rgba(255, 215, 96, 0.95));
}

.lightning-bolt::before {
    content: "";
    position: absolute;
    top: 35%;
    left: 48%;
    width: 7px;
    height: 70px;
    background: linear-gradient(180deg, rgba(255, 249, 235, 0.9) 0%, rgba(253, 224, 71, 0.7) 100%);
    clip-path: polygon(50% 0, 70% 25%, 42% 40%, 68% 60%, 36% 84%, 58% 100%, 32% 100%, 46% 68%, 24% 58%, 52% 36%, 30% 24%, 48% 0);
    transform: translateX(-50%) rotate(12deg);
    filter: drop-shadow(0 0 14px rgba(253, 208, 70, 0.8));
}

/* -------------------------------------------------------------------------- */
/* Snow overlay                                                               */
/* -------------------------------------------------------------------------- */
.weather-scene .snow-overlay {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 6;
}

.scene-snow .snow-overlay { opacity: 1; }

.snow-layer {
    position: absolute;
    inset: -20% -10% auto;
    width: 120%;
    height: 200%;
    background-repeat: repeat;
    background-image: radial-gradient(circle, rgba(236, 244, 255, 0.9) 1.5px, transparent 2px), radial-gradient(circle, rgba(148, 163, 184, 0.65) 1px, transparent 2px);
    animation: driftSnow var(--snow-duration, 18s) linear infinite;
    opacity: var(--snow-opacity, 0.5);
}

.snow-layer-near { --snow-duration: 14s; --snow-opacity: 0.8; filter: blur(0.5px); }
.snow-layer-mid { --snow-duration: 22s; --snow-opacity: 0.55; filter: blur(0.8px); }
.snow-layer-far { --snow-duration: 32s; --snow-opacity: 0.35; filter: blur(1px); }

/* -------------------------------------------------------------------------- */
/* Animations                                                                 */
/* -------------------------------------------------------------------------- */
@keyframes twinkle {
    0%,
    100% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.8); }
}

@keyframes pulse {
    0%,
    100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

@keyframes drift { 0% { transform: translateX(-20px); } 100% { transform: translateX(40px); } }

@keyframes float {
    0%,
    100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -6px, 0); }
}

@keyframes driftSnow { 0% { transform: translate3d(0, -10%, 0); } 100% { transform: translate3d(-20%, 25%, 0); } }

@keyframes dynamicRain {
    0% { opacity: 0; transform: translate3d(0, -20vh, 0); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(-6px, 110vh, 0); }
}

@keyframes dynamicSnow {
    0% { opacity: 0; transform: translate3d(0, -16vh, 0); }
    20% { opacity: 1; }
    100% { opacity: 0; transform: translate3d(-12px, 110vh, 0); }
}

@keyframes boltFlash {
    0%, 80% { opacity: 0; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}
