/* ════════════════════════════════════════════════════════
   styles.css — MERGED: base.css + layout.css + components.css
                        + responsive.css + animations.css
   SkyCast Advanced Weather App
   ════════════════════════════════════════════════════════ */


/* ══════════════════════════════════════════════════════════
   SECTION 1 — CSS VARIABLES & THEMING  (from base.css)
══════════════════════════════════════════════════════════ */

/* ── THEME: DARK ────────────────────────────────────────── */
:root,
:root[data-theme="dark"] {
    --bg-base:        #060c18;
    --bg-surface:     #0d1526;
    --bg-elevated:    #141f35;

    --glass-bg:       rgba(14, 22, 45, 0.65);
    --glass-border:   rgba(255, 255, 255, 0.07);
    --glass-shadow:   0 8px 40px rgba(0, 0, 0, 0.45);
    --glass-blur:     16px;

    --text-primary:   #e8f0fe;
    --text-secondary: #7a92b4;
    --text-muted:     #44587a;
    --text-accent:    #60a5fa;

    --accent:         #3b82f6;
    --accent-glow:    rgba(59, 130, 246, 0.3);
    --accent-hover:   #60a5fa;

    --color-good:     #10b981;
    --color-moderate: #f59e0b;
    --color-bad:      #ef4444;
    --color-hazard:   #7c3aed;

    --orb-1: rgba(59, 130, 246, 0.12);
    --orb-2: rgba(16, 185, 129, 0.08);
    --orb-3: rgba(139, 92, 246, 0.07);

    --icon-humidity:  rgba(59, 130, 246, 0.15);
    --icon-wind:      rgba(99, 102, 241, 0.15);
    --icon-precip:    rgba(14, 165, 233, 0.15);
    --icon-vis:       rgba(250, 204, 21, 0.12);
    --icon-uv:        rgba(251, 146, 60, 0.15);
    --icon-pressure:  rgba(168, 85, 247, 0.15);

    --c-humidity:     #60a5fa;
    --c-wind:         #818cf8;
    --c-precip:       #38bdf8;
    --c-vis:          #facc15;
    --c-uv:           #fb923c;
    --c-pressure:     #c084fc;

    --sun-track:      rgba(255,255,255,0.08);
    --sun-fill:       linear-gradient(90deg, #f59e0b, #fcd34d);
}

/* ── THEME: LIGHT ───────────────────────────────────────── */
:root[data-theme="light"] {
    --bg-base:        #dbeafe;
    --bg-surface:     #eff6ff;
    --bg-elevated:    #ffffff;

    --glass-bg:       rgba(255, 255, 255, 0.62);
    --glass-border:   rgba(59, 130, 246, 0.15);
    --glass-shadow:   0 8px 40px rgba(30, 64, 175, 0.12);

    --text-primary:   #0f172a;
    --text-secondary: #334155;
    --text-muted:     #94a3b8;
    --text-accent:    #2563eb;

    --accent:         #2563eb;
    --accent-glow:    rgba(37, 99, 235, 0.2);
    --accent-hover:   #1d4ed8;

    --orb-1: rgba(59, 130, 246, 0.09);
    --orb-2: rgba(16, 185, 129, 0.06);
    --orb-3: rgba(139, 92, 246, 0.05);

    --icon-humidity:  rgba(59, 130, 246, 0.1);
    --icon-wind:      rgba(99, 102, 241, 0.1);
    --icon-precip:    rgba(14, 165, 233, 0.1);
    --icon-vis:       rgba(234, 179, 8, 0.1);
    --icon-uv:        rgba(249, 115, 22, 0.1);
    --icon-pressure:  rgba(168, 85, 247, 0.1);

    --sun-track:      rgba(0,0,0,0.07);
    --sun-fill:       linear-gradient(90deg, #f59e0b, #fcd34d);
}


/* ══════════════════════════════════════════════════════════
   SECTION 2 — RESET & TYPOGRAPHY  (from base.css)
══════════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Space Grotesk', 'Outfit', system-ui, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* ── ANTI-COPY CSS ADDED HERE ── */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, select { font-family: inherit; }
input:focus, select:focus { outline: none; }

/* Scrollbar */
::-webkit-scrollbar { height: 4px; width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Utilities */
.hidden { display: none !important; }

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

.card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title i { color: var(--accent); font-size: 0.85rem; }

.primary-btn {
    background: var(--accent);
    color: #fff;
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    white-space: nowrap;
    width: 100%;
    justify-content: center;
}
.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.primary-btn:active { transform: translateY(0); }


/* ══════════════════════════════════════════════════════════
   SECTION 3 — AMBIENT BACKGROUND  (from layout.css)
══════════════════════════════════════════════════════════ */

.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}
.orb-1 { width: 600px; height: 600px; background: var(--orb-1); top: -200px; left: -100px; }
.orb-2 { width: 500px; height: 500px; background: var(--orb-2); bottom: 100px; right: -100px; }
.orb-3 { width: 400px; height: 400px; background: var(--orb-3); top: 50%; left: 50%; transform: translate(-50%, -50%); }

.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}


/* ══════════════════════════════════════════════════════════
   SECTION 4 — LOADING SCREEN  (from layout.css)
══════════════════════════════════════════════════════════ */

.loading-screen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-screen.fade-out { opacity: 0; visibility: hidden; }

.loader-content { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.loader-icon { font-size: 3.5rem; color: var(--accent); animation: pulse-icon 1.5s ease-in-out infinite; }
.loader-text { font-family: 'Outfit', sans-serif; font-size: 1rem; color: var(--text-secondary); letter-spacing: 0.05em; }
.loader-bar { width: 180px; height: 3px; background: var(--glass-border); border-radius: 4px; overflow: hidden; }
.loader-fill { height: 100%; background: var(--accent); border-radius: 4px; animation: loader-progress 2s ease forwards; }


/* ══════════════════════════════════════════════════════════
   SECTION 5 — APP WRAPPER & LAYOUT  (from layout.css)
══════════════════════════════════════════════════════════ */

.app-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* ══════════════════════════════════════════════════════════
   SECTION 6 — STICKY HEADER  (from layout.css)
══════════════════════════════════════════════════════════ */

.top-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(6, 12, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 10px 0;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background 0.4s;
    flex-wrap: nowrap;   /* keep header on one line */
}

:root[data-theme="light"] .top-header {
    background: rgba(219, 234, 254, 0.95);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Brand */
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 34px; height: 34px; color: var(--text-primary); flex-shrink: 0; }
.brand-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
    white-space: nowrap;
}
.brand-accent { color: var(--accent); }

/* Header Greeting */
.header-greeting { display: flex; flex-direction: column; gap: 1px; }
.header-date { font-size: 0.72rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.03em; }
.header-hello { font-size: 0.86rem; font-weight: 600; color: var(--text-secondary); }

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 7px 12px;
    gap: 8px;
    flex: 1;
    max-width: 360px;
    min-width: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
.search-icon { color: var(--text-muted); font-size: 0.82rem; flex-shrink: 0; }
.search-bar input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.88rem;
    width: 100%;
    caret-color: var(--accent);
    min-width: 0;
}
.search-bar input::placeholder { color: var(--text-muted); }
.gps-btn {
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 2px;
    transition: color 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.gps-btn:hover { color: var(--accent); transform: scale(1.15); }

/* Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ctrl-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 36px; height: 36px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.ctrl-btn:hover { background: var(--accent); color: white; border-color: var(--accent); transform: scale(1.05); }
.unit-btn { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; }

/* Profile chip */
.profile-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: var(--text-accent);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    flex-shrink: 0;
}
.profile-chip:hover { background: rgba(37, 99, 235, 0.28); transform: translateY(-1px); color: var(--accent-hover); }
.profile-arrow { font-size: 0.68rem; }


/* ══════════════════════════════════════════════════════════
   SECTION 7 — QUICK NAV  (from layout.css)
══════════════════════════════════════════════════════════ */

.quick-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    flex-wrap: nowrap;   /* single line with scroll chips */
    overflow: hidden;
}

.city-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}
.city-chips::-webkit-scrollbar { display: none; }

.city-chip {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 5px 13px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.city-chip:hover { background: var(--accent); color: white; border-color: var(--accent); transform: translateY(-1px); }
.city-chip.active { background: var(--accent); color: white; border-color: var(--accent); }

.nav-selects { display: flex; gap: 8px; flex-shrink: 0; }

.styled-select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s;
    max-width: 155px;
}
.styled-select:hover { border-color: var(--accent); }
.styled-select option { background: var(--bg-elevated); color: var(--text-primary); }


/* ══════════════════════════════════════════════════════════
   SECTION 8 — DASHBOARD GRID  (from layout.css)
══════════════════════════════════════════════════════════ */

.dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 16px;
}

.hero-card    { grid-column: 1; grid-row: 1 / 3; }
.metrics-panel { grid-column: 2 / 4; grid-row: 1; }
.aqi-card     { grid-column: 2; grid-row: 2; }
.compare-card { grid-column: 3; grid-row: 2; }


/* ══════════════════════════════════════════════════════════
   SECTION 9 — FOOTER  (from layout.css)
══════════════════════════════════════════════════════════ */

.app-footer { padding: 22px 26px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 30px; height: 30px; color: var(--text-secondary); }
.footer-title { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1rem; }
.footer-sub { font-size: 0.74rem; color: var(--text-muted); }
.footer-info { font-size: 0.77rem; color: var(--text-secondary); line-height: 1.7; text-align: center; }
.footer-links { display: flex; gap: 14px; }
.footer-links a {
    font-size: 0.8rem; color: var(--text-secondary); font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    padding: 5px 11px; border: 1px solid var(--glass-border);
    border-radius: 8px; transition: color 0.2s, border-color 0.2s;
}
.footer-links a:hover { color: var(--accent); border-color: var(--accent); }


/* ══════════════════════════════════════════════════════════
   SECTION 10 — HERO CARD  (from components.css)
══════════════════════════════════════════════════════════ */

.hero-card {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hero-location { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.loc-icon { color: var(--accent); font-size: 1.05rem; margin-top: 3px; flex-shrink: 0; }
.location-name { font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 700; line-height: 1.25; color: var(--text-primary); word-break: break-word; }
.location-sub { font-size: 0.76rem; color: var(--text-muted); margin-top: 3px; }

.fav-btn { background: transparent; color: #ef4444; font-size: 1.15rem; padding: 4px; transition: transform 0.2s; flex-shrink: 0; }
.fav-btn:hover { transform: scale(1.2); }

.local-time-badge {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border);
    padding: 5px 11px; border-radius: 20px;
    font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
    color: var(--text-secondary); white-space: nowrap; flex-shrink: 0;
}
.local-time-badge i { color: var(--text-muted); font-size: 0.72rem; }

.hero-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.temp-block { flex: 1; }
.temp-display { display: flex; align-items: flex-start; line-height: 1; }

.temp-value {
    font-family: 'Outfit', sans-serif;
    font-size: 5.5rem;
    font-weight: 200;
    color: var(--text-primary);
    letter-spacing: -4px;
    line-height: 1;
}
.unit-symbol {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem; font-weight: 400;
    color: var(--text-secondary);
    margin-top: 12px; margin-left: 4px;
}
.condition-text { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); margin-top: 8px; }
.temp-range { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.8rem; color: var(--text-muted); }
.temp-range strong { color: var(--text-primary); }
.sep { color: var(--glass-border); }

.weather-icon-block { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-icon { font-size: 4.5rem; filter: drop-shadow(0 0 24px var(--accent-glow)); transition: color 0.4s; }
.weather-bg-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }

/* Sun bar */
.sun-bar { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 14px; }
.sun-point { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.sun-point div { display: flex; flex-direction: column; }
.sun-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.sun-time { font-family: 'JetBrains Mono', monospace; font-size: 0.86rem; font-weight: 500; color: var(--text-primary); }
.sun-icon { font-size: 1.2rem; }
.sun-icon.rise { color: #f59e0b; }
.sun-icon.set  { color: #818cf8; }

.sun-progress-track { flex: 1; height: 4px; background: var(--sun-track); border-radius: 4px; position: relative; }
.sun-progress-fill { position: absolute; left: 0; top: 0; height: 100%; background: var(--sun-fill); border-radius: 4px; transition: width 1s ease; }
.sun-dot { position: absolute; top: 50%; width: 10px; height: 10px; background: #facc15; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 8px #facc1580; transition: left 1s ease; }


/* ══════════════════════════════════════════════════════════
   SECTION 11 — METRICS PANEL  (from components.css)
══════════════════════════════════════════════════════════ */

.metrics-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.metric-card { padding: 15px; display: flex; flex-direction: column; gap: 9px; transition: transform 0.2s, box-shadow 0.2s; }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }

.metric-icon-wrap { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.metric-icon-wrap.humidity  { background: var(--icon-humidity);  color: var(--c-humidity);  }
.metric-icon-wrap.wind      { background: var(--icon-wind);      color: var(--c-wind);      }
.metric-icon-wrap.precip    { background: var(--icon-precip);    color: var(--c-precip);    }
.metric-icon-wrap.vis       { background: var(--icon-vis);       color: var(--c-vis);       }
.metric-icon-wrap.uv        { background: var(--icon-uv);        color: var(--c-uv);        }
.metric-icon-wrap.pressure  { background: var(--icon-pressure);  color: var(--c-pressure);  }

.metric-data { display: flex; flex-direction: column; gap: 3px; }
.metric-label { font-size: 0.71rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); font-weight: 500; }
.metric-val { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 600; color: var(--text-primary); }
.metric-extra { font-size: 0.72rem; color: var(--text-muted); margin-top: auto; }

.metric-bar-wrap { margin-top: auto; }
.metric-bar { height: 3px; background: var(--sun-track); border-radius: 3px; overflow: hidden; }
.metric-fill { height: 100%; border-radius: 3px; transition: width 1s ease; }
.humidity-fill { background: linear-gradient(90deg, var(--c-humidity), #93c5fd); }


/* ══════════════════════════════════════════════════════════
   SECTION 12 — AQI CARD  (from components.css)
══════════════════════════════════════════════════════════ */

.aqi-card { padding: 18px; display: flex; flex-direction: column; gap: 13px; }
.aqi-header { display: flex; align-items: center; justify-content: space-between; }
.aqi-badge {
    padding: 3px 10px; border-radius: 20px; font-size: 0.73rem; font-weight: 700;
    letter-spacing: 0.05em; text-transform: uppercase;
    background: rgba(16,185,129,0.15); color: var(--color-good);
    border: 1px solid rgba(16,185,129,0.25); transition: all 0.3s;
}
.aqi-body { display: flex; gap: 14px; align-items: center; }

.aqi-ring { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.aqi-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.aqi-track { fill: none; stroke: var(--sun-track); stroke-width: 8; }
.aqi-arc { fill: none; stroke: var(--color-good); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314; transition: stroke-dashoffset 1.2s ease, stroke 0.4s; }
.aqi-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.aqi-num { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--text-primary); }
.aqi-unit { font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }

.aqi-pollutants { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pollutant-row { display: grid; grid-template-columns: 42px 1fr 36px 44px; align-items: center; gap: 7px; }
.poll-label { font-size: 0.7rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.poll-bar { height: 4px; background: var(--sun-track); border-radius: 4px; overflow: hidden; }
.poll-fill { height: 100%; border-radius: 4px; width: 0%; transition: width 1s ease; }
.pm25-fill { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.pm10-fill { background: linear-gradient(90deg, #10b981, #f59e0b); }
.no2-fill  { background: linear-gradient(90deg, #818cf8, #c084fc); }
.o3-fill   { background: linear-gradient(90deg, #38bdf8, #10b981); }
.poll-val { font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; color: var(--text-primary); text-align: right; }
.poll-unit { font-size: 0.66rem; color: var(--text-muted); }
.aqi-advice { font-size: 0.76rem; color: var(--text-secondary); line-height: 1.5; padding-top: 8px; border-top: 1px solid var(--glass-border); }


/* ══════════════════════════════════════════════════════════
   SECTION 13 — COMPARE CARD  (from components.css)
══════════════════════════════════════════════════════════ */

.compare-card { padding: 18px; display: flex; flex-direction: column; gap: 13px; }
.compare-inputs { display: flex; flex-direction: column; gap: 8px; }
.compare-input-wrap {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
    border-radius: 10px; padding: 8px 13px; transition: border-color 0.2s;
}
.compare-input-wrap:focus-within { border-color: var(--accent); }
.compare-input-wrap i { color: var(--text-muted); font-size: 0.83rem; flex-shrink: 0; }
.compare-input-wrap input { background: transparent; border: none; color: var(--text-primary); font-size: 0.86rem; width: 100%; }
.compare-input-wrap input::placeholder { color: var(--text-muted); }

.vs-divider { display: flex; align-items: center; justify-content: center; }
.vs-divider span { font-family: 'Outfit', sans-serif; font-size: 0.73rem; font-weight: 700; letter-spacing: 0.12em; color: var(--text-muted); background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 3px 10px; border-radius: 8px; }

.compare-results { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.compare-item { background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border); border-radius: 12px; padding: 13px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.cmp-city { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.cmp-temp { font-family: 'Outfit', sans-serif; font-size: 1.9rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.cmp-meta { font-size: 0.75rem; color: var(--text-muted); display: flex; flex-direction: column; gap: 3px; }


/* ══════════════════════════════════════════════════════════
   SECTION 14 — FORECAST SECTIONS  (from components.css)
══════════════════════════════════════════════════════════ */

.forecast-section { padding: 18px; display: flex; flex-direction: column; gap: 13px; }
.section-header { display: flex; align-items: center; justify-content: space-between; }

/* Hourly */
.hourly-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.hourly-card {
    min-width: 70px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    border-radius: 14px; padding: 11px 8px; display: flex; flex-direction: column;
    align-items: center; gap: 7px; text-align: center;
    transition: background 0.2s, transform 0.2s; cursor: default; flex-shrink: 0;
}
.hourly-card:hover { background: rgba(59,130,246,0.1); transform: translateY(-2px); }
.hourly-card.current-hour { background: rgba(59,130,246,0.15); border-color: var(--accent); }
.h-time { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }
.h-icon { font-size: 1.25rem; color: var(--accent); }
.h-temp { font-family: 'Outfit', sans-serif; font-size: 0.92rem; font-weight: 600; color: var(--text-primary); }
.h-rain { font-size: 0.68rem; color: var(--c-precip); display: flex; align-items: center; gap: 3px; }

/* 14-day forecast */
.forecast-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.forecast-card {
    min-width: 125px; background: rgba(255,255,255,0.03); border: 1px solid var(--glass-border);
    border-radius: 16px; padding: 15px 11px; display: flex; flex-direction: column;
    align-items: center; gap: 7px; text-align: center; flex-shrink: 0;
    transition: background 0.2s, transform 0.2s, border-color 0.2s; cursor: default;
}
.forecast-card:hover { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.3); transform: translateY(-3px); }
.forecast-card.today { background: rgba(59,130,246,0.12); border-color: var(--accent); }

.fc-day { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.fc-date-num { font-family: 'Outfit', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--text-primary); line-height: 1; }
.fc-icon { font-size: 1.75rem; color: var(--accent); }
.fc-high { font-family: 'Outfit', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--text-primary); }
.fc-low { font-size: 0.83rem; color: var(--text-muted); }
.fc-rain { font-size: 0.7rem; color: var(--c-precip); display: flex; align-items: center; gap: 4px; }
.fc-humidity-text { font-size: 0.68rem; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }


/* ══════════════════════════════════════════════════════════
   SECTION 15 — ANIMATIONS  (from animations.css)
══════════════════════════════════════════════════════════ */

@keyframes pulse-icon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.1); opacity: 0.75; }
}
@keyframes loader-progress {
    0%   { width: 0%; }
    60%  { width: 75%; }
    100% { width: 100%; }
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scale-in {
    from { opacity: 0; transform: scale(0.93); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes orb-drift-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(40px, -30px) scale(1.05); }
    66%       { transform: translate(-20px, 20px) scale(0.97); }
}
@keyframes orb-drift-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%       { transform: translate(-50px, 30px) scale(1.08); }
}
@keyframes orb-drift-3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%       { transform: translate(-48%, -52%) scale(1.06); }
}
.orb-1 { animation: orb-drift-1 18s ease-in-out infinite; }
.orb-2 { animation: orb-drift-2 22s ease-in-out infinite; }
.orb-3 { animation: orb-drift-3 26s ease-in-out infinite; }

@keyframes icon-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}
.hero-icon { animation: icon-float 3.5s ease-in-out infinite; }

@keyframes sun-pulse {
    0%, 100% { box-shadow: 0 0 8px #facc1580; }
    50%       { box-shadow: 0 0 18px #facc15cc; }
}
.sun-dot { animation: sun-pulse 2.5s ease-in-out infinite; }

@keyframes spin-once {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.gps-btn.locating i { animation: spin-once 1s linear infinite; }

.forecast-card:nth-child(1)  { animation: fade-up 0.3s ease both 0.05s; }
.forecast-card:nth-child(2)  { animation: fade-up 0.3s ease both 0.10s; }
.forecast-card:nth-child(3)  { animation: fade-up 0.3s ease both 0.15s; }
.forecast-card:nth-child(4)  { animation: fade-up 0.3s ease both 0.20s; }
.forecast-card:nth-child(5)  { animation: fade-up 0.3s ease both 0.25s; }
.forecast-card:nth-child(6)  { animation: fade-up 0.3s ease both 0.30s; }
.forecast-card:nth-child(7)  { animation: fade-up 0.3s ease both 0.35s; }
.forecast-card:nth-child(8)  { animation: fade-up 0.3s ease both 0.38s; }
.forecast-card:nth-child(9)  { animation: fade-up 0.3s ease both 0.40s; }
.forecast-card:nth-child(10) { animation: fade-up 0.3s ease both 0.42s; }
.forecast-card:nth-child(11) { animation: fade-up 0.3s ease both 0.44s; }
.forecast-card:nth-child(12) { animation: fade-up 0.3s ease both 0.46s; }
.forecast-card:nth-child(13) { animation: fade-up 0.3s ease both 0.48s; }
.forecast-card:nth-child(14) { animation: fade-up 0.3s ease both 0.50s; }

.hourly-card { animation: fade-in 0.25s ease both; }

.metric-card:nth-child(1) { animation: scale-in 0.35s ease both 0.10s; }
.metric-card:nth-child(2) { animation: scale-in 0.35s ease both 0.15s; }
.metric-card:nth-child(3) { animation: scale-in 0.35s ease both 0.20s; }
.metric-card:nth-child(4) { animation: scale-in 0.35s ease both 0.25s; }
.metric-card:nth-child(5) { animation: scale-in 0.35s ease both 0.30s; }
.metric-card:nth-child(6) { animation: scale-in 0.35s ease both 0.35s; }

@keyframes temp-pop {
    0%   { transform: scale(0.9); opacity: 0; }
    70%  { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}
.temp-value.updated { animation: temp-pop 0.4s ease forwards; }

@keyframes heart-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.35); }
    100% { transform: scale(1); }
}
.fav-btn.popped i { animation: heart-pop 0.35s ease; }

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.compare-results:not(.hidden) { animation: slide-down 0.3s ease; }


/* ══════════════════════════════════════════════════════════
   SECTION 16 — RESPONSIVE / MOBILE-FIRST FIXES
   (Merged + heavily improved from responsive.css)
══════════════════════════════════════════════════════════ */

/* ── LARGE (≤1200px) ────────────────────────────────────── */
@media (max-width: 1200px) {
    .dashboard {
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        grid-template-rows: auto auto auto;
    }
    .hero-card    { grid-column: 1; grid-row: 1 / 3; }
    .metrics-panel { grid-column: 2; grid-row: 1; grid-template-columns: repeat(2, 1fr); }
    .aqi-card     { grid-column: 2; grid-row: 2; }
    .compare-card { grid-column: 1 / -1; grid-row: 3; }
}

/* ── TABLET LANDSCAPE (≤1024px) ─────────────────────────── */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr 1fr;
    }
    .hero-card    { grid-column: 1 / -1; grid-row: auto; }
    .metrics-panel { grid-column: 1 / -1; grid-row: auto; grid-template-columns: repeat(3, 1fr); }
    .aqi-card     { grid-column: 1; grid-row: auto; }
    .compare-card { grid-column: 2; grid-row: auto; }

    .temp-value { font-size: 4.5rem; }
    .hero-icon  { font-size: 3.8rem; }

    /* Profile chip: hide text, keep icon */
    .profile-chip-text { display: none; }
    .profile-chip { padding: 7px 10px; }
}

/* ── TABLET PORTRAIT (≤768px) ───────────────────────────── */
@media (max-width: 768px) {
    .app-wrapper { padding: 0 12px 24px; gap: 12px; }

    /* ── HEADER: stays on one tight row, no wrap ── */
    .top-header {
        flex-wrap: nowrap;
        padding: 8px 12px;
        gap: 8px;
    }

    .header-left { gap: 10px; }

    /* Hide greeting to save space */
    .header-greeting { display: none; }

    /* Brand tighter */
    .brand-name { font-size: 1.25rem; }
    .brand-logo { width: 28px; height: 28px; }

    .header-right { gap: 7px; }

    /* Search takes available space */
    .search-bar { max-width: none; flex: 1; min-width: 0; padding: 6px 10px; }

    /* Hide profile chip on mobile */
    .profile-chip { display: none; }

    /* ── NAV: chips scroll horizontally, selects stack below on very small ── */
    .quick-nav { flex-wrap: wrap; padding: 8px 12px; gap: 8px; }
    .nav-selects { width: 100%; }
    .styled-select { max-width: 49%; flex: 1; }

    /* ── DASHBOARD: single column ── */
    .dashboard { grid-template-columns: 1fr; gap: 12px; }
    .hero-card    { grid-column: 1; grid-row: auto; }
    .metrics-panel { grid-column: 1; grid-row: auto; grid-template-columns: repeat(2, 1fr); }
    .aqi-card     { grid-column: 1; grid-row: auto; }
    .compare-card { grid-column: 1; grid-row: auto; }

    /* Hero */
    .hero-card { padding: 16px; gap: 14px; }
    .location-name { font-size: 1.05rem; }
    .temp-value { font-size: 4rem; letter-spacing: -3px; }
    .hero-icon  { font-size: 3.2rem; }
    .unit-symbol { font-size: 1.5rem; margin-top: 10px; }

    /* Sun bar */
    .sun-bar { padding: 9px 12px; }
    .sun-time { font-size: 0.78rem; }
    .sun-label { display: none; }

    /* Metrics */
    .metric-val { font-size: 1.1rem; }

    /* AQI body: stack vertically */
    .aqi-body { flex-direction: column; align-items: flex-start; }
    .aqi-ring { width: 78px; height: 78px; }
    .aqi-num  { font-size: 1.35rem; }

    /* Forecast */
    .forecast-section { padding: 14px; }
    .hourly-card { min-width: 62px; }
    .forecast-card { min-width: 110px; }

    /* Footer */
    .footer-inner { flex-direction: column; gap: 14px; text-align: center; }
    .footer-info  { text-align: center; }
    .footer-links { justify-content: center; }
    .footer-brand { justify-content: center; }
}

/* ── MOBILE SMALL (≤480px) ──────────────────────────────── */
@media (max-width: 480px) {
    .app-wrapper { padding: 0 8px 18px; gap: 10px; }

    .brand-name { font-size: 1.1rem; }
    .brand-logo { width: 24px; height: 24px; }
    .ctrl-btn   { width: 32px; height: 32px; font-size: 0.75rem; }

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

    .temp-value   { font-size: 3.5rem; letter-spacing: -2px; }
    .hero-icon    { font-size: 2.8rem; }
    .unit-symbol  { font-size: 1.3rem; margin-top: 8px; }
    .location-name { font-size: 0.95rem; }

    .pollutant-row { grid-template-columns: 34px 1fr 28px 36px; gap: 4px; }

    .compare-results { grid-template-columns: 1fr 1fr; }
    .cmp-temp { font-size: 1.5rem; }

    .forecast-card { min-width: 98px; padding: 11px 8px; }
    .fc-icon { font-size: 1.4rem; }
    .hourly-card { min-width: 56px; padding: 9px 6px; }

    /* Search bar placeholder shorter */
    .search-bar input::placeholder { content: 'Search...'; font-size: 0.8rem; }

    .nav-selects { flex-direction: column; gap: 6px; }
    .styled-select { max-width: 100%; }
}

/* ── LANDSCAPE PHONE (≤768px landscape) ─────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
    .top-header {
        flex-wrap: nowrap;
        padding: 6px 12px;
    }
    .header-greeting { display: flex; }
    .profile-chip { display: none; }

    .dashboard { grid-template-columns: 1fr 1fr; }
    .hero-card    { grid-column: 1 / -1; grid-row: auto; }
    .metrics-panel { grid-column: 1 / -1; grid-row: auto; grid-template-columns: repeat(6, 1fr); }
    .aqi-card     { grid-column: 1; grid-row: auto; }
    .compare-card { grid-column: 2; grid-row: auto; }

    .temp-value { font-size: 3.2rem; }
    .hero-icon  { font-size: 2.8rem; }
    .hero-card  { padding: 14px; gap: 12px; }

    .metric-card { padding: 11px; }
    .metric-val  { font-size: 0.95rem; }
    .aqi-body { flex-direction: row; }
    .aqi-ring { width: 68px; height: 68px; }
}

/* ── TABLET LANDSCAPE (769-1024 landscape) ───────────────── */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .dashboard { grid-template-columns: 1.2fr 1fr 1fr; }
    .hero-card    { grid-column: 1; grid-row: 1 / 3; }
    .metrics-panel { grid-column: 2 / 4; grid-row: 1; grid-template-columns: repeat(3, 1fr); }
    .aqi-card     { grid-column: 2; grid-row: 2; }
    .compare-card { grid-column: 3; grid-row: 2; }
}

/* ── SAFE AREAS (notch, home indicator) ──────────────────── */
@supports (padding: max(0px)) {
    .top-header {
        padding-left:  max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    .app-wrapper {
        padding-left:  max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
}

/* ── REDUCE MOTION ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
