/* Core CSS Design System for Paris Weather Dashboard */

:root {
    /* Color Palette */
    --bg-main: #0b0f19;
    --bg-gradient: linear-gradient(135deg, #0b0f19 0%, #0f172a 100%);
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-bg-hover: rgba(30, 41, 59, 0.6);
    --card-border-hover: rgba(255, 255, 255, 0.12);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #3b82f6;
    --primary-glow: rgba(59, 130, 246, 0.35);
    --success: #10b981;
    --accent: #6366f1;
    
    /* Station Colors */
    --color-montsouris: #3b82f6;
    --color-luxembourg: #10b981;
    --color-eiffel: #eab308;
    --color-lariboisiere: #ec4899;
    --color-longchamp: #8b5cf6;
    --color-orly: #f97316;
    --color-bourget: #06b6d4;
    --color-roissy: #ef4444;

    /* Transitions & Shadows */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --glow-shadow: 0 0 20px rgba(59, 130, 246, 0.15);
}

/* Reset & Scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, -apple-system, sans-serif;
    background: var(--bg-main);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Layout Container */
.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.glow-dot {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 12px 3px var(--primary);
    position: relative;
}

.header-logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .header-meta {
        align-items: flex-start;
    }
}

.header-meta p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.update-tag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    position: relative;
}

.pulse-indicator::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 1px solid var(--primary);
    border-radius: 50%;
    animation: pulse 1.8s infinite ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.glass-card:hover {
    border-color: var(--card-border-hover);
    background: var(--card-bg-hover);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Styling */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-metrics, .panel-stations {
    padding: 1.5rem;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

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

.panel-header h2 {
    margin-bottom: 0;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.text-btn:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Metric Buttons */
.metric-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.metric-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    transform: translateX(4px);
}

.metric-btn.active {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

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

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

.metric-info .label {
    font-size: 0.9rem;
    font-weight: 500;
}

.metric-info .unit {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Station Checklist */
.station-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.station-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid transparent;
    transition: var(--transition);
}

.station-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.station-item.active {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.station-item input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-muted);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.station-item.active .custom-checkbox {
    border-color: var(--station-color, var(--primary));
    background: var(--station-color, var(--primary));
}

.custom-checkbox::after {
    content: '✓';
    color: var(--bg-main);
    font-size: 0.75rem;
    font-weight: bold;
    display: none;
}

.station-item.active .custom-checkbox::after {
    display: block;
}

.station-details {
    display: flex;
    flex-direction: column;
}

.station-details .name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.station-item.active .name {
    color: var(--text-primary);
}

.station-details .meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Main Area Elements */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Stats Highlights Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    border-left: 4px solid var(--station-color, var(--primary));
}

.stat-card .station-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-card .station-title::after {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--station-color, var(--primary));
    border-radius: 50%;
}

.stat-card .value-group {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.stat-card .unit {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-card .time-stamp {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Timeline Chart Area */
.chart-card {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
}

.chart-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chart-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0;
}

.chart-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.chart-actions {
    display: flex;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 8px;
    gap: 0.25rem;
}

.chart-action-btn {
    background: none;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.chart-action-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.chart-action-btn.active {
    background: var(--primary);
    color: var(--bg-main);
    font-weight: 600;
}

.chart-wrapper {
    width: 100%;
    height: 520px;
    position: relative;
}

#timeline-chart {
    width: 100%;
    height: 100%;
}

/* Footer styling */
.dashboard-footer {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid var(--card-border);
    margin-top: 2rem;
}

.dashboard-footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
}
