*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.15);
    --glass-hover: rgba(255, 255, 255, 0.18);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-tertiary: rgba(255, 255, 255, 0.5);
    --accent-blue: #4facfe;
    --accent-purple: #a78bfa;
    --accent-pink: #f093fb;
    --accent-orange: #f6d365;
    --header-bg: rgba(0, 0, 0, 0.25);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0c29;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app {
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    transition: background 1.5s ease;
}

.bg-gradient::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 100%, rgba(255,255,255,0.04) 0%, transparent 60%);
    pointer-events: none;
}

[data-theme="dark"] .bg-gradient.default {
    background: linear-gradient(160deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

[data-theme="dark"] .bg-gradient.sunny {
    background: linear-gradient(160deg, #FF8C00 0%, #FF6B35 25%, #f5af19 50%, #FFD700 100%);
}

[data-theme="dark"] .bg-gradient.warm-sunny {
    background: linear-gradient(160deg, #4facfe 0%, #56CCF2 25%, #f5af19 50%, #FFD700 100%);
}

[data-theme="dark"] .bg-gradient.hot-sunny {
    background: linear-gradient(160deg, #FF4500 0%, #FF6B35 25%, #FF8C00 50%, #FFD700 100%);
}

[data-theme="dark"] .bg-gradient.extreme-heat {
    background: linear-gradient(160deg, #8B0000 0%, #CC3300 20%, #FF4500 45%, #FF8C00 70%, #FFD700 100%);
}

[data-theme="dark"] .bg-gradient.cool-sunny {
    background: linear-gradient(160deg, #667eea 0%, #764ba2 25%, #f5af19 60%, #FFD700 100%);
}

[data-theme="dark"] .bg-gradient.cloudy {
    background: linear-gradient(160deg, #4a5568 0%, #5a6a7e 30%, #718096 60%, #8e9aaf 100%);
}

[data-theme="dark"] .bg-gradient.rainy {
    background: linear-gradient(160deg, #1a1a2e 0%, #2d3748 25%, #4a5568 50%, #5a6a7e 100%);
}

[data-theme="dark"] .bg-gradient.snowy {
    background: linear-gradient(160deg, #2d3748 0%, #4a5568 30%, #718096 60%, #a0aec0 100%);
}

[data-theme="dark"] .bg-gradient.stormy {
    background: linear-gradient(160deg, #0d0d1a 0%, #1a1a2e 30%, #2d2d44 60%, #3d3d5c 100%);
}

[data-theme="dark"] .bg-gradient.heavy-rain {
    background: linear-gradient(160deg, #0a0e1a 0%, #151d2e 25%, #1e2a3a 50%, #2a3648 100%);
}

[data-theme="dark"] .bg-gradient.drizzle {
    background: linear-gradient(160deg, #1e2a3a 0%, #2d3e50 30%, #3d5060 60%, #4a6070 100%);
}

[data-theme="dark"] .bg-gradient.foggy {
    background: linear-gradient(160deg, #3a3a4a 0%, #4a4a5a 30%, #5a5a6a 60%, #6a6a7a 100%);
}

[data-theme="dark"] .bg-gradient.night-clear {
    background: linear-gradient(160deg, #0a0a1a 0%, #1a1a3e 30%, #2d2b55 60%, #1a1a3e 100%);
}

[data-theme="dark"] .bg-gradient.night-cloudy {
    background: linear-gradient(160deg, #0d0d1a 0%, #1e1e30 30%, #2a2a40 60%, #1a1a2e 100%);
}

[data-theme="dark"] .bg-gradient.night-rain {
    background: linear-gradient(160deg, #080c14 0%, #0f1520 30%, #1a2030 60%, #0f1520 100%);
}

[data-theme="light"] .bg-gradient.default {
    background: linear-gradient(160deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
}

[data-theme="light"] .bg-gradient.sunny {
    background: linear-gradient(160deg, #fef3c7 0%, #fde68a 25%, #fbbf24 50%, #f59e0b 100%);
}

[data-theme="light"] .bg-gradient.warm-sunny {
    background: linear-gradient(160deg, #dbeafe 0%, #93c5fd 25%, #fde68a 60%, #fbbf24 100%);
}

[data-theme="light"] .bg-gradient.hot-sunny {
    background: linear-gradient(160deg, #fef3c7 0%, #fdba74 25%, #f97316 50%, #ea580c 100%);
}

[data-theme="light"] .bg-gradient.extreme-heat {
    background: linear-gradient(160deg, #fecaca 0%, #fca5a5 20%, #fdba74 45%, #f97316 70%, #ea580c 100%);
}

[data-theme="light"] .bg-gradient.cool-sunny {
    background: linear-gradient(160deg, #e0e7ff 0%, #c7d2fe 25%, #fde68a 60%, #fbbf24 100%);
}

[data-theme="light"] .bg-gradient.cloudy {
    background: linear-gradient(160deg, #e2e8f0 0%, #cbd5e1 30%, #94a3b8 60%, #b0bec5 100%);
}

[data-theme="light"] .bg-gradient.rainy {
    background: linear-gradient(160deg, #90a4ae 0%, #78909c 25%, #607d8b 50%, #546e7a 100%);
}

[data-theme="light"] .bg-gradient.snowy {
    background: linear-gradient(160deg, #f0f4ff 0%, #e0e7ff 30%, #c7d2fe 60%, #dbeafe 100%);
}

[data-theme="light"] .bg-gradient.stormy {
    background: linear-gradient(160deg, #546e7a 0%, #455a64 30%, #37474f 60%, #263238 100%);
}

[data-theme="light"] .bg-gradient.heavy-rain {
    background: linear-gradient(160deg, #607d8b 0%, #546e7a 25%, #455a64 50%, #37474f 100%);
}

[data-theme="light"] .bg-gradient.drizzle {
    background: linear-gradient(160deg, #b0bec5 0%, #90a4ae 30%, #78909c 60%, #607d8b 100%);
}

[data-theme="light"] .bg-gradient.foggy {
    background: linear-gradient(160deg, #cfd8dc 0%, #b0bec5 30%, #90a4ae 60%, #78909c 100%);
}

[data-theme="light"] .bg-gradient.night-clear {
    background: linear-gradient(160deg, #1e1b4b 0%, #312e81 30%, #3730a3 60%, #1e1b4b 100%);
}

[data-theme="light"] .bg-gradient.night-cloudy {
    background: linear-gradient(160deg, #1e293b 0%, #334155 30%, #1e293b 60%, #0f172a 100%);
}

[data-theme="light"] .bg-gradient.night-rain {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 30%, #0f172a 60%, #0a0f1a 100%);
}

[data-theme="light"] {
    --glass-bg: rgba(255, 255, 255, 0.35);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-hover: rgba(255, 255, 255, 0.5);
    --text-primary: #1e293b;
    --text-secondary: rgba(30, 41, 59, 0.75);
    --text-tertiary: rgba(30, 41, 59, 0.5);
    --accent-blue: #2563eb;
    --accent-purple: #7c3aed;
    --accent-pink: #c026d3;
    --accent-orange: #d97706;
    --header-bg: rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .bg-gradient.rainy,
[data-theme="light"] .bg-gradient.stormy,
[data-theme="light"] .bg-gradient.heavy-rain,
[data-theme="light"] .bg-gradient.drizzle,
[data-theme="light"] .bg-gradient.foggy,
[data-theme="light"] .bg-gradient.night-clear,
[data-theme="light"] .bg-gradient.night-cloudy,
[data-theme="light"] .bg-gradient.night-rain,
[data-theme="light"] .bg-gradient.extreme-heat {
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-hover: rgba(255, 255, 255, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-tertiary: rgba(255, 255, 255, 0.55);
    --accent-blue: #60a5fa;
    --accent-purple: #a78bfa;
    --accent-orange: #fbbf24;
    --header-bg: rgba(0, 0, 0, 0.2);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    animation: float linear infinite;
}

[data-theme="light"] .particle {
    background: rgba(255, 255, 255, 0.25);
}

@keyframes float {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-10vh) rotate(720deg); opacity: 0; }
}

.lightning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.05s;
}

.lightning-overlay.flash {
    opacity: 1;
}

.lightning-bolt {
    position: absolute;
    top: 0;
    width: 3px;
    height: 0;
    background: transparent;
    opacity: 0;
}

.lightning-bolt::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(200, 200, 255, 0.4) 10%,
        rgba(255, 255, 255, 0.95) 30%,
        rgba(200, 200, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.9) 70%,
        rgba(200, 200, 255, 0.3) 90%,
        rgba(255, 255, 255, 0) 100%
    );
    filter: blur(1px);
    box-shadow: 0 0 8px 2px rgba(180, 180, 255, 0.6),
                0 0 20px 4px rgba(150, 150, 255, 0.3);
}

.lightning-bolt::after {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 22px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(180, 180, 255, 0.05) 20%,
        rgba(180, 180, 255, 0.1) 50%,
        rgba(180, 180, 255, 0.05) 80%,
        transparent 100%
    );
    filter: blur(6px);
}

@keyframes lightningStrike {
    0% { height: 0; opacity: 0; }
    5% { height: 60vh; opacity: 1; }
    10% { height: 60vh; opacity: 0.6; }
    15% { height: 80vh; opacity: 1; }
    20% { height: 80vh; opacity: 0; }
    100% { height: 80vh; opacity: 0; }
}

@keyframes lightningFlash {
    0% { opacity: 0; }
    5% { opacity: 0.7; }
    10% { opacity: 0.1; }
    15% { opacity: 0.5; }
    20% { opacity: 0; }
    100% { opacity: 0; }
}

.rain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.raindrop {
    position: absolute;
    top: -20px;
    width: 1.5px;
    background: linear-gradient(180deg, transparent, rgba(174, 194, 224, 0.4));
    border-radius: 0 0 2px 2px;
    animation: rainFall linear infinite;
}

.raindrop.heavy {
    width: 2px;
    background: linear-gradient(180deg, transparent, rgba(174, 194, 224, 0.6));
}

@keyframes rainFall {
    0% { transform: translateY(-20px) translateX(0); opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 0.8; }
    100% { transform: translateY(100vh) translateX(-15px); opacity: 0; }
}

.snow-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: snowFall linear infinite;
}

@keyframes snowFall {
    0% { transform: translateY(-10px) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.8; }
    100% { transform: translateY(100vh) translateX(40px) rotate(360deg); opacity: 0; }
}

.container {
    position: relative;
    z-index: 2;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
    padding-bottom: 40px;
    padding-top: env(safe-area-inset-top, 16px);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: var(--header-bg);
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent-blue);
    filter: drop-shadow(0 0 8px rgba(79, 172, 254, 0.4));
}

.app-title {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-icon svg { width: 18px; height: 18px; }

.btn-icon:hover,
.btn-icon:active {
    background: var(--glass-hover);
    transform: scale(1.05);
}

.search-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-overlay.active { display: flex; flex-direction: column; opacity: 1; }

.search-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.search-icon { width: 20px; height: 20px; color: var(--text-tertiary); flex-shrink: 0; }

.search-bar input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
}

.search-bar input::placeholder { color: var(--text-tertiary); }

.btn-close-search {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-close-search svg { width: 16px; height: 16px; }

.search-results { margin-top: 12px; max-height: 60vh; overflow-y: auto; }

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-result-item:hover,
.search-result-item:active {
    background: var(--glass-hover);
    transform: translateX(4px);
}

.search-result-item svg { width: 18px; height: 18px; color: var(--accent-blue); flex-shrink: 0; }
.search-result-name { font-size: 0.95rem; font-weight: 500; }
.search-result-country { font-size: 0.8rem; color: var(--text-tertiary); }

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 20px;
}

.loading p { color: var(--text-secondary); font-size: 0.95rem; }

.loading-spinner {
    width: 48px; height: 48px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 16px;
}

.error svg { width: 48px; height: 48px; color: var(--accent-pink); }
.error p { color: var(--text-secondary); font-size: 0.95rem; text-align: center; }

.btn-retry {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-retry:hover, .btn-retry:active { background: var(--glass-hover); }

.current-weather { text-align: center; padding: 24px 0 32px; }
.location-info { margin-bottom: 8px; }

.city-name {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .bg-gradient.sunny .city-name,
[data-theme="light"] .bg-gradient.default .city-name {
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.date-time { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

.temp-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 16px 0;
}

.temp-main { display: flex; align-items: flex-start; }

.temp-value {
    font-size: 5.5rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.temp-unit { font-size: 1.8rem; font-weight: 300; color: var(--text-secondary); margin-top: 8px; }

.weather-icon-large {
    width: 80px; height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
    animation: weatherPulse 3s ease-in-out infinite;
}

@keyframes weatherPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.weather-desc { font-size: 1.1rem; color: var(--text-secondary); font-weight: 500; margin-bottom: 8px; }

.temp-range { display: flex; justify-content: center; gap: 20px; font-size: 0.95rem; }
.temp-high, .temp-low { display: flex; align-items: center; gap: 4px; }
.temp-high { color: var(--accent-orange); }
.temp-low { color: var(--accent-blue); }

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.detail-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.detail-card:hover { background: var(--glass-hover); transform: translateY(-2px); }

.detail-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.detail-icon svg { width: 20px; height: 20px; color: var(--accent-blue); }

.detail-card:nth-child(1) .detail-icon svg { color: #4facfe; }
.detail-card:nth-child(2) .detail-icon svg { color: #a78bfa; }
.detail-card:nth-child(3) .detail-icon svg { color: #f6d365; }
.detail-card:nth-child(4) .detail-icon svg { color: #f093fb; }

.detail-info { display: flex; flex-direction: column; }
.detail-value { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.detail-label { font-size: 0.75rem; color: var(--text-tertiary); margin-top: 2px; }

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.section-title svg { color: var(--accent-purple); }

.hourly-forecast { margin-bottom: 24px; }

.hourly-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.hourly-scroll::-webkit-scrollbar { display: none; }

.hourly-item {
    flex-shrink: 0;
    width: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    scroll-snap-align: start;
    transition: all 0.3s ease;
}

.hourly-item.now {
    background: rgba(79, 172, 254, 0.2);
    border-color: rgba(79, 172, 254, 0.4);
}

.hourly-time { font-size: 0.75rem; color: var(--text-tertiary); font-weight: 500; }
.hourly-item.now .hourly-time { color: var(--accent-blue); font-weight: 600; }
.hourly-icon { font-size: 28px; line-height: 1; }
.hourly-temp { font-size: 0.9rem; font-weight: 600; }
.hourly-item:active { transform: scale(0.95); }

.daily-forecast { margin-bottom: 24px; }
.daily-list { display: flex; flex-direction: column; gap: 8px; }

.daily-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s ease;
}

.daily-item:hover { background: var(--glass-hover); }
.daily-item:active { transform: scale(0.98); }

.daily-day { width: 56px; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); }
.daily-item.today .daily-day { color: var(--accent-blue); font-weight: 600; }
.daily-icon { width: 36px; font-size: 24px; text-align: center; }
.daily-desc { flex: 1; font-size: 0.85rem; color: var(--text-tertiary); margin-left: 8px; }

.daily-temps { display: flex; align-items: center; gap: 8px; }

.daily-temp-bar {
    width: 60px; height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.daily-temp-bar-fill {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-orange));
    transition: all 0.5s ease;
}

.daily-temp-high { font-size: 0.9rem; font-weight: 600; min-width: 32px; text-align: right; }
.daily-temp-low { font-size: 0.85rem; color: var(--text-tertiary); min-width: 32px; text-align: right; }

.sun-info { margin-bottom: 24px; }

.sun-card {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.sun-item { display: flex; align-items: center; gap: 12px; }
.sun-item svg { width: 28px; height: 28px; color: var(--accent-orange); }
.sun-detail { display: flex; flex-direction: column; }
.sun-label { font-size: 0.75rem; color: var(--text-tertiary); }
.sun-time { font-size: 1.1rem; font-weight: 600; }
.sun-divider { width: 1px; height: 40px; background: var(--glass-border); }

.footer { text-align: center; padding: 16px 0; }
.footer p { font-size: 0.75rem; color: var(--text-tertiary); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.weather-content section { animation: fadeInUp 0.6s ease forwards; }
.weather-content section:nth-child(1) { animation-delay: 0s; }
.weather-content section:nth-child(2) { animation-delay: 0.1s; }
.weather-content section:nth-child(3) { animation-delay: 0.2s; }
.weather-content section:nth-child(4) { animation-delay: 0.3s; }
.weather-content section:nth-child(5) { animation-delay: 0.4s; }

@media (max-width: 360px) {
    .temp-value { font-size: 4.5rem; }
    .weather-icon-large { width: 64px; height: 64px; font-size: 48px; }
    .detail-card { padding: 12px; }
}

@media (min-width: 481px) {
    .container { padding-top: 24px; }
}

::selection { background: rgba(79, 172, 254, 0.3); color: #fff; }
::-webkit-scrollbar { width: 0; height: 0; }

@supports not (backdrop-filter: blur(20px)) {
    .detail-card, .hourly-item, .daily-item, .sun-card, .search-bar, .search-result-item {
        background: rgba(30, 30, 60, 0.85);
    }
    .header { background: rgba(15, 12, 41, 0.9); }
}

.lang-rtl .search-result-item:hover { transform: translateX(-4px); }
.lang-rtl .daily-desc { margin-left: 0; margin-right: 8px; }
.lang-rtl .legal-content ul { padding-left: 0; padding-right: 20px; }

.lang-rtl .settings-item-label,
.lang-rtl .settings-item-desc,
.lang-rtl .settings-group-title,
.lang-rtl .detail-label,
.lang-rtl .detail-value,
.lang-rtl .weather-desc,
.lang-rtl .city-name,
.lang-rtl .date-time,
.lang-rtl .sun-label,
.lang-rtl .sun-time,
.lang-rtl .gdpr-option-label,
.lang-rtl .gdpr-option-desc,
.lang-rtl .gdpr-intro,
.lang-rtl .daily-day,
.lang-rtl .daily-desc,
.lang-rtl .hourly-time,
.lang-rtl .hourly-temp,
.lang-rtl .section-title span,
.lang-rtl .footer p,
.lang-rtl .footer a,
.lang-rtl .footer-contact,
.lang-rtl .settings-footer span,
.lang-rtl .search-result-name,
.lang-rtl .search-result-country,
.lang-rtl .page-body,
.lang-rtl .legal-content,
.lang-rtl .loading p,
.lang-rtl .error p,
.lang-rtl .temp-range {
    direction: rtl;
    text-align: right;
}

.lang-rtl #searchInput {
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}
