:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --secondary: #ff6b6b;
    --accent: #4ecdc4;
    --dark-bg: #0f1419;
    --card-bg: #1a1f2e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #2a2f3f;
    --success: #51cf66;
    --warning: #ffd43b;
    --danger: #ff6b6b;
    --info: #74c0fc;
    --theme-mode: 'auto';
}

/* Spring Theme - Night */
body.theme-spring-night {
    --primary: #00d4ff;
    --accent: #4ecdc4;
    --dark-bg: #0f1419;
    --card-bg: #1a1f2e;
    --secondary: #ff6b6b;
}

/* Spring Theme - Day */
body.theme-spring-day {
    --primary: #00d9ff;
    --accent: #06d6d6;
    --dark-bg: #e8f8f9;
    --card-bg: #ffffff;
    --text-primary: #0a0e1a;
    --text-secondary: #4a5568;
    --border-color: #cce7e9;
}

/* Summer Theme - Night */
body.theme-summer-night {
    --primary: #ff6b35;
    --accent: #f7931e;
    --dark-bg: #1a1a2e;
    --card-bg: #16213e;
    --secondary: #ffc300;
}

/* Summer Theme - Day */
body.theme-summer-day {
    --primary: #ff8c42;
    --accent: #ffa500;
    --dark-bg: #fff8e7;
    --card-bg: #fffbf0;
    --text-primary: #1a1410;
    --text-secondary: #5d4e37;
    --border-color: #ffe4b5;
}

/* Autumn Theme - Night */
body.theme-autumn-night {
    --primary: #d4691d;
    --accent: #d97706;
    --dark-bg: #1a1a1a;
    --card-bg: #2d2d2d;
    --secondary: #ea580c;
}

/* Autumn Theme - Day */
body.theme-autumn-day {
    --primary: #d97706;
    --accent: #ea580c;
    --dark-bg: #fef3e2;
    --card-bg: #fef9f3;
    --text-primary: #78350f;
    --text-secondary: #92400e;
    --border-color: #fed7aa;
}

/* Winter Theme - Night */
body.theme-winter-night {
    --primary: #00b4ff;
    --accent: #4dd0e1;
    --dark-bg: #0a0e27;
    --card-bg: #1a2332;
    --secondary: #81d4fa;
}

/* Winter Theme - Day */
body.theme-winter-day {
    --primary: #0ea5e9;
    --accent: #06b6d4;
    --dark-bg: #f0f9ff;
    --card-bg: #ffffff;
    --text-primary: #0c2d6b;
    --text-secondary: #1e40af;
    --border-color: #bae6fd;
}

/* Dark Mode Toggle */
body.dark-mode {
    --dark-bg: #000000;
    --card-bg: #0f0f0f;
}

/* Light Mode Toggle */
body.light-mode {
    --dark-bg: #f5f5f5;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #cccccc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Night Sky Animation - Infinite pulsing and shifting */
@keyframes nightSky {
    0% { 
        background-position: 0% 0%; 
        filter: brightness(0.95) saturate(1.1);
    }
    12.5% { 
        background-position: 12.5% 12.5%; 
        filter: brightness(1.02) saturate(1.15);
    }
    25% { 
        background-position: 25% 25%; 
        filter: brightness(1.08) saturate(1.1);
    }
    37.5% { 
        background-position: 37.5% 37.5%; 
        filter: brightness(1.05) saturate(1.12);
    }
    50% { 
        background-position: 50% 50%; 
        filter: brightness(0.98) saturate(1.08);
    }
    62.5% { 
        background-position: 62.5% 62.5%; 
        filter: brightness(1.04) saturate(1.14);
    }
    75% { 
        background-position: 75% 75%; 
        filter: brightness(1.07) saturate(1.1);
    }
    87.5% { 
        background-position: 87.5% 87.5%; 
        filter: brightness(1.01) saturate(1.11);
    }
    100% { 
        background-position: 100% 100%; 
        filter: brightness(0.95) saturate(1.1);
    }
}

/* Day Sky Animation - Continuous gradient shift */
@keyframes daySky {
    0% { 
        background-position: 0% 0%;
        filter: brightness(0.95) saturate(1.05);
    }
    16.67% { 
        background-position: 16.67% 16.67%;
        filter: brightness(1.02) saturate(1.08);
    }
    33.33% { 
        background-position: 33.33% 33.33%;
        filter: brightness(1.05) saturate(1.1);
    }
    50% { 
        background-position: 50% 50%;
        filter: brightness(1.03) saturate(1.07);
    }
    66.67% { 
        background-position: 66.67% 66.67%;
        filter: brightness(1.04) saturate(1.09);
    }
    83.33% { 
        background-position: 83.33% 83.33%;
        filter: brightness(1.01) saturate(1.06);
    }
    100% { 
        background-position: 100% 100%;
        filter: brightness(0.95) saturate(1.05);
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    background-attachment: fixed;
}

/* Default Night Theme */
body {
    background: linear-gradient(135deg, #050810 0%, #0f1729 20%, #1a1f3a 40%, #0d1828 60%, #1a1f3a 80%, #050810 100%);
    background-size: 400% 400%;
    animation: nightSky 20s ease infinite;
}

/* Night mode backgrounds - Elegant starry night */
body.theme-night {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a3e 25%, #2d1b4e 50%, #1a0e35 75%, #0a0e27 100%);
    background-size: 400% 400%;
    animation: nightSky 45s ease-in-out infinite;
    background-attachment: fixed;
}

/* Day mode - Vibrant sunrise animation */
body.theme-day {
    background: linear-gradient(135deg, #87CEEB 0%, #FFD700 100%);
    background-attachment: fixed;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, rgba(10, 13, 20, 0.7) 0%, rgba(26, 31, 46, 0.7) 100%);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
    padding: 30px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(0, 212, 255, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-link {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.header h1 {
    font-size: 36px;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff 0%, #4ecdc4 50%, #00d4ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 16px;
    white-space: nowrap;
    letter-spacing: -0.5px;
    margin: 0;
    transition: all 0.3s ease;
}

.header-link:hover h1 {
    filter: brightness(1.2);
    transform: scale(1.05);
}

.header-link:active h1 {
    transform: scale(0.98);
}

.header h1 i {
    font-size: 44px;
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.4));
    animation: float 3s ease-in-out infinite;
}

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

.search-box {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 580px;
    min-width: 280px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-box input {
    flex: 1;
    padding: 16px 26px;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.6) 0%, rgba(42, 47, 63, 0.6) 100%);
    border: 2px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.search-box input::placeholder {
    color: rgba(176, 176, 176, 0.5);
}

.search-box input:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3), inset 0 0 20px rgba(0, 212, 255, 0.05);
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8) 0%, rgba(42, 47, 63, 0.8) 100%);
}

.suggestions-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(10, 13, 20, 0.95) 0%, rgba(26, 31, 46, 0.95) 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    list-style: none;
    max-height: 340px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(20px);
}

.suggestions-list.active {
    display: block;
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.suggestion-item {
    padding: 16px 24px;
    cursor: pointer;
    border-bottom: 1px solid rgba(42, 47, 63, 0.4);
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
    padding-left: 32px;
}

.suggestion-item strong {
    color: var(--primary);
    font-weight: 700;
}

.search-box button {
    padding: 16px 28px;
    background: linear-gradient(135deg, #00d4ff 0%, #4ecdc4 100%);
    border: none;
    border-radius: 16px;
    color: var(--dark-bg);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
    min-width: 54px;
    min-height: 54px;
    position: relative;
    overflow: hidden;
}

.search-box button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
}

.search-box button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 212, 255, 0.5);
}

.search-box button:hover::before {
    left: 100%;
}

.search-box button:active {
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .header h1 {
        font-size: 32px;
    }

    .header-content {
        gap: 25px;
        padding: 0 16px;
    }

    .search-box {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 20px 0;
    }

    .header-content {
        gap: 15px;
        flex-direction: column;
    }

    .header h1 {
        font-size: 28px;
        gap: 12px;
    }

    .header h1 i {
        font-size: 36px;
    }

    .search-box {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .search-box input {
        padding: 14px 20px;
        font-size: 14px;
        border-radius: 14px;
    }

    .search-box button {
        padding: 14px 24px;
        border-radius: 14px;
    }

    .suggestion-item {
        padding: 14px 20px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 16px 0;
    }

    .header-content {
        padding: 0 12px;
    }

    .header h1 {
        font-size: 24px;
    }

    .header h1 i {
        font-size: 30px;
    }

    .search-box {
        gap: 8px;
    }

    .search-box input {
        padding: 12px 16px;
        font-size: 13px;
        border-radius: 12px;
    }

    .search-box button {
        padding: 12px 16px;
        border-radius: 12px;
        min-width: 48px;
        min-height: 48px;
    }
}


/* Main Content */
.main {
    padding: 40px 0;
}

/* Weather Card */
.weather-section {
    margin-bottom: 40px;
}

.weather-card {
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.8) 0%, rgba(26, 31, 46, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.weather-card:hover {
    border-color: var(--primary);
    box-shadow: 0 12px 48px rgba(0, 212, 255, 0.15);
}

.location-info {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.location-info h2 {
    font-size: 32px;
    margin-bottom: 8px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-info h2 i {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.3));
}

.date-time {
    color: #b0b0b0;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.weather-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.weather-display {
    display: flex;
    align-items: center;
    gap: 30px;
    justify-content: center;
}

.weather-icon-large {
    width: 140px;
    height: 140px;
    filter: drop-shadow(0 4px 20px rgba(0, 212, 255, 0.2));
}

.temp-section {
    text-align: center;
}

.temperature {
    font-size: 72px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.description {
    font-size: 20px;
    color: #00d4ff;
    text-transform: capitalize;
    margin-top: 10px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.detail-item {
    background: rgba(0, 212, 255, 0.05);
    padding: 15px;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(0, 212, 255, 0.1);
    transform: translateX(5px);
}

.detail-item .label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.detail-item .label i {
    color: var(--primary);
}

.detail-item .value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

/* Forecast Sections */
.forecast-section {
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #00d4ff;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.forecast-section h3 i {
    font-size: 20px;
}

/* Hourly Forecast */
.hourly-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.hourly-card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8) 0%, rgba(42, 47, 63, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hourly-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.2);
    background: linear-gradient(135deg, rgba(26, 31, 46, 1) 0%, rgba(42, 47, 63, 1) 100%);
}

.hourly-time {
    font-size: 12px;
    color: #00d4ff;
    margin-bottom: 8px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hourly-icon {
    width: 50px;
    height: 50px;
    margin: 10px auto;
}

.hourly-temp {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.hourly-detail {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.hourly-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8) 0%, rgba(42, 47, 63, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    margin-bottom: 10px;
}

.hourly-scroll-wrapper {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    flex: 1;
    padding: 0 10px;
    scroll-behavior: smooth;
}

.hourly-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.hourly-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 212, 255, 0.1);
    border-radius: 10px;
}

.hourly-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.hourly-scroll-wrapper .hourly-card {
    flex: 0 0 110px;
    padding: 15px 10px;
}

.hourly-nav-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #000;
    border: none;
    border-radius: 10px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 110px;
}

.hourly-nav-btn:hover:not(.disabled) {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.4);
}

.hourly-nav-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: linear-gradient(135deg, #555 0%, #777 100%);
}

.hourly-counter {
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 8px 15px;
    background: rgba(26, 31, 46, 0.5);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-top: 10px;
}.hourly-detail {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Daily Forecast */
.daily-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.daily-card {
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.8) 0%, rgba(42, 47, 63, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.3s ease;
}

.daily-card:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(78, 205, 196, 0.2);
    background: linear-gradient(135deg, rgba(26, 31, 46, 1) 0%, rgba(42, 47, 63, 1) 100%);
}

.daily-date {
    font-size: 14px;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.daily-icon {
    width: 60px;
    height: 60px;
    margin: 10px 0;
}

.daily-temps {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
    font-size: 14px;
}

.daily-temp-high {
    color: var(--primary);
    font-weight: 600;
}

.daily-temp-low {
    color: var(--text-secondary);
}

.daily-rain {
    font-size: 12px;
    color: var(--info);
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-container {
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.8) 0%, rgba(26, 31, 46, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.1);
}

.chart-container h3 {
    margin-bottom: 25px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-container canvas {
    max-height: 300px;
}

/* Air Quality Section */
.air-quality {
    background: linear-gradient(135deg, rgba(10, 20, 40, 0.8) 0%, rgba(26, 31, 46, 0.8) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.aq-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.aq-card {
    background: rgba(0, 212, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.aq-card:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: var(--primary);
}

.aq-card.aq-main {
    grid-column: 1 / -1;
    text-align: left;
    padding: 30px;
    border: 2px solid;
}

.aq-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.aq-main-content > div:first-child {
    flex: 1;
}

.aq-label {
    font-size: 14px;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.aq-scale {
    font-size: 72px;
    font-weight: 900;
    background: linear-gradient(135deg, #00d4ff 0%, #4ecdc4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 15px 0;
    line-height: 1;
}

.aq-status {
    font-size: 20px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 10px;
}

.aq-scale-bar {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.aq-scale-item {
    min-width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.aq-scale-item.active {
    transform: scale(1.3);
    box-shadow: 0 0 30px currentColor, 0 4px 12px rgba(0, 0, 0, 0.5);
}

.aq-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.aq-card:not(.aq-main) {
    border: 2px solid var(--border-color);
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.9) 0%, rgba(42, 47, 63, 0.9) 100%);
}

.aq-card:not(.aq-main):hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 212, 255, 0.2);
}

@media (max-width: 1024px) {
    .aq-main-content {
        flex-direction: column;
        gap: 25px;
    }

    .aq-scale {
        font-size: 56px;
    }

    .aq-scale-bar {
        justify-content: center;
    }

    .aq-card.aq-main {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .aq-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .aq-card.aq-main {
        grid-column: 1 / -1;
        padding: 20px;
    }

    .aq-scale {
        font-size: 48px;
    }

    .aq-scale-bar {
        gap: 8px;
    }

    .aq-scale-item {
        min-width: 40px;
        height: 40px;
        font-size: 12px;
    }

    .aq-scale-item.active {
        transform: scale(1.2);
    }
}

@media (max-width: 480px) {
    .aq-cards {
        grid-template-columns: 1fr;
    }

    .aq-scale {
        font-size: 36px;
    }

    .aq-scale-item {
        min-width: 35px;
        height: 35px;
        font-size: 11px;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 60px;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 20, 25, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-spinner.active {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    .header h1 {
        font-size: 22px;
    }

    .search-box {
        max-width: 100%;
        min-width: 100%;
    }

    .weather-card {
        padding: 25px;
    }

    .weather-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .weather-display {
        flex-direction: column;
        gap: 20px;
    }

    .temperature {
        font-size: 48px;
    }

    .weather-icon-large {
        width: 100px;
        height: 100px;
    }

    .weather-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .hourly-forecast {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }

    .hourly-card {
        padding: 15px;
        min-height: 120px;
    }

    .daily-forecast {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .charts-section {
        grid-template-columns: 1fr;
    }

    .aq-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .search-box {
        flex-direction: column;
        width: 100%;
    }

    .search-input-wrapper {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 18px;
    }

    .search-box input,
    .search-box button {
        font-size: 12px;
        padding: 12px 14px !important;
        min-height: 44px;
        min-width: 44px;
    }

    .weather-card {
        padding: 18px;
    }

    .location-info h2 {
        font-size: 20px;
        flex-wrap: wrap;
        gap: 8px;
        line-height: 1.3;
    }

    .location-info h2 i {
        font-size: 20px;
        flex-shrink: 0;
    }

    .temperature {
        font-size: 36px;
    }

    .weather-details {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .detail-item {
        padding: 12px;
        font-size: 14px;
    }

    .detail-item .label {
        font-size: 11px;
    }

    .detail-item .value {
        font-size: 16px;
    }

    .hourly-forecast {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .hourly-card {
        padding: 12px 8px;
        min-height: auto;
    }

    .hourly-time {
        font-size: 10px;
    }

    .hourly-icon {
        width: 40px;
        height: 40px;
    }

    .hourly-temp {
        font-size: 16px;
    }

    .daily-forecast {
        grid-template-columns: 1fr;
    }

    .daily-card {
        padding: 16px;
    }

    .aq-cards {
        grid-template-columns: 1fr;
    }

    .forecast-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .chart-container {
        padding: 20px;
    }
}

@media (max-width: 380px) {
    .header h1 {
        font-size: 16px;
    }

    .header h1 i {
        font-size: 22px;
    }

    .weather-icon-large {
        width: 80px;
        height: 80px;
    }

    .temperature {
        font-size: 32px;
    }

    .hourly-forecast {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Day/Night Toggle Button */
.daynight-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ffb700);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 8px 24px rgba(255, 215, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daynight-toggle:hover {
    transform: scale(1.2) translateY(-5px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.7), 0 12px 40px rgba(255, 215, 0, 0.5);
}

.daynight-toggle:active {
    transform: scale(1.1) translateY(-2px);
}

.daynight-toggle.night-mode {
    background: linear-gradient(135deg, #1e293b, #334155);
    border: 2px solid rgba(51, 65, 85, 0.8);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.6), 0 8px 24px rgba(96, 165, 250, 0.3);
}

.daynight-toggle.night-mode:hover {
    box-shadow: 0 0 30px rgba(96, 165, 250, 0.8), 0 12px 40px rgba(96, 165, 250, 0.5);
}

@media (max-width: 768px) {
    .daynight-toggle {
        width: 55px;
        height: 55px;
        bottom: 25px;
        right: 25px;
        font-size: 20px;
    }
}

/* Weather Alerts Section */
.alert-section {
    margin-top: 20px;
}

.alerts-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideInDown 0.3s ease-out;
}

.alert-high {
    background-color: rgba(255, 107, 107, 0.2);
    border-left: 4px solid #ff6b6b;
    color: #ff8787;
}

.alert-medium {
    background-color: rgba(255, 212, 59, 0.2);
    border-left: 4px solid #ffd43b;
    color: #ffe066;
}

.alert-low {
    background-color: rgba(116, 192, 252, 0.2);
    border-left: 4px solid #74c0fc;
    color: #91a7ff;
}

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

/* Full Day Hourly Forecast */
.full-day-forecast-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    overflow: hidden;
}

.forecast-nav-btn {
    background-color: var(--primary);
    color: var(--dark-bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.forecast-nav-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.1);
}

.forecast-nav-btn:active {
    transform: scale(0.95);
}

.full-day-hourly {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    flex: 1;
    overflow-x: auto;
    padding-bottom: 10px;
}

.hour-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    min-width: 80px;
}

.hour-card:hover {
    background-color: var(--primary);
    color: var(--dark-bg);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 212, 255, 0.3);
}

.hour-time {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 14px;
}

.hour-card:hover .hour-time {
    color: var(--dark-bg);
}

.hour-icon {
    width: 40px;
    height: 40px;
    margin: 5px 0;
}

.hour-temp {
    font-weight: 700;
    font-size: 16px;
    margin: 5px 0;
}

.hour-humidity {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 3px 0;
}

.hour-rain {
    font-size: 11px;
    color: var(--info);
    font-weight: 500;
}

/* Wind Direction */
.wind-direction {
    display: inline-block;
    margin-left: 5px;
    font-weight: 600;
    color: var(--primary);
    background-color: rgba(0, 212, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* UV Level */
.uv-level {
    font-size: 12px;
    font-weight: 600;
    margin-left: 5px;
}

/* Additional detail item styling */
.detail-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

@media (max-width: 768px) {
    .full-day-hourly {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }
    
    .hour-card {
        padding: 10px 6px;
        min-width: 70px;
    }
}

@media (max-width: 480px) {
    .daynight-toggle {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
    
    .full-day-hourly {
        grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
    }
    
    .hour-card {
        padding: 8px 4px;
        min-width: 65px;
    }
}

/* Extra small phones (< 360px) */
@media (max-width: 360px) {
    .header h1 {
        font-size: 16px;
    }

    .header h1 i {
        font-size: 20px;
    }

    .weather-card {
        padding: 14px;
    }

    .location-info h2 {
        font-size: 18px;
    }

    .location-info h2 i {
        font-size: 18px;
    }

    .temperature {
        font-size: 32px;
    }

    .description {
        font-size: 16px;
    }

    .date-time {
        font-size: 12px;
    }

    .weather-main {
        gap: 15px;
    }

    .weather-display {
        gap: 15px;
    }

    .weather-icon-large {
        width: 80px;
        height: 80px;
    }

    .detail-item {
        padding: 10px;
    }

    .detail-item .label {
        font-size: 10px;
    }

    .detail-item .value {
        font-size: 14px;
    }

    .forecast-section {
        padding: 15px;
    }

    .forecast-section h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .hourly-card {
        padding: 10px 6px;
        min-height: auto;
    }

    .hourly-time {
        font-size: 9px;
    }

    .hourly-temp {
        font-size: 14px;
    }

    .hourly-icon {
        width: 35px;
        height: 35px;
    }

    .daily-card {
        padding: 12px;
    }

    .daily-date {
        font-size: 12px;
    }

    .daily-icon {
        width: 45px;
        height: 45px;
    }

    .hourly-nav-btn {
        padding: 10px 14px;
        font-size: 14px;
        min-width: 90px;
    }

    .chart-container {
        padding: 15px;
    }

    .chart-container h3 {
        font-size: 14px;
    }

    .aq-scale {
        font-size: 32px;
    }

    .aq-scale-item {
        min-width: 30px;
        height: 30px;
        font-size: 10px;
    }
}

