:root {
    --bg-color: #0d1117;
    --panel-bg: rgba(30, 35, 45, 0.6);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --accent-hover: #79c0ff;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --research-glow: 0 0 15px rgba(88, 166, 255, 0.4);
    --topo-color: #ff7b72; /* Subtle red for topological states */
}

body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at 50% 0%, #1f2937 0%, transparent 60%);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    gap: 20px;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.sidebar h1 {
    font-family: var(--font-heading);
    margin: 0 0 10px 0;
    font-size: 24px;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.4);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-muted);
}

select, input[type="range"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    color: var(--text-main);
    padding: 10px;
    border-radius: 8px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
}

select:focus {
    border-color: var(--accent);
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    padding: 0;
    height: 6px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 0 8px var(--accent);
}

.actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.primary {
    background: linear-gradient(45deg, #1f6feb, #58a6ff);
    color: white;
    box-shadow: 0 4px 15px rgba(31, 111, 235, 0.4);
}

.btn.primary:hover {
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.6);
    transform: translateY(-2px);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--panel-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    padding-right: 10px; /* Optional for scrollbar breathing room */
}

.canvas-container {
    flex: 1.5; /* Takes up more space */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    flex-shrink: 0;
}

#plot-area {
    width: 100%;
    height: 100%;
}

.info-panel {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-panel h2 {
    font-family: var(--font-heading);
    margin: 0;
    font-size: 18px;
    color: var(--accent);
}

.metrics {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.metric-box {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.metric-label {
    color: var(--text-muted);
    font-size: 14px;
}

.metric-value {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16px;
}

.metric-value.accent {
    color: var(--accent);
}

.theory-box {
    background: rgba(0,0,0,0.1);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    overflow-x: auto;
}

.research-badge {
    background: linear-gradient(90deg, #1f6feb, #b392f0);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    font-family: var(--font-heading);
    vertical-align: middle;
    box-shadow: 0 0 10px rgba(179, 146, 240, 0.4);
}

.accent {
    color: var(--accent);
    text-shadow: 0 0 8px rgba(88, 166, 255, 0.3);
}

.topo-highlight {
    color: var(--topo-color);
    font-weight: bold;
}

