:root {
    --bg-dark: #0a0e1a;
    --accent-solar: #ff6b2b;
    --accent-plasma: #00d4ff;
    --accent-magnetic: #00ff88;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-bg: rgba(10, 14, 26, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

h1, h2, h3, .brand {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* --- Layout --- */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nova-nav {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5vw;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
}

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

.brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-solar);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link.active {
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-solar);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#mission-timer {
    font-size: 0.8rem;
    color: var(--accent-plasma);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff4444; /* Default offline */
    box-shadow: 0 0 10px #ff4444;
}

.status-dot.online {
    background-color: var(--accent-magnetic);
    box-shadow: 0 0 10px var(--accent-magnetic);
}

/* --- Views --- */
.view {
    display: none;
    padding: 2rem 5vw;
    flex: 1;
}

.view.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

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

/* --- Components --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.nova-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-primary), var(--accent-solar));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.snapshot-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.snapshot-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.snapshot-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.snapshot-badge {
    align-self: flex-start;
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
}

.badge-normal { color: var(--accent-magnetic); background: rgba(0, 255, 136, 0.1); }
.badge-elevated { color: #ffeb3b; background: rgba(255, 235, 59, 0.1); }
.badge-storm { color: #ff5252; background: rgba(255, 82, 82, 0.1); }

/* --- Buttons --- */
.nova-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-plasma {
    background: var(--accent-solar);
    color: white;
}

.btn-plasma:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 43, 0.4);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* --- Explorer & Lab --- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.accordion {
    margin-top: 1rem;
}

.accordion-item {
    border-bottom: 1px solid var(--glass-border);
}

.accordion-header {
    padding: 1rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-item.open .accordion-content {
    max-height: 200px;
}

/* --- Dashboard Specific --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.sidebar {
    position: sticky;
    top: 6rem;
    height: fit-content;
}

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

.chart-container {
    min-height: 350px;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.stats-table th, .stats-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; } /* Add hamburger logic later */
}
