:root {
    --font-color: #f3f6fa;
    --background-color: #181c2400;
    --card-background-color: rgba(38, 41, 49, 0.3);
    --box-shadow-color: rgba(0, 0, 0, 0.35);
    --input-border-color: #2d3444;
    --button-background-color: #2196f3;
    --button-hover-color: #1769aa;
    --heading-color: #90caf9;
    --detail-border-color: #263043;
    --detail-label-color: #dae6ec;
    --detail-value-color: #f0f0f0;
    --accent: #ffb300;
    --accent-2: #FFD700;
}

body {
    font-family: "Segoe UI", "Roboto", Arial, sans-serif;
    font-weight: 400;
    min-height: 100dvh;
    margin: 0;
    color: var(--font-color);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    background-color: var(--background-color);
}

.default-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transition: opacity 0.8s ease-in-out;
    background: radial-gradient(ellipse at 60% 40%, #6dd5ed 0%, #2193b0 30%, #b2fefa 60%, #f7797d 100%);
    filter: blur(0.5px) brightness(0.5) saturate(1.2);
    background-size: 300% 300%;
    animation: gradientShift 20s ease infinite;
}

.app-heading {
    margin-top: 5px;
    font-weight: 700;
    color: var(--font-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2);
    margin-bottom: 0;
    animation: fadeIn 1.2s 0.3s backwards;
    letter-spacing: 1.2px;
    text-align: center;
}

.app-heading-country {
    color: var(--detail-label-color);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2);
    margin: 2px;
    animation: fadeIn 1.2s 0.3s backwards;
    margin-bottom: 16px;
    text-align: center;
    letter-spacing: 1.2px;
}

.app-heading-country img{
    border-radius: 2px;
    width: auto;
    height: 12px;
}

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

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

.background-scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, #87CEEB 0%, #98D8E8 30%, #B0E0E6 100%);
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.background-scene.active {
    opacity: 1;
}

.background-scene,
.rain-background {
    transition: opacity 0.8s ease-in-out 0.2s;
}

.cloudy-background {
    background: 
        radial-gradient(ellipse 800px 300px at 20% 10%, rgba(200, 210, 220, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse 600px 250px at 80% 20%, rgba(180, 190, 200, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 700px 200px at 50% 30%, rgba(160, 170, 180, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse 900px 350px at 10% 60%, rgba(140, 150, 160, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse 500px 180px at 90% 70%, rgba(120, 130, 140, 0.2) 0%, transparent 50%),
        linear-gradient(to bottom, 
            #b0b5bb 0%,
            #8d949c 20%,
            #6a737d 40%,
            #525a65 60%,
            #3d434d 80%,
            #23262c 100%
        );
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    top: 0;
    left: 0;
    overflow: hidden;
}

.cloudy-background.active {
    opacity: 1;
}

.cloudy-background::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -100px;
    width: 120%;
    height: 80%;
    background: 
        radial-gradient(ellipse 400px 150px at 25% 25%, rgba(180, 190, 200, 0.3) 0%, transparent 60%),
        radial-gradient(ellipse 350px 120px at 75% 40%, rgba(160, 170, 180, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 500px 180px at 45% 60%, rgba(140, 150, 160, 0.25) 0%, transparent 60%);
    animation: driftClouds 45s linear infinite;
}

.cloudy-background::after {
    content: '';
    position: absolute;
    top: -30px;
    left: -80px;
    width: 110%;
    height: 70%;
    background: 
        radial-gradient(ellipse 300px 100px at 60% 20%, rgba(200, 210, 220, 0.2) 0%, transparent 60%),
        radial-gradient(ellipse 450px 160px at 20% 50%, rgba(170, 180, 190, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 280px 90px at 80% 70%, rgba(150, 160, 170, 0.2) 0%, transparent 60%);
    animation: driftClouds 35s linear infinite reverse;
}

@keyframes driftClouds {
    0% {
        transform: translateX(-10%);
    }
    100% {
        transform: translateX(10%);
    }
}

.fog-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(ellipse 800px 400px at 30% 20%, rgba(220, 220, 220, 0.4) 0%, transparent 70%),
        radial-gradient(ellipse 600px 300px at 70% 40%, rgba(200, 200, 200, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 900px 500px at 50% 70%, rgba(180, 180, 180, 0.5) 0%, transparent 70%),
        linear-gradient(to bottom, 
            rgba(240, 240, 240, 0.8) 0%,
            rgba(220, 220, 220, 0.9) 30%,
            rgba(200, 200, 200, 0.95) 60%,
            rgba(180, 180, 180, 1) 100%
        );
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 1s ease-in-out;
    overflow: hidden;
}

.fog-background.active {
    opacity: 1;
}

.fog-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50px;
    width: 110%;
    height: 100%;
    background: 
        radial-gradient(ellipse 500px 200px at 40% 30%, rgba(210, 210, 210, 0.3) 0%, transparent 80%),
        radial-gradient(ellipse 400px 150px at 80% 60%, rgba(190, 190, 190, 0.2) 0%, transparent 80%);
    animation: fogDrift 60s linear infinite;
}

.fog-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    width: 105%;
    height: 100%;
    background: 
        radial-gradient(ellipse 350px 180px at 20% 50%, rgba(230, 230, 230, 0.25) 0%, transparent 80%),
        radial-gradient(ellipse 450px 200px at 70% 20%, rgba(200, 200, 200, 0.2) 0%, transparent 80%);
    animation: fogDrift 40s linear infinite reverse;
}

@keyframes fogDrift {
    0% {
        transform: translateX(-5%);
    }
    100% {
        transform: translateX(5%);
    }
}

.snow-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #f0f8ff 0%, #e0e6ed 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.snow-background.active {
    opacity: 1;
}

.snowflake {
    position: absolute;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    animation: snowfall 8s linear infinite;
}

@keyframes snowfall {
    0% { transform: translateY(-10px); opacity: 0.8; }
    100% { transform: translateY(100dvh); opacity: 0; }
}

.freezing-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to bottom, #a1c4fd, #c2e9fb);
    background-blend-mode: lighten;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.freezing-background.active {
    opacity: 1;
}

.rain-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, #2C3E50 0%, #34495E 30%, #5D6D7E 70%, #85929E 100%);
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.rain-background.active {
    opacity: 1;
}

.rain {
    position: absolute;
    top: -100px;
    width: 100%;
    height: calc(100% + 100px);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.rain.active {
    opacity: 1;
}

.raindrop {
    position: absolute;
    width: 2px;
    height: 15px;
    background: linear-gradient(180deg, transparent 0%, rgba(173, 216, 230, 0.8) 20%, rgba(135, 206, 235, 0.9) 100%);
    border-radius: 0 0 50% 50%;
    animation: rainFall linear infinite;
}

@keyframes rainFall {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100dvh + 100px));
        opacity: 0;
    }
}

.rain-cloud {
    position: absolute;
    background: linear-gradient(135deg, #34495E 0%, #2C3E50 100%);
    border-radius: 50px;
    opacity: 0.9;
    animation: cloudFloat 15s ease-in-out infinite;
}

.rain-cloud:before,
.rain-cloud:after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, #34495E 0%, #2C3E50 100%);
    border-radius: 50px;
}

.rain-cloud1 {
    width: 120px;
    height: 50px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.rain-cloud1:before {
    width: 60px;
    height: 60px;
    top: -30px;
    left: 15px;
}

.rain-cloud1:after {
    width: 70px;
    height: 55px;
    top: -25px;
    right: 20px;
}

.rain-cloud2 {
    width: 140px;
    height: 60px;
    top: 20%;
    right: 10%;
    animation-delay: -3s;
}

.rain-cloud2:before {
    width: 70px;
    height: 70px;
    top: -35px;
    left: 20px;
}

.rain-cloud2:after {
    width: 80px;
    height: 65px;
    top: -30px;
    right: 25px;
}

.rain-cloud3 {
    width: 100px;
    height: 40px;
    top: 15%;
    left: 40%;
    animation-delay: -7s;
}

.rain-cloud3:before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 12px;
}

.rain-cloud3:after {
    width: 55px;
    height: 45px;
    top: -20px;
    right: 15px;
}

.lightning {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
    transition: background-color 0.05s ease-out, opacity 0.05s ease-out;
}

.lightning.flash {
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 1;
    transition: none;
}

@keyframes lightningFlash {
    0% { opacity: 0; }
    50% { opacity: 0.9; }
    100% { opacity: 0; }
}

.water-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 220px;
    overflow: hidden; 
    z-index: 1;
    opacity: 0; 
    background: linear-gradient(180deg,
        rgba(60, 130, 210, 0.65) 0%,
        rgba(40, 90, 180, 0.75) 100%);
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);

    transition: transform 3s ease-out, opacity 2s ease-in-out;
}

.water-container.active-waves {
    opacity: 1;
    transform: translateY(0);
}

.water-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    transform: translateX(0);
}

.water-wave:not(.back-wave) {
    z-index: 1;
    width: 200%;
    bottom: 30px;
    animation: waveAnimationFront 15s cubic-bezier(0.55, 0.085, 0.68, 0.45) infinite alternate;
}

.water-wave.back-wave {
    z-index: 2;
    width: 200%;
    animation: waveAnimationBack 20s cubic-bezier(0.25, 0.46, 0.45, 0.35) infinite alternate-reverse;
}

@keyframes waveAnimationFront {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes waveAnimationBack {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes floatDuck {
    0% {
        transform: translateY(0px);
    }
    100% {
        transform: translateY(-25px) rotate(-10deg);
    }
}

@keyframes swimDuck {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-80%) translateY(-20px);
    }
}

.rubber-duck {
    position: absolute;
    bottom: 30px;
    width: 80px;
    height: auto;
    z-index: 3;
    animation: swimDuck 3s ease-in-out infinite alternate,
               floatDuck 5s cubic-bezier(0.55, 0.085, 0.68, 0.45) infinite alternate;
}

.duck1 {
    left: 20%;
    animation-delay: 0s, 0s;
}

.duck2 {
    left: 60%;
    animation-delay: 1s, 1s;
}

.duck3 {
    left: 80%;
    animation-delay: 2s, 2s;
}

.screen-drops {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 13;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.screen-drops.active {
    opacity: 1;
}

.screen-drop {
    z-index: 3;
    position: absolute;
    width: 8px;
    height: 12px;
    background: radial-gradient(circle, rgba(173, 216, 230, 0.4) 0%, rgba(135, 206, 235, 0.6) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: dropSlide 3s ease-in-out infinite;
}

@keyframes dropSlide {
    0% { transform: translateY(0); opacity: 0.8; }
    100% { transform: translateY(20px); opacity: 0; }
}

.cloud {
    position: absolute;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 50px;
    opacity: 0.9;
    animation: cloudFloat 20s ease-in-out infinite;
}

.cloud:before,
.cloud:after {
    content: '';
    position: absolute;
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 50px;
}

.cloud1 {
    width: 80px;
    height: 30px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.cloud1:before {
    width: 40px;
    height: 40px;
    top: -20px;
    left: 10px;
}

.cloud1:after {
    width: 50px;
    height: 35px;
    top: -15px;
    right: 15px;
}

.cloud2 {
    width: 100px;
    height: 40px;
    top: 30%;
    left: 70%;
    animation-delay: -5s;
}

.cloud2:before {
    width: 50px;
    height: 50px;
    top: -25px;
    left: 15px;
}

.cloud2:after {
    width: 60px;
    height: 45px;
    top: -20px;
    right: 20px;
}

.cloud3 {
    width: 60px;
    height: 25px;
    top: 15%;
    left: 45%;
    animation-delay: -10s;
}

.cloud3:before {
    width: 30px;
    height: 30px;
    top: -15px;
    left: 8px;
}

.cloud3:after {
    width: 35px;
    height: 28px;
    top: -12px;
    right: 12px;
}

.cloud4 {
    width: 70px;
    height: 30px;
    top: 25%;
    left: 30%;
    animation-delay: -12s;
}

.cloud4:before {
    width: 35px;
    height: 35px;
    top: -20px;
    left: 10px;
}

.cloud4:after {
    width: 40px;
    height: 30px;
    top: -15px;
    right: 15px;
}

.cloud5 {
    width: 90px;
    height: 40px;
    top: 10%;
    left: 60%;
    animation-delay: -15s;
}

.cloud5:before {
    width: 45px;
    height: 45px;
    top: -25px;
    left: 15px;
}

.cloud5:after {
    width: 50px;
    height: 40px;
    top: -20px;
    right: 20px;
}

.cloud6 {
    width: 50px;
    height: 20px;
    top: 18%;
    left: 75%;
    animation-delay: -8s;
}

.cloud6:before {
    width: 25px;
    height: 25px;
    top: -12px;
    left: 6px;
}

.cloud6:after {
    width: 30px;
    height: 22px;
    top: -10px;
    right: 10px;
}

@keyframes cloudFloat {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(15px) translateY(-10px); }
    50% { transform: translateX(-10px) translateY(6px); }
    75% { transform: translateX(16px) translateY(-4px); }
}

.trees {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, transparent 0%, #228B22 40%, #006400 100%);
}

.tree {
    position: absolute;
    bottom: 0;
}

.tree1 {
    left: 5%;
    transform: scale(1.2);
}

.tree2 {
    left: 15%;
    transform: scale(0.8);
}

.tree3 {
    right: 10%;
    transform: scale(1.5);
}

.tree4 {
    right: 25%;
    transform: scale(0.9);
}

.tree-trunk {
    width: 15px;
    height: 40px;
    background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
    margin: 0 auto;
    border-radius: 0 0 8px 8px;
}

.tree-leaves {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 60px solid #228B22;
    margin-bottom: -10px;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2));
}

.tree-leaves:before {
    content: '';
    position: absolute;
    left: -25px;
    top: 20px;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid #32CD32;
}

.weather-app {
    margin-top: 40px;
    border-radius: 22px;
    box-shadow: 0 8px 32px var(--box-shadow-color);
    padding: 25px 20px 20px 20px;
    width: 95%;
    max-width: 430px;
    text-align: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeInUp 0.9s cubic-bezier(0.23, 1, 0.32, 1);
    border: 0px;
    position: relative;
    z-index: 10;
    overflow: visible;
}


/* night */
.night-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background: linear-gradient(180deg, rgba(20,30,60,0.8), rgba(10,15,40,0.95));
    backdrop-filter: brightness(0.6);
}
.night-background.active {
    opacity: 1;
}

/* Stars */
.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite alternate;
}

.star1 {
    width: 2px;
    height: 2px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.star2 {
    width: 3px;
    height: 3px;
    top: 30%;
    left: 80%;
    animation-delay: 1s;
}

.star3 {
    width: 1.5px;
    height: 1.5px;
    top: 15%;
    left: 60%;
    animation-delay: 2s;
}

.star4 {
    width: 2.5px;
    height: 2.5px;
    top: 25%;
    left: 40%;
    animation-delay: 0.5s;
}

.star5 {
    width: 2px;
    height: 2px;
    top: 35%;
    left: 25%;
    animation-delay: 1.5s;
}

@keyframes twinkle {
    0% { opacity: 0.3; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.2); }
}

/* Moon */
.moon {
    position: absolute;
    top: 10%;
    right: 15%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at 30% 30%, #F7F7F7 0%, #E8E8E8 70%, #D0D0D0 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    animation: moonGlow 4s ease-in-out infinite alternate;
}

@keyframes moonGlow {
    0% { box-shadow: 0 0 30px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: 0 0 50px rgba(255, 255, 255, 0.5); }
}

.night-background .moon,
.night-background .star {
    display: none;
}

.night-background.active .moon,
.night-background.active .star {
    display: block;
}

.night-background.active ~ #sunny-background .sun {
    display: none;
}

.sun {
    position: absolute;
    top: 15%;
    right: 20%;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, #FFD700 0%, #FFA500 70%, #FF8C00 100%);
    border-radius: 50%;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.6);
    animation: sunGlow 3s ease-in-out infinite alternate, floatY 6s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

.sun::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: sunRotate 20s linear infinite;
}

@keyframes sunGlow {
    0% { transform: scale(1); box-shadow: 0 0 50px rgba(255, 215, 0, 0.6); }
    100% { transform: scale(1.05); box-shadow: 0 0 80px rgba(255, 215, 0, 0.8); }
}

@keyframes sunRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    0% {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    }
    100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    }
}

.search-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    animation: fadeIn 1.2s 0.2s backwards;
    background: transparent;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.search-bar input[type="text"] {
    padding: 13px 18px;
    border: none;
    border-radius: 25px;
    outline: none;
    font-size: 1.08em;
    width: 70%;
    background-color: transparent;
    color: var(--detail-value-color);
    transition: background 0.3s;
    box-shadow: none;
}

.search-bar input[type="text"]:focus {
    border: none;
    background: rgba(255,255,255,0.08);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2);
}

.search-bar input[type="text"]::placeholder {
    color: var(--font-color);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 0 0 5px rgba(255, 255, 255, 0.2);
    margin-bottom: 16px;
    animation: fadeIn 1.2s 0.3s backwards;
    letter-spacing: 1.2px;
}

.search-bar button {
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 50%;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 1.2em;
    box-shadow: none;
    transition: background 0.2s, transform 0.18s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-bar button:hover {
    transform: scale(1.08);
}

.weather-display {
    margin-bottom: 20px;
    display: none;
    animation: fadeIn 1s 0.3s backwards;
}

.weather-display.show {
    display: block;
}

.location {
    font-weight: 700;
    font-size: 2.1em;
    margin-bottom: 8px;
    color: var(--heading-color);
    font-weight: 600;
    letter-spacing: 1px;
    animation: fadeIn 1.2s 0.4s backwards;
    text-shadow: 0 0 10px rgba(144,202,249,0.25), 0 0 3px rgba(144,202,249,0.15);
}

.main-info {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
    color: var(--font-color);
    animation: fadeIn 1.2s 0.5s backwards;
}

.temp {
    font-size: 3.7em;
    font-weight: 800;
    margin: 0;
    color: var(--accent);
    text-shadow: 0 0 15px rgba(255, 179, 0, 0.25), 0 0 5px rgba(255, 179, 0, 0.15);
}

.desc, .description {
    font-size: 1.22em;
    margin-bottom: 0px;
    color: var(--font-color);
    font-style: italic;
    animation: fadeIn 1.2s 0.6s backwards;
}

.small-desc {
    font-size: 1.1em;
    margin-bottom: 22px;
    color: var(--detail-label-color);
    font-style: italic;
    animation: fadeIn 1.2s 0.6s backwards;
}

.details {
    display: flex;
    justify-content: space-between;
    padding: 16px 0 8px 0;
    animation: fadeIn 1.2s 0.7s backwards;
    margin: 0 8px;
    gap: 10px;
}

.detail-item {
    text-align: center;
    font-size: 1.08em;
    min-width: 90px;
    padding: 18px;
    border-radius: 12px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

.detail-item p:first-child {
    margin-bottom: 4px;
    color: var(--detail-label-color);
    font-size: 0.98em;
}

.detail-item span {
    font-weight: 600;
    color: var(--detail-value-color);
    font-size: 1.13em;
}

@media (max-width: 500px) {
    .weather-app {
    padding: 18px 6px 18px 6px;
    max-width: 98vw;
    }
    .search-bar input[type="text"] {
    width: 60%;
    font-size: 1em;
    }
    .main-info .temp {
    font-size: 2.2em;
    }
    
    .sun {
        width: 80px;
        height: 80px;
        top: 10%;
        right: 15%;
    }
    
    .cloud1, .cloud2, .cloud3 {
        transform: scale(0.7);
    }
    
    .trees {
        height: 150px;
    }
}

.dropdown-container {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1002;
}

.menu-button {
    font-size: 1.5rem;
    padding: 0.6rem 0.9rem;
    border: none;
    border-radius: 18px;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(5px);
    cursor: pointer;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    color: var(--font-color);
}

.menu-button:hover {
    transform: translateY(-1px);
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 180px;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(5px);
    border-radius: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1003;
    color: var(--font-color);
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--font-color);
    transition: background 0.2s ease;
    border-radius: 12px;
}

.dropdown-menu a:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.pin-button {
    position: absolute;
    top: -15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.85em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(-10px) scale(0.9);
    animation: slideInPin 0.3s cubic-bezier(0.23, 1, 0.32, 1) 0.3s forwards;
}

@keyframes slideInPin {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.pin-button::before {
    font-size: 1em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.pin-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 1);
}

.pin-button:active {
    transform: translateY(0) scale(0.95);
    transition: transform 0.1s ease;
}

.pin-button.pinned {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: rgba(34, 197, 94, 1);
}

.pin-button.pinned::before {
    content: "✓";
    color: rgba(34, 197, 94, 1);
}

.pin-button.pinned:hover {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.6);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .daily-forecast {
        padding: 16px 12px;
    }
    
    .forecast-day {
        gap: 6px;
        font-size: 0.8em;
    }
    
    .forecast-day .icon {
        width: 32px;
        height: 32px;
    }
    
    .forecast-day .temp {
        font-size: 1.1em;
    }
    
    .forecast-day .condition {
        font-size: 0.7em;
    }
}

hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    margin: 16px 0;
    opacity: 0.8;
}

@media (max-width: 480px) {
    .weather-app {
        padding: 15px 12px;
        max-width: 96vw;
        margin-top: 25px;
        border-radius: 18px;
    }
    .app-heading {
        font-size: 1.5em;
        margin-bottom: 12px;
        letter-spacing: 0.8px;
        text-align: center;
    }
    .search-bar {
        gap: 6px;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    .search-bar input[type="text"] {
        width: 70%;
        font-size: 0.95em;
        padding: 11px 16px;
    }
    .search-bar button {
        padding: 12px 14px;
        font-size: 1.1em;
        flex-shrink: 0;
    }
    .main-info .temp {
        font-size: 2.8em;
        font-weight: 700;
    }
    .weather-display h2 {
        font-size: 1.8em;
        margin-bottom: 6px;
    }
    .desc, .description {
        font-size: 1.1em;
        margin-bottom: 18px;
    }
    .details {
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
    }
    .detail-item {
        font-size: 1em;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 12px;
    }
    .daily-forecast {
        padding: 12px 8px;
        margin-top: 12px;
        gap: 8px;
    }
    .forecast-day {
        flex: 1 1 calc(50% - 4px);
        padding: 12px 6px;
        background: rgba(255, 255, 255, 0.08);
        border-radius: 12px;
    }
    .forecast-day .icon {
        width: 28px;
        height: 28px;
    }
    .forecast-day .temp {
        font-size: 1em;
    }
    .forecast-day .condition {
        font-size: 0.65em;
    }
    .pin-button-style {
        padding: 6px 12px;
        font-size: 0.8em;
    }
}

@media (max-width: 360px) {
    .weather-app {
        padding: 12px 8px;
        margin-top: 25px;
    }
    .main-info .temp {
        font-size: 2.4em;
    }
    .weather-display h2 {
        font-size: 1.6em;
    }
    .search-bar input[type="text"] {
        width: 65%;
        font-size: 0.9em;
        padding: 10px 14px;
    }
    .search-bar button {
        padding: 10px 12px;
        font-size: 1em;
    }
    .forecast-day {
        flex: 1 1 100%;
    }
    .daily-forecast {
        flex-direction: column;
    }
    .pin-button-style {
        padding: 5px 10px;
        font-size: 0.75em;
    }
}

.alpha-heading {
    text-align: center;
    background-color: rgba(255, 165, 0, 0.2);
    border: 1px solid rgba(255, 165, 0, 0.5);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    font-family: Arial, sans-serif;
    color: #ff8c00;
    animation: fadeInUp 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.alpha-heading h2 {
    margin: 0;
    font-size: 1.5em;
}

.alpha-heading p {
    margin: 5px 0 0;
    font-size: 0.9em;
}

.error-div {
    position: absolute;
    top: calc(100% + 50px);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 0, 0, 0.15);
    border: 1px solid rgba(255, 0, 0, 0.4);
    border-radius: 10px;
    padding: 12px 20px;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
    font-family: Arial, sans-serif;
    color: #dd647b;
    min-width: 300px;
    max-width: 90vw;
    text-align: center;
}

.error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.error-message {
    margin: 0;
    font-size: 1em;
    flex-grow: 1;
}

.error-close {
    background: none;
    border: none;
    color: #dd647b;
    font-size: 1.2em;
    cursor: pointer;
    padding-left: 10px;
}

.hourly-forecast {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    padding: 16px 12px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 16px;
    animation: fadeIn 1s ease-in-out;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}

.hourly-forecast::-webkit-scrollbar {
    display: none;
}

.hourly-forecast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.hourly-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    font-size: 0.8em;
    color: white;
    min-width: 20px;
    padding: 10px 10px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    border-radius: 12px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.hourly-item .hour-time {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.644);
    font-size: 0.85em;
    margin-bottom: 2px;
}

.hourly-item .icon {
    width: 32px;
    height: 32px;
    margin: 2px 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.hourly-item .hour-temp {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--accent-2);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    margin: 2px 0;
}

.hourly-item .hour-rain {
    font-size: 0.9em;
    color: var(--heading-color);
    line-height: 1.2;
    margin-top: 2px;
    margin-bottom: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
    .hourly-forecast {
        padding: 14px 10px;
        gap: 10px;
    }
    
    .forecast-hour {
        gap: 5px;
        font-size: 0.75em;
        min-width: 60px;
        padding: 5px 6px;
    }
    
    .forecast-hour .icon {
        width: 28px;
        height: 28px;
    }
    
    .forecast-hour .temp {
        font-size: 1em;
    }
    
    .forecast-hour .condition {
        font-size: 0.65em;
    }
}

@media (max-width: 480px) {
    .hourly-forecast {
        padding: 12px 8px;
        gap: 8px;
    }
    
    .forecast-hour {
        min-width: 55px;
        padding: 4px 5px;
    }
    
    .forecast-hour .icon {
        width: 24px;
        height: 24px;
    }
    
    .forecast-hour .temp {
        font-size: 0.95em;
    }
    
    .forecast-hour .condition {
        font-size: 0.6em;
    }
}

.daily-forecast {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    padding: 20px 16px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 16px;
    animation: fadeIn 1s ease-in-out;
    position: relative;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
}

.daily-forecast::-webkit-scrollbar {
    display: none;
}

.daily-forecast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
    background-attachment: fixed;
}

.daily-forecast {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.daily-item {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 0.8fr;
    align-items: center;
    padding: 12px 16px;
    background: transparent;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    gap: 12px;
    transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.daily-item:hover, .detail-item:hover, .hourly-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.daily-day {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.day-name {
    font-weight: 600;
    font-size: 16px;
    color: white;
    margin-bottom: 2px;
}

.day-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.daily-weather {
    display: flex;
    align-items: center;
    gap: 10px;
}

.daily-emoji {
    font-size: 24px;
    display: block;
}

.daily-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
}

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

.daily-high {
    font-weight: 600;
    font-size: 16px;
    color: white;
}

.daily-low {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

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

.rain-prob {
    font-size: 14px;
    color: #4FC3F7;
    font-weight: 500;
}

.rain-amount {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 600px) {
    .daily-item {
        grid-template-columns: 1fr 1.2fr 0.8fr 0.7fr;
        gap: 8px;
        padding: 10px 12px;
    }
    
    .daily-emoji {
        font-size: 20px;
    }
    
    .daily-desc {
        font-size: 11px;
    }
    
    .day-name {
        font-size: 14px;
    }
    
    .daily-high {
        font-size: 14px;
    }
    
    .daily-low {
        font-size: 12px;
    }
}

@media (max-width: 400px) {
    .daily-item {
        grid-template-columns: 0.8fr 1fr 0.7fr 0.6fr;
        gap: 6px;
        padding: 8px 10px;
    }
    
    .daily-desc {
        display: none;
    }
}


/* Pinned section */


.pinned-section {
    top: 10px;
    position: relative;
    transform: translateY(-10px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.pin-list-scroll {
    display: none;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    padding: 30px 48px 30px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 8px;
    position: relative;
}

.pin-list-scroll::-webkit-scrollbar {
    display: none;
}

.pin-list-scroll.show{
    display: flex;
}

.pin-name {
    display: inline-block;
    padding: 8px 16px;
    margin: 2px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(-20px) scale(0.9);
    animation: slideInButton 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
}
.pin-flag{
    margin-left: 8px;
    vertical-align: middle;
    width: 24px;
    height: 18px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    display: inline-block;
    transition: transform 0.2s ease;
}

.pin-name:nth-child(1) { animation-delay: 0.1s; }
.pin-name:nth-child(2) { animation-delay: 0.2s; }
.pin-name:nth-child(3) { animation-delay: 0.3s; }
.pin-name:nth-child(4) { animation-delay: 0.4s; }
.pin-name:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInButton {
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.pin-name:hover {    
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.isediting {
    background-color: rgba(245, 94, 94, 0.1);
    border: 1.5px solid rgba(245, 94, 94, 0.3);
}

.isediting:hover {
    background-color: rgba(245, 94, 94, 0.2);
    border-color: rgba(245, 94, 94, 0.6);
}

.pin-name:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.edit-pins-btn {
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    background-color: rgba(245, 94, 94, 0.1);
    border: 1.5px solid rgba(245, 94, 94, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9em;
    cursor: pointer;
    color: rgba(245, 94, 94, 0.8);
    z-index: 20;
    opacity: 1;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.edit-pins-btn.show {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.edit-pins-btn:hover {
    background-color: rgba(245, 94, 94, 0.2);
    border-color: rgba(245, 94, 94, 0.6);
    color: rgba(245, 94, 94, 1);
    box-shadow: 0 4px 12px rgba(245, 94, 94, 0.3);
}

.edit-pins-btn:active {
    transform: translateY(-50%) translateX(0) scale(0.95);
}



/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--card-background-color);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content,
.hourly-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.98);
    background: rgba(27, 27, 27, 0.014);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 22px;
    box-shadow: 0 8px 32px var(--box-shadow-color);
    padding: 25px 20px 20px 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80dvh;
    overflow-y: auto;
    border: 0px;
    color: var(--font-color);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    animation: fadeInUp 0.9s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    overflow: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.modal-content::-webkit-scrollbar,
.hourly-modal-content::-webkit-scrollbar {
    display: none; 
}

.modal-overlay.show .modal-content,
.modal-overlay.show .hourly-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 16px;
    animation: fadeIn 1.2s 0.2s backwards;
    position: relative;
}

.close,
.close-button {
    position: absolute;
    top: -10px;
    right: -5px;
    background: transparent;
    border: none;
    color: var(--font-color);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.18s;
    padding: 5px 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close:hover,
.close-button:hover {
    transform: translateY(-1px) scale(1.05);
    color: #fa563981;
}

.modal-weather-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 10px;
}

.modal-header h3 {
    font-size: 2.1em;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--heading-color);
    text-shadow: 0 0 10px rgba(144,202,249,0.25), 0 0 3px rgba(144,202,249,0.15);
    margin: 10px 0 5px 0;
}

.modal-header p {
    font-size: 1.22em;
    margin: 0;
    color: var(--font-color);
    font-style: italic;
    text-transform: capitalize;
}

.modal-temp-section {
    text-align: center;
    margin-bottom: 20px;
    animation: fadeIn 1.2s 0.3s backwards;
}

.temp-main {
    font-size: 3.7em;
    font-weight: 800;
    margin: 20px 0;
    color: var(--accent);
    text-shadow: 0 0 15px rgba(255, 179, 0, 0.25), 0 0 5px rgba(255, 179, 0, 0.15);
}

.temp-details {
    text-align: center;
    margin-bottom: 20px;
}

.temp-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.temp-label {
    color: var(--detail-label-color);
    font-size: 1.1em;
}

.temp-value {
    font-weight: bold;
    color: var(--detail-value-color);
    font-size: 1.13em;
}

.modal-details {
    animation: fadeIn 1.2s 0.7s backwards;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    gap: 10px;
}

.detail-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.037) 0%, rgba(220, 218, 218, 0.11) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    transition: background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.detail-item:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.08) 100%);
}

.detail-item.full-width {
    flex: 100%;
}

.detail-label {
    font-size: 0.98em;
    margin-bottom: 4px;
    color: var(--detail-label-color);
}

.detail-value {
    font-weight: 600;
    font-size: 1.13em;
    color: var(--detail-value-color);
}

.windy-embed {
    width: 100%;
    max-width: 650px;
    height: 450px;
    border: none;
    border-radius: 18px;
    margin: 24px auto 0 auto;
    display: block;
    box-shadow: 0 8px 32px var(--box-shadow-color);
    background: var(--card-background-color);
    transition: box-shadow 0.3s, transform 0.3s;
    z-index: 12;
}

.windy-embed:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .windy-embed {
        max-width: 98vw;
        height: 320px;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    .windy-embed {
        max-width: 100vw;
        height: 220px;
        border-radius: 10px;
        margin-top: 16px;
    }
}

.hail-background {
    background: linear-gradient(135deg, #2c3e50 0%, #4a6741 40%, #34495e 100%);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.hail-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hailstone {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #ffffff 0%, #e8e8e8 50%, #d0d0d0 100%);
    border-radius: 50%;
    animation: hailfall 2s linear infinite;
    opacity: 0.9;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.5);
}

.hailstone:nth-child(2n) {
    width: 8px;
    height: 8px;
    animation-duration: 1.8s;
}

.hailstone:nth-child(3n) {
    width: 4px;
    height: 4px;
    animation-duration: 2.2s;
}

.hailstone:nth-child(4n) {
    width: 10px;
    height: 10px;
    animation-duration: 1.5s;
}

@keyframes hailfall {
    0% {
        transform: translateY(-100dvh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.9;
    }
    90% {
        opacity: 0.9;
    }
    100% {
        transform: translateY(100dvh) rotate(360deg);
        opacity: 0;
    }
}

#hail-lightning-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    animation: hailLightning 4s infinite;
}

@keyframes hailLightning {
    0%, 90%, 92%, 94%, 96%, 98%, 100% {
        opacity: 0;
    }
    91%, 93%, 95%, 97%, 99% {
        opacity: 0.9;
    }
}

.hail-background .rain-cloud {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c2c2c 100%);
}

#error-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%) scale(0.92);
    min-width: 320px;
    max-width: 92vw;
    background: rgba(255, 0, 0, 0.13);
    border: 1.5px solid rgba(255, 0, 0, 0.35);
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(255, 0, 0, 0.13);
    color: #d32f2f;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1em;
    z-index: 99999;
    padding: 16px 28px;
    text-align: center;
    display: none;
    opacity: 0;
    animation: popupFadeIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

#error-container.show {
    display: block;
    animation: popupFadeIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes popupFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.92);
    }
    60% {
        opacity: 1;
        transform: translateX(-50%) scale(1.04);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

#error-container .error-close {
    position: absolute;
    top: 8px;
    right: 14px;
    background: none;
    border: none;
    color: #d32f2f;
    font-size: 1.3em;
    cursor: pointer;
    padding: 0 6px;
    border-radius: 50%;
    transition: background 0.2s;
}

#error-container .error-close:hover {
    background: rgba(255,0,0,0.08);
}

@media (max-width: 480px) {
    #error-container {
        min-width: 180px;
        padding: 12px 10px;
        font-size: 0.95em;
    }
}

.autocomplete-items {
    position: absolute;
    top: 45px;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(219, 219, 219, 0.23);
    border-radius: 18px;
    box-shadow: 0 8px 24px var(--box-shadow-color);
    margin-top: 6px;
    padding: 6px 0;
    max-height: 260px;
    overflow-y: auto;
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--font-color);
    font-family: inherit;
    animation: autocompleteFadeIn 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    animation-fill-mode: forwards;
}

@keyframes autocompleteFadeIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.autocomplete-item {
    padding: 12px 22px;
    cursor: pointer;
    font-size: 1.05em;
    border-radius: 10px;
    transition: background 0.18s, color 0.18s, transform 0.18s;
    color: var(--font-color);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(-10px);
    animation: autocompleteItemFadeIn 0.32s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes autocompleteItemFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.autocomplete-item:nth-child(1) { animation-delay: 0.04s; }
.autocomplete-item:nth-child(2) { animation-delay: 0.08s; }
.autocomplete-item:nth-child(3) { animation-delay: 0.12s; }
.autocomplete-item:nth-child(4) { animation-delay: 0.16s; }
.autocomplete-item:nth-child(5) { animation-delay: 0.20s; }
.autocomplete-item:nth-child(6) { animation-delay: 0.24s; }
.autocomplete-item:nth-child(7) { animation-delay: 0.28s; }
.autocomplete-item:nth-child(8) { animation-delay: 0.32s; }

.autocomplete-item:hover,
.autocomplete-item.active {
    background: linear-gradient(90deg, rgba(144,202,249,0.25) 0%, rgba(33,150,243,0.13) 100%);
    color: var(--detail-label-color);
    transform: scale(1.03);
}

.autocomplete-item .flag {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    margin-right: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    opacity: 0.85;
    transition: opacity 0.18s;
}

.autocomplete-item:hover .flag,
.autocomplete-item.active .flag {
    opacity: 1;
}

.autocomplete-flag {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    margin-right: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    opacity: 0.85;
    vertical-align: middle;
    transition: opacity 0.18s;
}

.autocomplete-item:hover .autocomplete-flag,
.autocomplete-item.active .autocomplete-flag {
    opacity: 1;
}

.city-name {
    font-weight: 600;
    color: var(--detail-value-color);
    margin-right: 8px;
    font-size: 1.08em;
    letter-spacing: 0.2px;
}

.country-name {
    color: var(--detail-label-color);
    font-size: 0.98em;
    opacity: 0.85;
    margin-left: 2px;
    letter-spacing: 0.2px;
}

@media (max-width: 480px) {
    .autocomplete-flag {
        width: 18px;
        height: 13px;
        margin-right: 6px;
    }
    .city-name {
        font-size: 0.97em;
        margin-right: 6px;
    }
    .country-name {
        font-size: 0.92em;
        margin-left: 2px;
    }
}

@media (max-width: 480px) {
    .autocomplete-items {
        border-radius: 10px;
        font-size: 0.97em;
        max-height: 180px;
    }
    .autocomplete-item {
        padding: 10px 14px;
        font-size: 0.97em;
    }
    .autocomplete-item .flag {
        width: 18px;
        height: 13px;
        margin-right: 6px;
    }
}