/* Center section for Aurora Austral */
.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.aurora-title {
    color: var(--accent-cyan);
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(6, 182, 212, 0.18);
}
/* ============================================================
   SPACE WEATHER DASHBOARD - Professional Dark Theme
   ============================================================ */

/* --- CSS Variables --- */
:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-panel: #1a1f2e;
    --bg-panel-header: #141924;
    --border-color: #2a3348;
    --border-accent: #3b82f6;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-panel: 0 4px 20px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* Subtle animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* --- Header --- */
.dashboard-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #0f172a 100%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.4));
}

.dashboard-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    text-transform: uppercase;
}

.header-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Status Badges */
.status-indicators {
    display: flex;
    gap: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* Clock */
.clock-container {
    text-align: right;
}

.clock {
    font-family: 'Courier New', 'Fira Code', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    letter-spacing: 2px;
}

.clock-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Refresh Info */
.refresh-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.refresh-label {
    color: var(--text-muted);
}

#countdown {
    color: var(--accent-green);
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

#last-update {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

/* --- Dashboard Grid --- */
.dashboard-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 20px 24px;
    max-width: 1920px;
    margin: 0 auto;
}

/* --- Panel Base --- */
.panel {
    background: var(--bg-panel);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-panel);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.panel:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.05);
    transform: translateY(-1px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: var(--bg-panel-header);
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.panel-source {
    font-size: 0.65rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.panel-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    position: relative;
}

/* --- Image Panels --- */
.image-container {
    background: #000;
}

.dashboard-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dashboard-image:hover {
    filter: brightness(1.05);
}

/* Error state for images */
.dashboard-image.error {
    opacity: 0.3;
    filter: grayscale(1);
}

/* --- Chart Panels --- */
.chart-container {
    padding: 10px 14px;
    height: 320px;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.chart-loading.hidden {
    display: none;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* --- Footer --- */
.dashboard-footer {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 16px 28px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

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

.dashboard-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

.dashboard-footer a:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media (max-width: 1400px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    .panel-ace {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        padding: 12px 16px;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }

    .panel-ace {
        grid-column: span 1;
    }

    .dashboard-header h1 {
        font-size: 1.1rem;
    }

    .chart-container {
        height: 260px;
    }
}

@media (max-width: 600px) {
    .status-indicators {
        display: none;
    }

    .clock {
        font-size: 1rem;
    }

    .dashboard-header h1 {
        font-size: 0.95rem;
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* --- Selection --- */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}
