@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Oswald:wght@500;600&display=swap');

:root {
    --bg-base: #0f172a;      /* Slate 900 */
    --panel-bg: #1e293b;     /* Slate 800 */
    --panel-border: #334155; /* Slate 700 */
    
    --color-primary: #38bdf8; /* Sky 400 */
    --color-success: #22c55e; /* Emerald 500 */
    --color-warning: #f59e0b; /* Amber 500 */
    --color-danger:  #ef4444; /* Red 500 */
    --color-burst:   #8b5cf6; /* Purple 500 */
    
    --text-main: #f8fafc;    /* Slate 50 */
    --text-muted: #94a3b8;   /* Slate 400 */
    
    --shadow-panel: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-base);
    color: var(--text-main);
    margin: 0;
    padding: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Oswald', sans-serif;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.title-glow {
    color: var(--text-main);
    font-size: 2rem;
    margin-bottom: 20px;
    text-align: center;
}

/* --- Tablet Panels (Pseudo-3D / Glass) --- */
.hud-panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-panel);
    transition: transform 0.2s ease;
}

.hud-panel.alert {
    border-color: var(--color-danger);
    box-shadow: 0 0 0 1px var(--color-danger), var(--shadow-panel);
}

/* --- Grids --- */
.roster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.roster-card {
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: pointer;
    background: linear-gradient(145deg, #1e293b, #0f172a);
}

.roster-card:active { transform: scale(0.98); }

.roster-card h3 {
    color: var(--text-main);
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.middle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* --- Gauges & Bars --- */
.resource-row { margin-bottom: 12px; }
.resource-labels {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.gauge-bg {
    background: #0f172a;
    width: 100%;
    height: 16px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
    display: flex;
}
.gauge-bar {
    height: 100%;
    background: var(--color-primary);
    transition: width 0.3s ease-out, background-color 0.3s;
}
.gauge-bar.success { background: var(--color-success); }
.gauge-bar.warning { background: var(--color-warning); }
.gauge-bar.critical { background: var(--color-danger); }

/* --- Badges & Status --- */
.status-badge {
    padding: 6px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    border: 1px solid var(--panel-border);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-success);
}
.status-indicator.warning { background: var(--color-warning); }
.status-indicator.critical { background: var(--color-danger); }

/* --- Terminal / Events --- */
.terminal-container {
    background: #0f172a;
    border-radius: 8px;
    padding: 12px;
    height: 250px;
    overflow-y: auto;
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    color: var(--text-main);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}
.terminal-entry {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--panel-border);
}
.terminal-time { color: var(--text-muted); font-weight: 600; }
.terminal-cost { color: var(--color-burst); font-weight: bold; }

/* --- AI Content --- */
.ai-content ul { padding-left: 0; list-style: none; }
.ai-content li {
    background: rgba(255,255,255,0.03);
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid var(--color-primary);
    font-size: 0.95rem;
}
.ai-content li.danger { border-left-color: var(--color-danger); }
.ai-content li.burst { border-left-color: var(--color-burst); }

/* --- Silhouette --- */
.silhouette-panel {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 350px;
}
.body-silhouette {
    height: 100%;
    opacity: 0.15;
}
.sensor-node {
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--color-primary);
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: all 0.3s;
}
.sensor-node.overdrive {
    background: var(--color-burst);
    transform: scale(1.3);
}
.sensor-label {
    position: absolute;
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--text-main);
    width: max-content;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    z-index: 10;
}
.sensor-label span { color: var(--color-primary); font-weight: 700; }
.sensor-label small { display: block; color: var(--text-muted); margin-top: 2px;}

.btn-sci-fi {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    text-transform: uppercase;
}
.btn-sci-fi:active { transform: translateY(2px); box-shadow: none; }
