/**
 * Weather Studio Pro - Premium Weather Experience
 * Modern glassmorphic styles, dynamic atmospheric canvas & animated widgets
 */

.weather-container {
    max-width: 1400px;
    width: 96%;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #e2e8f0;
}

/* --- Hero Banner --- */
.weather-hero-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.85));
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 30px rgba(56, 189, 248, 0.1);
    backdrop-filter: blur(12px);
    flex-wrap: wrap;
    gap: 1.25rem;
}

.weather-hero-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.weather-hero-icon-box {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 0 20px rgba(2, 132, 199, 0.5);
    flex-shrink: 0;
}

.weather-hero-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.35rem;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.weather-hero-sub {
    font-size: 0.92rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.45;
    max-width: 780px;
}

.weather-hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.weather-badge {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #cbd5e1;
}

.weather-badge.glow-cyan {
    border-color: rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
}

/* --- Search & Header Actions Bar --- */
.weather-search-bar-wrap {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.weather-search-input-group {
    flex: 1;
    min-width: 280px;
    position: relative;
    display: flex;
    align-items: center;
}

.weather-search-input-group .search-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.15rem;
    color: #94a3b8;
    pointer-events: none;
    z-index: 2;
}

.weather-search-input {
    width: 100%;
    height: 48px;
    padding: 0 140px 0 2.85rem;
    background: #0f172a;
    border: 1.5px solid rgba(56, 189, 248, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.weather-search-input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25), 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-clear-search {
    position: absolute;
    right: 145px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.5rem;
    z-index: 2;
}

.weather-geo-btn {
    position: absolute;
    right: 6px;
    height: 36px;
    padding: 0 0.85rem;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.15s ease;
    z-index: 2;
}

.weather-geo-btn:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: scale(1.02);
}

/* Autocomplete Dropdown */
.weather-search-dropdown {
    position: absolute;
    top: 52px;
    left: 0;
    right: 0;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    padding: 0.4rem;
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.12s ease;
}

.search-result-item:hover,
.search-result-item.highlighted {
    background: rgba(56, 189, 248, 0.15);
}

.search-city-main {
    font-weight: 700;
    color: #f8fafc;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.search-city-sub {
    font-size: 0.78rem;
    color: #94a3b8;
}

.search-city-coords {
    font-size: 0.72rem;
    color: #64748b;
    font-family: monospace;
}

/* Header Actions */
.weather-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weather-unit-toggle {
    display: flex;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 3px;
    height: 44px;
    box-sizing: border-box;
}

.unit-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.unit-btn.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

.weather-action-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.weather-action-btn:hover {
    background: #1e293b;
    border-color: #38bdf8;
    transform: translateY(-1px);
}

.weather-action-btn.is-fav {
    border-color: #fbbf24;
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

/* --- Quick Chips Bar --- */
.weather-quick-chips-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

.chips-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.chips-scroll {
    display: flex;
    gap: 0.45rem;
    flex-wrap: nowrap;
}

.city-chip {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.city-chip:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.4);
    color: #ffffff;
}

.city-chip.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

/* --- Loader & Error --- */
.weather-loader-card {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.weather-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(56, 189, 248, 0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

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

.weather-error-banner {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* --- MAIN WEATHER GRID --- */
.weather-main-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* 1. Current Weather Spotlight */
.current-weather-hero {
    position: relative;
    background: linear-gradient(135deg, #070e1c, #0d1a33 50%, #081224);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 35px rgba(56, 189, 248, 0.15);
    overflow: hidden;
}

.weather-canvas-effect {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.65;
}

.current-weather-header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.city-title-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.country-flag {
    font-size: 1.8rem;
}

.city-name {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.country-name-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
}

.city-sub-row {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.current-aqi-chip {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    padding: 0.4rem 0.85rem;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.current-aqi-chip .aqi-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.current-weather-body {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.current-temp-block {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.weather-icon-animated {
    font-size: 4.8rem;
    line-height: 1;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.4));
    animation: floatIcon 3.5s ease-in-out infinite;
}

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

.main-temperature {
    font-size: 4.2rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.04em;
}

.feels-like-text {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-top: 0.35rem;
    font-weight: 600;
}

.current-desc-block {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.condition-badge {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.25), rgba(14, 165, 233, 0.15));
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: #38bdf8;
    padding: 0.55rem 1.1rem;
    border-radius: 30px;
    font-size: 1.15rem;
    font-weight: 800;
}

.temp-range-today {
    display: flex;
    gap: 0.75rem;
    font-size: 0.88rem;
    font-weight: 700;
}

.temp-max { color: #f87171; }
.temp-min { color: #60a5fa; }
.rain-prob { color: #38bdf8; }

/* 2. Atmospheric Metrics Grid (8 Cards) */
.weather-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.metric-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.18s ease, border-color 0.18s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.3);
}

.metric-card-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.metric-icon {
    font-size: 1.25rem;
}

.metric-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metric-main-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.metric-sub-detail {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.metric-bar-wrap {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.metric-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
}

.humidity-fill { background: linear-gradient(90deg, #38bdf8, #0284c7); }
.uv-fill { background: linear-gradient(90deg, #10b981, #fbbf24 40%, #f97316 70%, #ef4444); }

.wind-compass-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wind-compass-dial {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1.5px solid rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wind-compass-arrow {
    font-size: 0.85rem;
    color: #38bdf8;
    transition: transform 0.4s ease;
}

/* Sun Arc Visual */
.sun-arc-visual {
    position: relative;
    height: 48px;
    margin-bottom: 0.65rem;
}

.sun-arc-curve {
    width: 100%;
    height: 48px;
    border-top: 2px dashed rgba(251, 191, 36, 0.4);
    border-radius: 50px 50px 0 0;
    position: relative;
}

.sun-arc-point {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    filter: drop-shadow(0 0 8px #fbbf24);
}

.sun-times-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.sun-time-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pollutants-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    font-size: 0.74rem;
}

.pollutant-chip {
    background: rgba(255, 255, 255, 0.04);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
}

/* 3. Section Cards (Hourly, Daily, History, Radar) */
.weather-section-card {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.section-card-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.section-icon {
    font-size: 1.35rem;
}

.section-card-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
}

.section-sub {
    font-size: 0.82rem;
    color: #94a3b8;
    margin: 0.15rem 0 0;
}

.hourly-tabs, .forecast-range-selector, .map-layer-selector {
    display: flex;
    background: #0a0f1d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.btn-hourly-tab, .btn-range-tab, .btn-map-layer {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-hourly-tab.active, .btn-range-tab.active, .btn-map-layer.active {
    background: #0284c7;
    color: #ffffff;
}

/* Hourly Scroll Track */
.hourly-timeline-container {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.hourly-scroll-track {
    display: flex;
    gap: 0.75rem;
    min-width: max-content;
}

.hourly-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    padding: 0.85rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 72px;
    text-align: center;
    transition: transform 0.15s, border-color 0.15s;
}

.hourly-item:hover, .hourly-item.is-now {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.08);
}

.hourly-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
}

.hourly-icon {
    font-size: 1.65rem;
}

.hourly-temp {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.hourly-rain-chip {
    font-size: 0.7rem;
    font-weight: 700;
    color: #38bdf8;
}

.hourly-wind {
    font-size: 0.68rem;
    color: #64748b;
}

/* 4. Daily Forecast Grid */
.daily-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
}

.daily-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-align: center;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.daily-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.4);
}

.daily-card.today {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.15), rgba(15, 23, 42, 0.9));
    border-color: #38bdf8;
}

.daily-day-name {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
}

.daily-date {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: -0.35rem;
}

.daily-icon {
    font-size: 2.3rem;
}

.daily-cond-text {
    font-size: 0.78rem;
    color: #cbd5e1;
    font-weight: 600;
    min-height: 2.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.daily-temp-bar-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 800;
}

.daily-min { color: #60a5fa; }
.daily-max { color: #f87171; }

.daily-rain-chip {
    font-size: 0.72rem;
    font-weight: 700;
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
}

/* 5. Historical Weather Section */
.history-controls-bar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    padding: 0.85rem;
    border-radius: 12px;
}

.history-input-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.history-input-wrap label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
}

.history-date-picker {
    height: 40px;
    padding: 0 0.85rem;
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
}

.history-quick-years {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.history-quick-btn {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.45rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.history-quick-btn:hover {
    background: #334155;
    color: #ffffff;
    border-color: #38bdf8;
}

.history-result-box {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 14px;
    padding: 1.25rem;
    animation: fadeIn 0.25s ease;
}

.history-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.history-icon {
    font-size: 2.2rem;
}

.history-card-header h4 {
    font-size: 1.15rem;
    font-weight: 800;
    margin: 0 0 0.2rem;
    color: #ffffff;
}

.history-condition {
    font-size: 0.85rem;
    color: #38bdf8;
    font-weight: 600;
}

.history-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}

.history-stat {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.75rem;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hist-label {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

.hist-val {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
}

.hist-val.max-val { color: #f87171; }
.hist-val.min-val { color: #60a5fa; }

/* 6. Interactive Weather Radar Map */
.weather-map-container {
    position: relative;
    width: 100%;
    height: 420px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.weather-leaflet-map {
    width: 100%;
    height: 100%;
    background: #0a0f1d;
}

.map-city-pin {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    z-index: 1000;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* --- SEO Info Article --- */
.weather-info-article {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.info-article-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: #ffffff;
}

.info-article-header p {
    font-size: 0.95rem;
    color: #94a3b8;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.info-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.info-column h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #38bdf8;
}

.info-column p {
    font-size: 0.88rem;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1024px) {
    .weather-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .info-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .weather-container {
        padding: 0.75rem 0.5rem 2rem;
    }

    .weather-hero-banner {
        padding: 1rem;
        gap: 0.5rem;
    }

    .weather-hero-sub,
    .weather-hero-badges {
        display: none;
    }

    .current-weather-hero {
        padding: 1.25rem 1rem;
    }

    .city-name {
        font-size: 1.65rem;
    }

    .main-temperature {
        font-size: 3.2rem;
    }

    .weather-icon-animated {
        font-size: 3.5rem;
    }

    .weather-metrics-grid {
        grid-template-columns: 1fr;
    }

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

    .weather-map-container {
        height: 320px;
    }

    .history-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ==========================================================================
   LIGHT THEME OVERRIDES ([data-theme="light"])
   ========================================================================== */

[data-theme="light"] .weather-container {
    color: #0f172a;
}

[data-theme="light"] .weather-hero-banner {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 1px solid rgba(2, 132, 199, 0.2);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .weather-hero-title {
    color: #0f172a;
}

[data-theme="light"] .weather-hero-sub {
    color: #475569;
}

[data-theme="light"] .weather-badge {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

[data-theme="light"] .weather-search-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .weather-search-dropdown {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .search-city-main {
    color: #0f172a;
}

[data-theme="light"] .weather-unit-toggle,
[data-theme="light"] .weather-action-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #1e293b;
}

[data-theme="light"] .city-chip {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

[data-theme="light"] .city-chip.active {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

[data-theme="light"] .current-weather-hero {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe 50%, #bae6fd);
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.12);
}

[data-theme="light"] .city-name,
[data-theme="light"] .main-temperature {
    color: #0f172a;
}

[data-theme="light"] .country-name-badge {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

[data-theme="light"] .feels-like-text,
[data-theme="light"] .city-sub-row {
    color: #475569;
}

[data-theme="light"] .condition-badge {
    background: #ffffff;
    border-color: #0284c7;
    color: #0369a1;
}

[data-theme="light"] .metric-card,
[data-theme="light"] .weather-section-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .metric-main-value,
[data-theme="light"] .section-card-header h3 {
    color: #0f172a;
}

[data-theme="light"] .metric-title,
[data-theme="light"] .section-sub {
    color: #64748b;
}

[data-theme="light"] .hourly-tabs,
[data-theme="light"] .forecast-range-selector,
[data-theme="light"] .map-layer-selector {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

[data-theme="light"] .hourly-item,
[data-theme="light"] .daily-card {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .hourly-temp,
[data-theme="light"] .daily-day-name {
    color: #0f172a;
}

[data-theme="light"] .daily-cond-text {
    color: #475569;
}

[data-theme="light"] .history-controls-bar {
    background: #f8fafc;
}

[data-theme="light"] .history-date-picker {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .history-quick-btn {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

[data-theme="light"] .history-result-box {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .history-card-header h4,
[data-theme="light"] .hist-val {
    color: #0f172a;
}

[data-theme="light"] .history-stat {
    background: #f8fafc;
}

[data-theme="light"] .weather-info-article {
    background: #ffffff;
    border-color: #e2e8f0;
}

[data-theme="light"] .info-article-header h2 {
    color: #0f172a;
}

[data-theme="light"] .info-article-header p,
[data-theme="light"] .info-column p {
    color: #475569;
}
