/* Weather Display System - Modern Blue Theme with Wind Background */

:root {
  --primary-color: #0ea5e9;
  --primary-hover: #0284c7;
  --secondary-color: #3b82f6;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --background-base: #f0f9ff;
  --surface-color: rgba(255, 255, 255, 0.95);
  --surface-hover: rgba(255, 255, 255, 0.98);
  --text-primary: #0c4a6e;
  --text-secondary: #0369a1;
  --text-muted: #64748b;
  --border-color: #bae6fd;
  --border-hover: #7dd3fc;
  --shadow: 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);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background-base);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Topographical contour line background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 25% 25%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 75%, rgba(6, 182, 212, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    z-index: -3;
}

/* Contour lines - topographical pattern */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        /* Primary contour rings */
        radial-gradient(circle at 15% 30%, transparent 80px, rgba(14, 165, 233, 0.08) 82px, rgba(14, 165, 233, 0.08) 84px, transparent 86px),
        radial-gradient(circle at 15% 30%, transparent 120px, rgba(14, 165, 233, 0.06) 122px, rgba(14, 165, 233, 0.06) 124px, transparent 126px),
        radial-gradient(circle at 15% 30%, transparent 160px, rgba(14, 165, 233, 0.04) 162px, rgba(14, 165, 233, 0.04) 164px, transparent 166px),
        
        radial-gradient(circle at 70% 20%, transparent 60px, rgba(6, 182, 212, 0.08) 62px, rgba(6, 182, 212, 0.08) 64px, transparent 66px),
        radial-gradient(circle at 70% 20%, transparent 100px, rgba(6, 182, 212, 0.06) 102px, rgba(6, 182, 212, 0.06) 104px, transparent 106px),
        radial-gradient(circle at 70% 20%, transparent 140px, rgba(6, 182, 212, 0.04) 142px, rgba(6, 182, 212, 0.04) 144px, transparent 146px),
        
        radial-gradient(circle at 80% 70%, transparent 70px, rgba(59, 130, 246, 0.08) 72px, rgba(59, 130, 246, 0.08) 74px, transparent 76px),
        radial-gradient(circle at 80% 70%, transparent 110px, rgba(59, 130, 246, 0.06) 112px, rgba(59, 130, 246, 0.06) 114px, transparent 116px),
        radial-gradient(circle at 80% 70%, transparent 150px, rgba(59, 130, 246, 0.04) 152px, rgba(59, 130, 246, 0.04) 154px, transparent 156px),
        
        radial-gradient(circle at 25% 75%, transparent 90px, rgba(14, 165, 233, 0.06) 92px, rgba(14, 165, 233, 0.06) 94px, transparent 96px),
        radial-gradient(circle at 25% 75%, transparent 130px, rgba(14, 165, 233, 0.04) 132px, rgba(14, 165, 233, 0.04) 134px, transparent 136px),
        
        radial-gradient(circle at 60% 85%, transparent 50px, rgba(6, 182, 212, 0.06) 52px, rgba(6, 182, 212, 0.06) 54px, transparent 56px),
        radial-gradient(circle at 60% 85%, transparent 85px, rgba(6, 182, 212, 0.04) 87px, rgba(6, 182, 212, 0.04) 89px, transparent 91px);
    animation: topoFlow 30s ease-in-out infinite;
    z-index: -2;
}

@keyframes topoFlow {
    0%, 100% {
        transform: translateY(0px);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-5px);
        opacity: 0.8;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 3rem;
    background: var(--surface-color);
    border-radius: 2rem;
    padding: 3rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.02em;
}

header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.status {
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status.online {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.status.offline {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* Modern Cards */
.card {
    background: var(--surface-color);
    border-radius: 1.5rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 1.5rem 1.5rem 0 0;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    background: var(--surface-hover);
}

.card h2 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Configuration */
.config-grid {
    display: grid;
    gap: 1.5rem;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.config-item label {
    font-weight: 600;
    color: #374151;
    min-width: 150px;
}

select {
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    min-width: 200px;
    transition: border-color 0.2s;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* Modern buttons */
.btn {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    border-radius: 0.75rem;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: initial;
}

/* Modern tabs */
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 3rem;
    background: var(--surface-color);
    padding: 0.75rem;
    border-radius: 1.25rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    white-space: nowrap;
}

.tab-button:hover {
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

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

/* Section headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header p {
    color: #6b7280;
    margin: 0;
    flex: 1;
    min-width: 300px;
}

/* Actions */
.actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Devices */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.device-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
    position: relative;
}

.device-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.device-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.device-name-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.device-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    border: 2px solid transparent;
    background: transparent;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    min-width: 200px;
    flex: 1;
}

.device-name:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--border-hover);
}

.device-name.editing {
    background: white;
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.device-name-edit-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
}

.device-name-edit-btn:hover {
    color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
    transform: scale(1.1);
}

.device-mac {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.device-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.device-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.device-info-item {
    display: flex;
    flex-direction: column;
}

.device-info-label {
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.25rem;
}

.device-info-value {
    color: #1f2937;
}

.device-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.region-selector-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.region-selector-container label {
    font-weight: 600;
    color: #4b5563;
    font-size: 0.9rem;
}

.region-select {
    padding: 8px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #1f2937;
    min-width: 180px;
    transition: all 0.2s;
    cursor: pointer;
}

.region-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.region-select:hover {
    border-color: #9ca3af;
}

.device-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Legacy station select - deprecated but kept for compatibility */
.station-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    min-width: 160px;
    transition: border-color 0.2s;
}

.station-select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.btn-identify {
    background: #8b5cf6;
    color: white;
    position: relative;
}

.btn-identify:hover {
    background: #7c3aed;
}

.btn-identify.pulsing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

.device-last-seen {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Stations */
.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.station-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.station-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.station-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.station-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.station-location {
    color: #6b7280;
    font-size: 0.9rem;
}

.station-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.station-status.enabled {
    background: #d1fae5;
    color: #065f46;
}

.station-status.disabled {
    background: #fee2e2;
    color: #991b1b;
}

.station-description {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.station-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Weather data */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.weather-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
}

.weather-station {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.weather-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.data-item {
    text-align: center;
}

.data-label {
    color: #6b7280;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.data-value {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
}

.data-unit {
    font-size: 0.9rem;
    color: #6b7280;
    margin-left: 2px;
}

.data-note {
    font-size: 0.75em;
    color: #999;
    font-style: italic;
    margin-top: 2px;
}

/* Actions */
.actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.data-controls {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.unit-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit-selector label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.unit-selector select {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    background: var(--surface-color);
    color: var(--text-primary);
    min-width: 80px;
    transition: all 0.3s;
}

.unit-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Regional grouping */
.region-group {
    margin-bottom: 2.5rem;
}

.region-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.region-header.chamonix {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

.region-header.solent {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
}

.region-stations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.timestamp {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Loading states */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.loading::after {
    content: "...";
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { 
        color: rgba(0,0,0,0);
        text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #6b7280;
        text-shadow: .25em 0 0 rgba(0,0,0,0), .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow: .25em 0 0 #6b7280, .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow: .25em 0 0 #6b7280, .5em 0 0 #6b7280;
    }
}

/* Error states */
.error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 2rem;
    padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .config-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .config-item label {
        min-width: auto;
    }
    
    .data-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===============================================================================
   WEATHER FORECAST STYLES
   =============================================================================== */

.forecast-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.forecast-controls .controls-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.region-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.region-selector label {
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.region-selector select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    background: white;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.region-selector select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.forecast-description {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(6, 182, 212, 0.05);
    border-radius: 1rem;
    border: 1px solid rgba(6, 182, 212, 0.1);
}

.forecast-description p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* Forecast Cards */
.forecast-card {
    background: var(--surface-color);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.forecast-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: var(--surface-hover);
}

.forecast-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    border-radius: 1.5rem 1.5rem 0 0;
}

.forecast-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.forecast-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.forecast-location {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.forecast-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Forecast Timeline */
.forecast-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    max-width: 100%;
    overflow-x: auto;
    padding: 1rem 0;
}

.forecast-hour {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 0.5rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    min-width: 70px;
}

.forecast-hour:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.forecast-time {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.forecast-icon {
    font-size: 2rem;
    cursor: help;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.2s ease;
}

.forecast-icon:hover {
    transform: scale(1.1);
}

.forecast-temp {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Responsive Forecast Layout */
@media (max-width: 768px) {
    .forecast-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .forecast-controls .controls-left {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .region-selector {
        justify-content: space-between;
    }
    
    .region-selector select {
        min-width: auto;
        flex: 1;
    }
    
    .forecast-timeline {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    
    .forecast-hour {
        min-width: 60px;
        padding: 0.75rem 0.25rem;
        scroll-snap-align: center;
    }
    
    .forecast-icon {
        font-size: 1.5rem;
    }
    
    .forecast-temp {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .forecast-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .forecast-header h3 {
        font-size: 1.25rem;
    }
    
    .forecast-timeline {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Forecast N/A Error State */
.forecast-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: rgba(220, 38, 38, 0.05);
    border: 1px dashed rgba(220, 38, 38, 0.2);
    border-radius: 1rem;
}

.forecast-error-message {
    text-align: center;
    max-width: 400px;
}

.forecast-error-message .error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.forecast-error-message .error-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.forecast-error-message .error-description {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.forecast-error-message .error-note {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-style: italic;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0.5rem;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Forecast Version Footer */
.forecast-version-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
    font-family: monospace;
}
