/* ============================================================================
   WEATHER PRO - Senior Level Professional CSS
   Design System: Enterprise-Grade Weather Application
   ============================================================================ */

/* ============================================================================
   1. DESIGN TOKENS & CSS CUSTOM PROPERTIES
   ============================================================================ */

:root {
    /* COLOR PALETTE */
    --primary: #1e3a8a;
    --primary-light: #3b82f6;
    --primary-dark: #0f172a;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    /* GRAYS */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* SEMANTIC COLORS */
    --color-humidity: linear-gradient(135deg, #06b6d4, #0891b2);
    --color-wind: linear-gradient(135deg, #fbbf24, #f59e0b);
    --color-temperature: linear-gradient(135deg, #f87171, #ef4444);
    --color-uv: linear-gradient(135deg, #c084fc, #a855f7);
    --color-pressure: linear-gradient(135deg, #34d399, #10b981);
    --color-visibility: linear-gradient(135deg, #f472b6, #ec4899);
    --color-aq: linear-gradient(135deg, #93c5fd, #3b82f6);
    
    /* TYPOGRAPHY */
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-family-mono: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    
    --font-size-xs: clamp(0.75rem, 1vw, 0.875rem);
    --font-size-sm: clamp(0.875rem, 1.1vw, 1rem);
    --font-size-base: clamp(1rem, 1.2vw, 1.125rem);
    --font-size-lg: clamp(1.125rem, 1.4vw, 1.25rem);
    --font-size-xl: clamp(1.25rem, 1.6vw, 1.5rem);
    --font-size-2xl: clamp(1.5rem, 2vw, 1.875rem);
    --font-size-3xl: clamp(1.875rem, 2.5vw, 2.25rem);
    --font-size-4xl: clamp(2.25rem, 3vw, 3rem);
    
    --line-height: 1.6;
    --letter-spacing: 0.3px;
    
    /* SPACING */
    --spacing-px: 1px;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* BORDER RADIUS */
    --radius-xs: 0.25rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* SHADOWS */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* TRANSITIONS */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Z-INDEX */
    --z-hide: -1;
    --z-base: 0;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-popover: 60;
    --z-tooltip: 70;
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #78909c;
        --gray-600: #94a3b8;
        --gray-700: #cbd5e1;
        --gray-800: #e2e8f0;
        --gray-900: #f1f5f9;
    }
}

/* ============================================================================
   2. RESET & BASE STYLES
   ============================================================================ */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    letter-spacing: var(--letter-spacing);
    color: var(--gray-900);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    transition: background var(--transition-slow);
}

/* WEATHER-BASED BACKGROUNDS */
body.weather-sunny {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.weather-cloudy {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.weather-rainy {
    background: linear-gradient(135deg, #4c5f8f 0%, #667eea 100%);
}

body.weather-snowy {
    background: linear-gradient(135deg, #a8dadc 0%, #457b9d 100%);
}

body.weather-clear {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

@media (prefers-color-scheme: dark) {
    body {
        color: var(--gray-100);
    }
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
    line-height: var(--line-height);
    margin-bottom: var(--spacing-md);
}

/* SCREEN READER ONLY */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================================================
   4. LAYOUT COMPONENTS
   ============================================================================ */

.app-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* HEADER */
.app-header {
    background: rgba(30, 58, 138, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: white;
}

.logo-icon {
    font-size: var(--font-size-3xl);
    animation: bounce-soft 3s ease-in-out infinite;
}

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

.brand-text h1 {
    margin: 0;
    font-size: var(--font-size-2xl);
}

.tagline {
    font-size: var(--font-size-sm);
    opacity: 0.9;
    display: block;
}

.header-controls {
    display: flex;
    gap: var(--spacing-md);
}

/* ============================================================================
   5. SEARCH SECTION
   ============================================================================ */

.search-section {
    margin-bottom: var(--spacing-3xl);
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.search-input {
    width: 100%;
    padding: var(--spacing-lg);
    font-size: var(--font-size-base);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.98);
    color: #0f172a;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

.search-input::-webkit-autofill,
.search-input::-webkit-autofill:hover,
.search-input::-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.98) inset !important;
    -webkit-text-fill-color: #0f172a !important;
}

.search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-input::-webkit-outer-spin-button,
.search-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1), var(--shadow-lg);
}

.search-focus-ring {
    position: absolute;
    inset: -4px;
    border-radius: var(--radius-xl);
    border: 2px solid rgba(59, 130, 246, 0);
    pointer-events: none;
    transition: border-color var(--transition-fast);
}

.search-input:focus ~ .search-focus-ring {
    border-color: rgba(59, 130, 246, 0.3);
}

.search-hint {
    text-align: center;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.8);
    margin-top: var(--spacing-md);
}

/* ============================================================================
   6. ALERTS & MESSAGES
   ============================================================================ */

.error-message {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    color: #fca5a5;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    transition: all var(--transition-base);
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.alert-banner {
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
    color: #fbbf24;
    font-weight: 500;
    display: none;
}

.alert-banner.visible {
    display: block;
}

/* ============================================================================
   7. SKELETON LOADER
   ============================================================================ */

.skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.skeleton-current {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
    background-size: 200% 100%;
    border-radius: var(--radius-md);
    animation: shimmer 2s infinite;
}

.skeleton-line.skeleton-lg { height: 48px; }
.skeleton-line.skeleton-sm { height: 16px; }
.skeleton-line.skeleton-md { height: 24px; }

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.skeleton-card {
    background: rgba(255, 255, 255, 0.1);
    height: 200px;
    border-radius: var(--radius-lg);
    animation: shimmer 2s infinite;
}

/* ============================================================================
   8. CURRENT WEATHER SECTION
   ============================================================================ */

.weather-content {
    display: block;
}

.current-weather {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-2xl);
    padding: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out;
}

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

.current-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.current-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.location-time {
    margin-bottom: var(--spacing-xl);
}

.location {
    color: white;
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-sm);
}

.datetime-display {
    color: rgba(255, 255, 255, 0.85);
    font-size: var(--font-size-sm);
}

.current-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.temp-section {
    display: flex;
    flex-direction: column;
}

.temperature {
    display: flex;
    align-items: flex-start;
    color: white;
}

.temp-value {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
}

.temp-unit {
    font-size: var(--font-size-lg);
    margin-left: var(--spacing-xs);
}

.temp-details {
    margin-top: var(--spacing-md);
}

.description {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.feels-like {
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--font-size-sm);
    margin-top: var(--spacing-sm);
}

.feels-like-temp {
    font-weight: 600;
}

.weather-icon-large {
    display: flex;
    justify-content: center;
    align-items: center;
}

.icon-display {
    font-size: clamp(4rem, 8vw, 6rem);
    animation: float 6s ease-in-out infinite;
}

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

.favorite-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.favorite-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.favorite-btn.active {
    background: #fbbf24;
    color: #1e3a8a;
    border-color: #fbbf24;
}

/* QUICK METRICS */
.quick-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.quick-metric-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all var(--transition-base);
}

.quick-metric-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.metric-icon {
    font-size: var(--font-size-2xl);
}

.metric-content {
    display: flex;
    flex-direction: column;
}

.metric-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.metric-value {
    color: white;
    font-size: var(--font-size-xl);
    font-weight: 700;
}

/* SUGGESTION CARD */
.suggestion-card {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: #a7f3d0;
    font-weight: 500;
}

.suggestion-icon {
    font-size: var(--font-size-2xl);
}

.suggestion-text {
    flex: 1;
}

/* ============================================================================
   9. DETAILED METRICS GRID
   ============================================================================ */

.detailed-metrics {
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    color: white;
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-xl);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.metric-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    animation: fadeInUp 0.6s ease-out both;
}

@for $i from 1 to 10 {
    .metric-card:nth-child(#{$i}) {
        animation-delay: calc(#{$i} * 0.1s);
    }
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-12px);
    box-shadow: var(--shadow-2xl);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-header h4 {
    color: white;
    font-size: var(--font-size-lg);
    margin: 0;
}

.card-icon {
    font-size: var(--font-size-2xl);
}

.card-content {
    color: white;
}

/* TEMPERATURE CARD */
.temp-comparison {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    justify-content: center;
}

.temp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.temp-item .label {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-xs);
}

.temp-item .value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    background: var(--color-temperature);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.separator {
    opacity: 0.5;
}

/* WIND CARD */
.wind-data {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.wind-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wind-item .label {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

.wind-item .value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    background: var(--color-wind);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* UV INDEX CARD */
.uv-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.uv-value-display {
    display: flex;
    align-items: baseline;
    gap: var(--spacing-md);
}

.uv-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    background: var(--color-uv);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.uv-label {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
}

.uv-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.uv-bar-fill {
    height: 100%;
    background: var(--color-uv);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

/* HUMIDITY CARD */
.humidity-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.humidity-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.humidity-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.humidity-arc {
    fill: none;
    stroke: url(#humidityGradient);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 282.7;
    transition: stroke-dashoffset var(--transition-base);
}

.humidity-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-2xl);
    font-weight: 700;
}

/* PRESSURE CARD */
.pressure-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pressure-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    background: var(--color-pressure);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.pressure-trend {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
}

/* VISIBILITY CARD */
.visibility-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.visibility-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    background: var(--color-visibility);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.visibility-condition {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
}

/* AIR QUALITY CARD */
.aq-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.aq-badge {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: white;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-lg);
}

.aq-status {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
}

/* SUN TIMES CARD */
.sun-times {
    display: flex;
    gap: var(--spacing-xl);
    justify-content: space-around;
}

.sun-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sun-item .label {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-xs);
}

.sun-item .value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: white;
}

/* ============================================================================
   10. HOURLY FORECAST
   ============================================================================ */

.hourly-section {
    margin-bottom: var(--spacing-2xl);
}

.hourly-container {
    display: flex;
    gap: var(--spacing-md);
    overflow-x: auto;
    padding: var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.hourly-container::-webkit-scrollbar {
    height: 8px;
}

.hourly-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-full);
}

.hourly-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
}

.hourly-item {
    flex: 0 0 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.hourly-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.hourly-time {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    font-weight: 600;
}

.hourly-icon {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

.hourly-temp {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: white;
}

/* ============================================================================
   11. 5-DAY FORECAST
   ============================================================================ */

.forecast-section {
    margin-bottom: var(--spacing-2xl);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
}

.forecast-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    transition: all var(--transition-base);
}

.forecast-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.forecast-day {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.forecast-icon {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
}

.forecast-temps {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    font-weight: 700;
    color: white;
}

.forecast-high {
    font-size: var(--font-size-lg);
}

.forecast-low {
    font-size: var(--font-size-base);
    opacity: 0.7;
}

/* ============================================================================
   12. BUTTONS & CONTROLS
   ============================================================================ */

.unit-toggle,
.favorites-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.unit-toggle:hover,
.favorites-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.unit-toggle:active,
.favorites-btn:active {
    transform: scale(0.95);
}

/* ============================================================================
   13. MODAL
   ============================================================================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    animation: fadeIn var(--transition-base);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(30, 58, 138, 0.98);
    border-radius: var(--radius-2xl);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: slideUp var(--transition-base);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: var(--font-size-xl);
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: var(--spacing-md);
    transition: transform var(--transition-fast);
}

.modal-close:hover {
    transform: rotate(90deg);
}

.favorites-list {
    padding: var(--spacing-xl);
}

.favorite-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(8px);
}

.favorite-name {
    color: white;
    font-weight: 600;
}

.favorite-remove {
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.favorite-remove:hover {
    background: rgba(239, 68, 68, 0.5);
}

/* ============================================================================
   14. FOOTER
   ============================================================================ */

.app-footer {
    background: rgba(30, 58, 138, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--spacing-xl);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
}

.app-footer p {
    margin: var(--spacing-xs) 0;
}

.footer-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-xs);
}

/* ============================================================================
   15. RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
    .app-main {
        padding: var(--spacing-lg);
    }
    
    .current-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .app-header {
        padding: var(--spacing-md);
    }
    
    .header-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .header-brand {
        width: 100%;
        justify-content: center;
    }
    
    .brand-text {
        text-align: center;
    }
    
    .app-main {
        padding: var(--spacing-md);
    }
    
    .current-weather {
        padding: var(--spacing-lg);
    }
    
    .current-display {
        justify-content: center;
        flex-direction: column;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .temp-comparison {
        flex-direction: column;
    }
    
    .search-hint {
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 600px) {
    :root {
        --font-size-base: clamp(0.875rem, 1vw, 1rem);
        --spacing-md: 0.75rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.5rem;
    }
    
    .app-header {
        padding: var(--spacing-md);
    }
    
    .location {
        font-size: var(--font-size-2xl);
    }
    
    .temp-value {
        font-size: clamp(2rem, 4vw, 3rem);
    }
    
    .icon-display {
        font-size: clamp(3rem, 6vw, 4rem);
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .quick-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

/* ============================================================================
   16. ACCESSIBILITY
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --primary: #3b82f6;
    }
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: -2px;
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
    .metric-card {
        border-width: 2px;
    }
    
    .search-input {
        border-width: 2px;
    }
}

/* Print Styles */
@media print {
    .header-controls,
    .search-section,
    .app-footer {
        display: none;
    }
    
    body {
        background: white;
    }
}
