/**
 * Kuşcuali ana sayfa — hava kartı sahneleri (WMO → animasyonlu arka plan).
 * Bulut dekor: inline SVG; yağmur / kar / gece yıldızı vb. CSS ile.
 */

.home-weather-card--slim {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    min-height: 96px;
    box-shadow:
        0 4px 18px rgba(12, 20, 40, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.home-weather-card__fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.home-weather-card__front {
    position: relative;
    z-index: 1;
    padding: 12px 14px 14px;
}

/* FX katmanları — varsayılan gizli */
.wfx {
    position: absolute;
    display: block;
    opacity: 0;
    transition: opacity 0.45s ease;
}

/* --- Güneş (açık gündüz) --- */
.wfx--sun {
    top: -18%;
    right: -12%;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff9e6 0%, #ffd54a 45%, #ff9f1a 100%);
    box-shadow:
        0 0 40px rgba(255, 200, 80, 0.55),
        0 0 80px rgba(255, 180, 60, 0.35);
    animation: wfx-sun-pulse 4s ease-in-out infinite;
}

@keyframes wfx-sun-pulse {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.06); opacity: 1; }
}

/* --- Ay (açık gece) --- */
.wfx--moon {
    top: 6px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #f5f5ff 0%, #c5cae8 55%, #8b93b8 100%);
    box-shadow: 0 0 24px rgba(200, 210, 255, 0.35);
    animation: wfx-moon-glow 5s ease-in-out infinite;
}

@keyframes wfx-moon-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(200, 210, 255, 0.3); }
    50% { box-shadow: 0 0 32px rgba(220, 230, 255, 0.5); }
}

/* --- Yıldızlar --- */
.wfx--star {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.wfx--star-a { top: 14px; left: 12%; animation: wfx-twinkle 2.2s ease-in-out infinite; }
.wfx--star-b { top: 22px; left: 38%; animation: wfx-twinkle 3.1s ease-in-out infinite 0.4s; }
.wfx--star-c { top: 18px; left: 62%; animation: wfx-twinkle 2.7s ease-in-out infinite 0.8s; }

@keyframes wfx-twinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

/* --- Bulutlar (inline SVG, currentColor) --- */
.wfx--cloud {
    background: none;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 4px 10px rgba(20, 35, 55, 0.22));
}

.wfx--cloud .wfx__cloud-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.wfx--cloud-a {
    width: 76px;
    height: 76px;
    top: 28%;
    left: -14%;
    opacity: 0.94;
    animation: wfx-cloud-drift-a 28s ease-in-out infinite;
}

.wfx--cloud-b {
    width: 60px;
    height: 60px;
    top: 44%;
    left: 16%;
    opacity: 0.85;
    animation: wfx-cloud-drift-b 34s ease-in-out infinite;
}

.wfx--cloud-c {
    width: 54px;
    height: 54px;
    top: 22%;
    right: -10%;
    opacity: 0.82;
    animation: wfx-cloud-drift-c 31s ease-in-out infinite;
}

@keyframes wfx-cloud-drift-a {
    0% {
        transform: translateX(-12%) translateY(0) scale(1);
    }
    35% {
        transform: translateX(38%) translateY(-4px) scale(1.03);
    }
    100% {
        transform: translateX(118%) translateY(0) scale(1);
    }
}

@keyframes wfx-cloud-drift-b {
    0% {
        transform: translateX(-8%) translateY(0) scale(1);
    }
    40% {
        transform: translateX(42%) translateY(3px) scale(1.02);
    }
    100% {
        transform: translateX(105%) translateY(0) scale(1);
    }
}

@keyframes wfx-cloud-drift-c {
    0% {
        transform: translateX(12%) translateY(0) scale(1);
    }
    45% {
        transform: translateX(-48%) translateY(-3px) scale(1.04);
    }
    100% {
        transform: translateX(-125%) translateY(0) scale(1);
    }
}

/* --- Sis --- */
.wfx--mist {
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 25%,
        rgba(255, 255, 255, 0.22) 50%,
        rgba(255, 255, 255, 0.12) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: wfx-mist-flow 8s linear infinite;
}

@keyframes wfx-mist-flow {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* --- Yağmur --- */
.wfx--rain {
    inset: 0;
    background-image: repeating-linear-gradient(
        -18deg,
        transparent,
        transparent 4px,
        rgba(255, 255, 255, 0.14) 4px,
        rgba(255, 255, 255, 0.14) 5px
    );
    animation: wfx-rain-fall 0.55s linear infinite;
}

.wfx--rain-heavy {
    background-image: repeating-linear-gradient(
        -18deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.22) 2px,
        rgba(255, 255, 255, 0.22) 3px
    );
    animation-duration: 0.38s;
}

@keyframes wfx-rain-fall {
    0% { background-position: 0 0; }
    100% { background-position: 8px 22px; }
}

/* --- Kar --- */
.wfx--snow {
    inset: 0;
    background-image:
        radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 30% 60%, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(1.5px 1.5px at 70% 30%, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(2px 2px at 85% 75%, rgba(255, 255, 255, 0.7), transparent);
    background-size: 100% 100%;
    animation: wfx-snow-fall 4s linear infinite;
}

@keyframes wfx-snow-fall {
    0% { background-position: 0 0, 0 0, 0 0, 0 0; opacity: 0.85; }
    100% { background-position: 4px 18px, -3px 22px, 6px 20px, -2px 24px; opacity: 1; }
}

/* --- Şimşek --- */
.wfx--bolt {
    inset: 0;
    background: rgba(255, 255, 255, 0);
    animation: wfx-lightning 5s ease-in-out infinite;
}

@keyframes wfx-lightning {
    0%, 92%, 100% { background: rgba(255, 255, 255, 0); }
    93% { background: rgba(200, 220, 255, 0.35); }
    93.5% { background: rgba(255, 255, 255, 0.08); }
    94% { background: rgba(180, 200, 255, 0.4); }
    94.8% { background: rgba(255, 255, 255, 0); }
}

/* ========== Sahne arka planları + hangi FX görünsün ========== */

.home-weather-card--slim[data-weather-scene="clear_day"] {
    background: linear-gradient(155deg, #3d7ab8 0%, #5fa8d8 40%, #a8d4f0 100%);
}

.home-weather-card--slim[data-weather-scene="clear_day"] .wfx--sun {
    opacity: 1;
}

.home-weather-card--slim[data-weather-scene="clear_night"] {
    background: linear-gradient(160deg, #0f1729 0%, #1e2d4a 55%, #2a3d5c 100%);
}

.home-weather-card--slim[data-weather-scene="clear_night"] .wfx--moon,
.home-weather-card--slim[data-weather-scene="clear_night"] .wfx--star {
    opacity: 1;
}

.home-weather-card--slim[data-weather-scene="partly_day"] {
    background: linear-gradient(150deg, #4a7cb0 0%, #7eb8e0 50%, #d4e9f7 100%);
}

.home-weather-card--slim[data-weather-scene="partly_day"] .wfx--sun,
.home-weather-card--slim[data-weather-scene="partly_day"] .wfx--cloud-a,
.home-weather-card--slim[data-weather-scene="partly_day"] .wfx--cloud-b {
    opacity: 1;
}

.home-weather-card--slim[data-weather-scene="partly_night"] {
    background: linear-gradient(155deg, #1a2740 0%, #2c3e5c 70%, #3d4f6f 100%);
}

.home-weather-card--slim[data-weather-scene="partly_night"] .wfx--moon,
.home-weather-card--slim[data-weather-scene="partly_night"] .wfx--star,
.home-weather-card--slim[data-weather-scene="partly_night"] .wfx--cloud-a {
    opacity: 0.95;
}

.home-weather-card--slim[data-weather-scene="cloudy"] {
    background: linear-gradient(160deg, #5c6675 0%, #7a8694 45%, #9aa5b0 100%);
}

.home-weather-card--slim[data-weather-scene="cloudy"] .wfx--cloud-a,
.home-weather-card--slim[data-weather-scene="cloudy"] .wfx--cloud-b,
.home-weather-card--slim[data-weather-scene="cloudy"] .wfx--cloud-c {
    opacity: 0.95;
}

.home-weather-card--slim[data-weather-scene="fog"] {
    background: linear-gradient(165deg, #8a939e 0%, #a8b0b8 50%, #c5ccd2 100%);
}

.home-weather-card--slim[data-weather-scene="fog"] .wfx--mist,
.home-weather-card--slim[data-weather-scene="fog"] .wfx--cloud-a {
    opacity: 0.65;
}

.home-weather-card--slim[data-weather-scene="drizzle"] {
    background: linear-gradient(160deg, #4a5f75 0%, #5c7390 100%);
}

.home-weather-card--slim[data-weather-scene="drizzle"] .wfx--rain:not(.wfx--rain-heavy),
.home-weather-card--slim[data-weather-scene="drizzle"] .wfx--cloud-b {
    opacity: 0.75;
}

.home-weather-card--slim[data-weather-scene="rain"] {
    background: linear-gradient(155deg, #354a5f 0%, #4a6280 100%);
}

.home-weather-card--slim[data-weather-scene="rain"] .wfx--rain:not(.wfx--rain-heavy),
.home-weather-card--slim[data-weather-scene="rain"] .wfx--cloud-a {
    opacity: 0.9;
}

.home-weather-card--slim[data-weather-scene="heavy_rain"] {
    background: linear-gradient(150deg, #2a3545 0%, #3d4d62 100%);
}

.home-weather-card--slim[data-weather-scene="heavy_rain"] .wfx--rain,
.home-weather-card--slim[data-weather-scene="heavy_rain"] .wfx--cloud-a,
.home-weather-card--slim[data-weather-scene="heavy_rain"] .wfx--cloud-b {
    opacity: 1;
}

.home-weather-card--slim[data-weather-scene="snow"] {
    background: linear-gradient(160deg, #6b8cae 0%, #9ebdd6 50%, #dce8f2 100%);
}

.home-weather-card--slim[data-weather-scene="snow"] .wfx--snow,
.home-weather-card--slim[data-weather-scene="snow"] .wfx--cloud-a {
    opacity: 0.95;
}

.home-weather-card--slim[data-weather-scene="storm"] {
    background: linear-gradient(155deg, #252d3a 0%, #3a3548 50%, #2c3240 100%);
}

.home-weather-card--slim[data-weather-scene="storm"] .wfx--rain,
.home-weather-card--slim[data-weather-scene="storm"] .wfx--bolt,
.home-weather-card--slim[data-weather-scene="storm"] .wfx--cloud-a {
    opacity: 1;
}

.home-weather-card--slim[data-weather-scene="unknown"] {
    background: linear-gradient(135deg, #2c3544 0%, #3d4656 100%);
}

@media (prefers-reduced-motion: reduce) {
    .wfx,
    .home-weather-card--slim .wfx--sun {
        animation: none !important;
    }

    .wfx--rain {
        animation-duration: 1.2s !important;
    }
}

/* Ön yüz metin kontrastı */
.home-weather-card__loc {
    margin: 0 0 8px;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.94);
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.home-weather-card__loc-sub {
    font-size: 0.95em;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.78);
}

.home-weather-card__line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.2;
}

.home-weather-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.home-weather-card__deg {
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
    flex-shrink: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.home-weather-card__cond {
    font-size: 0.92rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.96);
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.home-weather-card__range {
    margin: 6px 0 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.35;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.home-weather-card__err {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.9);
}
