:root {
    --bg-dark: #050505;
    --panel-bg: #111111;
    --border-color: #333;
    
    /* Neon Palette */
    --neon-blue: #00f3ff;   /* Traffic */
    --neon-pink: #ff00ff;   /* Latency */
    --neon-purple: #bf00ff; /* CPU */
    --neon-yellow: #ffee00; /* RAM */
    
    --neon-green: #0aff0a;
    --neon-orange: #ffaa00;
    --neon-red: #ff0033;
    
    --text-main: #ffffff;
    --text-muted: #888;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 243, 255, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(191, 0, 255, 0.05) 0%, transparent 20%);
}

/* --- Header --- */
header {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0px;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -1px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(191, 0, 255, 0.3);
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--neon-green);
    padding: 6px 12px;
    border-radius: 100px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--neon-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* --- TABS --- */
.nav-tabs {
    width: 100%;
    max-width: 1200px;
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #222;
}

.nav-tab {
    padding: 15px 5px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.nav-tab:hover { color: #fff; }
.nav-tab.active { 
    color: var(--neon-blue); 
    border-bottom-color: var(--neon-blue);
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
}

.tab-content { display: none; width: 100%; max-width: 1200px; animation: fadeIn 0.4s ease-in-out; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- Grid & Panels --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    width: 100%;
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.panel-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
}

/* --- Sliders --- */
.input-group { margin-bottom: 30px; position: relative; }
.input-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.metric-value { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; font-weight: 700; color: var(--text-main); }
.metric-unit { font-size: 0.8rem; color: var(--text-muted); margin-left: 5px; }

input[type=range] {
    width: 100%; height: 6px; background: #333; border-radius: 3px; outline: none; -webkit-appearance: none; cursor: pointer; z-index: 10;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--text-main); box-shadow: 0 0 10px rgba(255,255,255,0.5); border: 2px solid var(--bg-dark); margin-top: -6px; transition: transform 0.1s;
}

canvas.fuzzy-graph { width: 100%; height: 60px; margin-top: 10px; background: rgba(0,0,0,0.2); border-radius: 4px; border-bottom: 1px solid #333; }

/* --- Outputs --- */
.output-display { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100%; text-align: center; }

.decision-circle {
    width: 180px; height: 180px; border-radius: 50%; border: 2px solid #333;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin-bottom: 25px; position: relative;
    background: radial-gradient(circle, #1a1a1a 0%, #000 70%);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transition: border-color 0.5s, box-shadow 0.5s;
}
.decision-val { font-size: 2rem; font-weight: 800; margin: 5px 0; background: linear-gradient(180deg, #fff, #aaa); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.glow-ring { position: absolute; top: -10px; left: -10px; right: -10px; bottom: -10px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--neon-blue); animation: spin 3s linear infinite; opacity: 0.3; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* --- Matrix Table --- */
.matrix-table-container { width: 100%; overflow-x: auto; border: 1px solid #333; border-radius: 8px; max-height: 600px; overflow-y: auto; }
.matrix-table { width: 100%; border-collapse: collapse; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #ddd; text-align: left; }
.matrix-table thead { background: #1a1a1a; position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 10px #000; }
.matrix-table th { padding: 15px; color: var(--neon-blue); border-bottom: 2px solid #333; font-weight: 700; background: #1a1a1a; }
.matrix-table td { padding: 10px 15px; border-bottom: 1px solid #222; }
.matrix-table tr:hover { background: rgba(255, 255, 255, 0.03); }

.tag { padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: 600; background: #222; color: #888; display: inline-block; min-width: 50px; text-align: center; }
.tag-low { color: var(--neon-blue); background: rgba(0, 243, 255, 0.1); border: 1px solid rgba(0, 243, 255, 0.2); }
.tag-med { color: #fff; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); }
.tag-high { color: var(--neon-purple); background: rgba(191, 0, 255, 0.1); border: 1px solid rgba(191, 0, 255, 0.2); }
.tag-slow { color: var(--neon-pink); background: rgba(255, 0, 255, 0.1); border: 1px solid rgba(255, 0, 255, 0.2); }
.tag-fast { color: var(--neon-green); background: rgba(10, 255, 10, 0.1); border: 1px solid rgba(10, 255, 10, 0.2); }

.res-down { color: var(--neon-blue); }
.res-hold { color: var(--neon-green); }
.res-up { color: var(--neon-orange); }
.res-emerg { color: var(--neon-red); font-weight: 800; }

.console { background: #000; border: 1px solid #333; border-radius: 8px; padding: 15px; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: #ccc; height: 150px; overflow-y: auto; margin-top: 30px; }
.log-entry { margin-bottom: 5px; display: flex; gap: 10px; }
.timestamp { color: var(--text-muted); }
.log-info { color: var(--neon-blue); }
.log-warn { color: var(--neon-orange); }
.log-crit { color: var(--neon-red); }
.log-success { color: var(--neon-green); }

.sim-btn { background: transparent; border: 1px solid var(--neon-pink); color: var(--neon-pink); padding: 8px 16px; border-radius: 4px; cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; transition: all 0.2s; }
.sim-btn:hover { background: var(--neon-pink); color: #000; box-shadow: 0 0 15px var(--neon-pink); }

.active-row { background: rgba(0, 243, 255, 0.15) !important; border-left: 3px solid var(--neon-blue); }

/* --- Business Plan Styles --- */
.biz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.biz-card { background: #1a1a1a; border-radius: 8px; padding: 20px; border: 1px solid #333; display: flex; flex-direction: column; height: 100%; }
.biz-header { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 15px; }
.biz-icon { font-size: 1.5rem; }
.biz-title { font-size: 1.1rem; font-weight: 700; color: #fff; }
.biz-stat { font-size: 1.8rem; font-weight: 800; color: var(--neon-blue); margin: 10px 0; }
.biz-text { font-size: 0.85rem; color: #aaa; line-height: 1.5; }
.rev-model { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 10px; background: #111; border-radius: 6px; border: 1px solid #222; }
.rev-price { font-family: 'JetBrains Mono'; color: var(--neon-green); font-weight: bold; }

.swot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.swot-item { padding: 15px; border-radius: 6px; font-size: 0.8rem; }
.swot-s { background: rgba(10, 255, 10, 0.1); border: 1px solid rgba(10, 255, 10, 0.3); color: #cfc; }
.swot-w { background: rgba(255, 170, 0, 0.1); border: 1px solid rgba(255, 170, 0, 0.3); color: #fcc; }
.swot-o { background: rgba(0, 243, 255, 0.1); border: 1px solid rgba(0, 243, 255, 0.3); color: #cff; }
.swot-t { background: rgba(255, 0, 51, 0.1); border: 1px solid rgba(255, 0, 51, 0.3); color: #fcc; }

.roadmap-steps { display: flex; justify-content: space-between; margin-top: 20px; position: relative; }
.roadmap-steps::before { content: ''; position: absolute; top: 15px; left: 0; right: 0; height: 2px; background: #333; z-index: 0; }
.step { position: relative; z-index: 1; text-align: center; flex: 1; }
.step-num { width: 30px; height: 30px; background: #000; border: 2px solid var(--neon-purple); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; color: #fff; font-weight: bold; }
.step-title { font-size: 0.9rem; font-weight: bold; color: #fff; display: block; }
.step-desc { font-size: 0.75rem; color: #888; margin-top: 5px; display: block; padding: 0 10px; }

@media (max-width: 800px) { .dashboard-grid { grid-template-columns: 1fr; } .biz-grid { grid-template-columns: 1fr; } }
