/* ===================== RESET & BASE ===================== */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    --font: 'Outfit', sans-serif;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-hover: rgba(255, 255, 255, 0.14);
    --shadow: 0 8px 32px rgba(0,0,0,0.3);
    --radius: 24px;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background 1.2s ease;
    color: #fff;
}

/* ===================== BACKGROUNDS ===================== */
.weather-clear {
    background: linear-gradient(135deg, #0f2027, #1a4a6b, #2c7bb6, #f7971e);
    background-size: 400% 400%;
    animation: bgShift 12s ease infinite;
}
.weather-clouds {
    background: linear-gradient(135deg, #1c1c2e, #2d3561, #5a6185, #8a9bb5);
    background-size: 400% 400%;
    animation: bgShift 12s ease infinite;
}
.weather-rain {
    background: linear-gradient(135deg, #0d0d1a, #1a2a4a, #2c3e6e, #1565C0);
    background-size: 400% 400%;
    animation: bgShift 8s ease infinite;
}
.weather-snow {
    background: linear-gradient(135deg, #1a1a2e, #2d4a6e, #5b8db8, #c9e8ff);
    background-size: 400% 400%;
    animation: bgShift 15s ease infinite;
}
.weather-mist {
    background: linear-gradient(135deg, #1a1a2e, #2e3d52, #607d8b, #90a4ae);
    background-size: 400% 400%;
    animation: bgShift 10s ease infinite;
}
.weather-drizzle {
    background: linear-gradient(135deg, #0d1b2a, #1b3a5c, #2e6b9e, #4a90c4);
    background-size: 400% 400%;
    animation: bgShift 10s ease infinite;
}
.weather-thunder {
    background: linear-gradient(135deg, #0a0a0a, #1a1a2e, #2d1b4e, #4a0080);
    background-size: 400% 400%;
    animation: bgShift 6s ease infinite;
}

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

/* ===================== PARTICLES ===================== */
.bg-animation {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    animation: floatUp linear infinite;
}
.particle:nth-child(1) { width:80px; height:80px; left:10%; animation-duration:18s; animation-delay:0s; }
.particle:nth-child(2) { width:50px; height:50px; left:25%; animation-duration:22s; animation-delay:3s; }
.particle:nth-child(3) { width:120px; height:120px; left:40%; animation-duration:15s; animation-delay:1s; }
.particle:nth-child(4) { width:40px; height:40px; left:55%; animation-duration:25s; animation-delay:5s; }
.particle:nth-child(5) { width:90px; height:90px; left:65%; animation-duration:19s; animation-delay:2s; }
.particle:nth-child(6) { width:60px; height:60px; left:75%; animation-duration:21s; animation-delay:4s; }
.particle:nth-child(7) { width:30px; height:30px; left:85%; animation-duration:17s; animation-delay:6s; }
.particle:nth-child(8) { width:70px; height:70px; left:5%; animation-duration:23s; animation-delay:1s; }

@keyframes floatUp {
    0%   { transform: translateY(110vh) scale(0.5); opacity: 0; }
    10%  { opacity: 0.3; }
    90%  { opacity: 0.15; }
    100% { transform: translateY(-20vh) scale(1.2); opacity: 0; }
}

/* ===================== FLOATING SHAPES ===================== */
.floating-shapes {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: shapeFloat ease-in-out infinite;
}
.shape-1 {
    width: 400px; height: 400px;
    background: rgba(99,179,237,0.12);
    top: -100px; right: -100px;
    animation-duration: 20s; animation-delay: 0s;
}
.shape-2 {
    width: 300px; height: 300px;
    background: rgba(246,173,85,0.1);
    bottom: -80px; left: -80px;
    animation-duration: 25s; animation-delay: 5s;
}
.shape-3 {
    width: 250px; height: 250px;
    background: rgba(154,107,254,0.1);
    top: 50%; left: 50%;
    animation-duration: 18s; animation-delay: 10s;
}
@keyframes shapeFloat {
    0%, 100% { transform: translate(0,0) scale(1); }
    33% { transform: translate(30px,-40px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ===================== NAVBAR ===================== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 16px;
    flex-wrap: wrap;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
}
.nav-icon {
    font-size: 1.6rem;
    animation: spin 10s linear infinite;
    color: #ffd700;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.nav-cities {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nav-label {
    font-size: 0.8rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.city-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 7px 16px;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}
.city-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* ===================== MAIN CONTENT ===================== */
.main-content {
    position: relative;
    z-index: 10;
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 60px;
}

/* ===================== HERO SECTION ===================== */
.hero-section {
    text-align: center;
    padding: 60px 20px 40px;
    animation: fadeInDown 0.9s ease forwards;
}

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

.hero-title {
    display: flex;
    flex-direction: column;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 16px;
}
.title-line1 {
    color: rgba(255,255,255,0.7);
}
.title-line2 {
    background: linear-gradient(90deg, #ffd700, #ff8c00, #ff4500, #ffd700);
    background-size: 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerText 4s linear infinite;
}
@keyframes shimmerText {
    0% { background-position: 0%; }
    100% { background-position: 300%; }
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.7;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

/* ===================== SEARCH BAR ===================== */
.search-container {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 60px;
    padding: 8px 8px 8px 24px;
    gap: 12px;
    transition: var(--transition);
    box-shadow: 0 8px 32px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.15);
}
.search-box:focus-within {
    border-color: rgba(255,215,0,0.6);
    background: rgba(255,255,255,0.18);
    box-shadow: 0 8px 40px rgba(0,0,0,0.35), 0 0 0 4px rgba(255,215,0,0.1);
    transform: scale(1.01);
}

.search-icon {
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font);
    font-size: 1.05rem;
    font-weight: 400;
}
.search-box input::placeholder {
    color: rgba(255,255,255,0.4);
}

.search-btn {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 50px;
    padding: 12px 28px;
    color: #1a1a1a;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    flex-shrink: 0;
}
.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255,165,0,0.5);
}
.search-btn:active {
    transform: scale(0.98);
}

/* ---- Clear (X) Button ---- */
.clear-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: var(--transition);
    animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.clear-btn:hover {
    background: rgba(255, 80, 80, 0.35);
    border-color: rgba(255, 80, 80, 0.5);
    color: #fff;
    transform: rotate(90deg) scale(1.15);
    box-shadow: 0 0 12px rgba(255, 80, 80, 0.4);
}
.clear-btn:active {
    transform: rotate(90deg) scale(0.95);
}
@keyframes popIn {
    from { opacity: 0; transform: scale(0.5) rotate(-45deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ===================== WEATHER CARD WRAPPER ===================== */
.weather-card-wrapper {
    width: 100%;
    max-width: 700px;
    padding: 0 20px;
    margin-top: 40px;
    display: none;
    animation: slideUp 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}
.weather-card-wrapper.visible {
    display: block;
}

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

/* ===================== LOADING SPINNER ===================== */
.loading-spinner {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px;
}
.loading-spinner.active { display: flex; }

.spinner-ring {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255,255,255,0.15);
    border-top-color: #ffd700;
    border-radius: 50%;
    animation: rotate 0.9s linear infinite;
}
@keyframes rotate {
    to { transform: rotate(360deg); }
}
.loading-spinner p {
    font-size: 0.95rem;
    opacity: 0.6;
    animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.9; }
}

/* ===================== ERROR CARD ===================== */
.error-card {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 50px 30px;
    background: rgba(220,50,50,0.1);
    border: 1px solid rgba(220,50,50,0.3);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    animation: shake 0.5s ease;
}
.error-card.active { display: flex; }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
.error-icon {
    font-size: 3rem;
    color: #ff6b6b;
}
.error-card h3 { font-size: 1.4rem; font-weight: 700; }
.error-card p { opacity: 0.65; }

/* ===================== WEATHER CARD ===================== */
.weather-card {
    display: none;
    background: var(--glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}
.weather-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}
.weather-card.active { display: block; }

@keyframes cardEntrance {
    0%   { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ---- Card Header ---- */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    gap: 20px;
}

.location-info { flex: 1; }

.city-name {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -1px;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}
.country-name {
    font-size: 1rem;
    opacity: 0.6;
    font-weight: 400;
    margin-bottom: 8px;
}
.date-time {
    font-size: 0.85rem;
    opacity: 0.5;
    font-weight: 300;
}

/* ---- Weather Image ---- */
.weather-image-container {
    position: relative;
    flex-shrink: 0;
}

.weather-image {
    width: 130px;
    height: 130px;
    object-fit: contain;
    animation: floatWeather 3.5s ease-in-out infinite;
    filter: drop-shadow(0 10px 30px rgba(255,215,0,0.3));
    position: relative;
    z-index: 2;
}

@keyframes floatWeather {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-14px) rotate(3deg); }
}

.image-glow {
    position: absolute;
    width: 100px;
    height: 30px;
    background: rgba(255,215,0,0.25);
    border-radius: 50%;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    filter: blur(15px);
    animation: glowPulse 3.5s ease-in-out infinite;
}
@keyframes glowPulse {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) scaleX(0.8); }
    50% { opacity: 0.8; transform: translateX(-50%) scaleX(1.2); }
}

/* ---- Temperature ---- */
.temp-display {
    margin-bottom: 28px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
}

.main-temp {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    line-height: 1;
    margin-bottom: 8px;
}
.main-temp span:first-child {
    font-size: clamp(4rem, 12vw, 7rem);
    font-weight: 800;
    letter-spacing: -4px;
    background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: tempCount 0.8s ease forwards;
}
.temp-unit {
    font-size: 2rem;
    font-weight: 300;
    margin-top: 12px;
    opacity: 0.6;
}
.feels-like {
    font-size: 0.95rem;
    opacity: 0.55;
    margin-bottom: 8px;
}
.weather-desc {
    font-size: 1.15rem;
    font-weight: 600;
    text-transform: capitalize;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

/* ---- Stats Grid ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.stat-card {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 16px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    cursor: default;
    animation: statFadeIn 0.5s ease forwards;
    opacity: 0;
}
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }
.stat-card:nth-child(5) { animation-delay: 0.5s; }
.stat-card:nth-child(6) { animation-delay: 0.6s; }

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

.stat-card:hover {
    background: rgba(255,255,255,0.13);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.stat-icon-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(1.3) drop-shadow(0 0 6px rgba(255,215,0,0.4));
    flex-shrink: 0;
    animation: iconPop 0.4s ease forwards;
}
.stat-icon {
    font-size: 1.4rem;
    color: #ffd700;
    flex-shrink: 0;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}
.stat-label {
    font-size: 0.72rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 400;
}

/* ===================== FEATURES SECTION ===================== */
.features-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    width: 100%;
    padding: 50px 20px 20px;
    animation: fadeInUp 1s 0.4s ease both;
}

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

.feature-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(16px);
}
.feature-card:hover {
    background: var(--glass-hover);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 14px;
    display: block;
    animation: bounceIcon 2s ease-in-out infinite;
}
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.3s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 0.6s; }
@keyframes bounceIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.feature-card p {
    font-size: 0.82rem;
    opacity: 0.55;
    line-height: 1.5;
}

/* ===================== FOOTER ===================== */
.footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
    font-size: 0.82rem;
    opacity: 0.4;
    font-weight: 300;
}

/* ===================== RESPONSIVE ===================== */

/* ---------- Tablet (≤ 1024px) ---------- */
@media (max-width: 1024px) {
    .navbar {
        padding: 14px 28px;
        gap: 12px;
    }
    .nav-cities { gap: 8px; }
    .features-section {
        grid-template-columns: repeat(3, 1fr);
        padding: 40px 16px 16px;
    }
}

/* ---------- Small Tablet / Large Phone (≤ 768px) ---------- */
@media (max-width: 768px) {
    /* Navbar scrolls horizontally on small screens */
    .navbar {
        padding: 12px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .nav-brand { font-size: 1.3rem; }
    .nav-icon  { font-size: 1.4rem; }

    .nav-cities {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        gap: 8px;
        /* hide scrollbar but keep scroll */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .nav-cities::-webkit-scrollbar { display: none; }
    .nav-label { display: none; } /* hide label on small screens */
    .city-btn {
        font-size: 0.78rem;
        padding: 7px 14px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Hero */
    .hero-section { padding: 36px 16px 24px; }
    .hero-title   { letter-spacing: -1px; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 28px; }

    /* Search box — keep on one row, shrink button */
    .search-box {
        padding: 6px 6px 6px 18px;
        gap: 8px;
    }
    .search-btn {
        padding: 10px 18px;
        font-size: 0.88rem;
    }
    .search-btn span { display: none; } /* icon only on mobile */
    .search-btn i { margin: 0; }

    /* Main content top padding (navbar is taller now) */
    .main-content { padding-top: 120px; }

    /* Weather card */
    .weather-card-wrapper { padding: 0 14px; margin-top: 28px; }
    .weather-card { padding: 24px 18px; }

    .card-header {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
        gap: 14px;
    }
    .weather-image { width: 110px; height: 110px; }
    .city-name { font-size: 2rem; }

    .temp-display { padding-top: 18px; margin-bottom: 20px; }
    .main-temp span:first-child { font-size: 5.5rem; letter-spacing: -3px; }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .features-section {
        grid-template-columns: repeat(2, 1fr);
        padding: 36px 14px 14px;
        gap: 14px;
    }
    .feature-card { padding: 22px 16px; }
}

/* ---------- Phone (≤ 480px) ---------- */
@media (max-width: 480px) {
    /* Navbar */
    .navbar { padding: 10px 14px; }
    .nav-brand { font-size: 1.2rem; }

    /* Hero */
    .hero-section { padding: 28px 14px 20px; }

    /* Search */
    .search-container { max-width: 100%; }
    .search-box {
        padding: 6px 6px 6px 16px;
        gap: 6px;
        border-radius: 50px;
    }
    .search-box input { font-size: 0.95rem; }

    /* Main */
    .main-content { padding-top: 130px; }
    .weather-card-wrapper { padding: 0 10px; }
    .weather-card { padding: 20px 14px; border-radius: 18px; }

    /* Temperature */
    .main-temp span:first-child { font-size: 4.5rem; letter-spacing: -2px; }
    .temp-unit { font-size: 1.6rem; margin-top: 10px; }
    .weather-desc { font-size: 1rem; }
    .feels-like { font-size: 0.85rem; }

    /* Stats — 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .stat-card {
        padding: 12px 10px;
        gap: 8px;
        border-radius: 12px;
    }
    .stat-icon-img { width: 28px; height: 28px; }
    .stat-icon     { font-size: 1.1rem; }
    .stat-value    { font-size: 0.9rem; }
    .stat-label    { font-size: 0.65rem; }

    /* Features — 1 column */
    .features-section {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 28px 10px 10px;
    }
    .feature-card  { padding: 20px 16px; }
    .feature-icon  { font-size: 2rem; margin-bottom: 10px; }
    .feature-card h3 { font-size: 0.95rem; }

    /* Weather image smaller */
    .weather-image { width: 90px; height: 90px; }
    .city-name     { font-size: 1.7rem; }

    /* Clear btn tap target */
    .clear-btn { width: 30px; height: 30px; font-size: 0.78rem; }
}

/* ---------- Tiny Phone (≤ 360px) ---------- */
@media (max-width: 360px) {
    .hero-title { font-size: 2.2rem; letter-spacing: -0.5px; }
    .hero-subtitle { font-size: 0.85rem; }

    .search-btn { padding: 9px 14px; }
    .main-temp span:first-child { font-size: 3.8rem; }
    .weather-image { width: 75px; height: 75px; }

    .stat-card { padding: 10px 8px; gap: 6px; }
    .stat-value { font-size: 0.82rem; }
    .city-name  { font-size: 1.5rem; }
}