@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;800&family=Rajdhani:wght@400;500;700&family=JetBrains+Mono:wght@400;600&display=swap');
*{margin:0;padding:0;box-sizing:border-box}
:root{--primary:#2a7fff;--accent:#00ffea;--bg:#050507}
body{font-family:'Rajdhani',sans-serif;background:var(--bg);color:#e0e0e0;height:100vh;overflow:hidden;display:flex;flex-direction:column}
.bg{position:fixed;inset:0;z-index:-3;background:radial-gradient(1200px 600px at 10% -10%, #1a2b6b88, transparent),radial-gradient(1000px 800px at 90% 120%, #ff00ff33, transparent),linear-gradient(180deg,#0a0a14 0%,#050507 100%)}
.grid{position:fixed;inset:0;z-index:-2;background-image:linear-gradient(rgba(42,127,255,0.06) 1px, transparent 1px),linear-gradient(90deg, rgba(42,127,255,0.06) 1px, transparent 1px);background-size:50px 50px}
#particles{position:fixed;inset:0;z-index:-1;pointer-events:none}
header{height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 24px;border-bottom:1px solid #2a7fff33;background:rgba(8,8,16,0.92);backdrop-filter:blur(16px);z-index:10}
.logo{font-family:'Orbitron';font-weight:800;letter-spacing:3px;font-size:18px;display:flex;align-items:center;gap:12px}
.logo-icon{width:34px;height:34px;background:linear-gradient(135deg,var(--primary),var(--accent));border-radius:8px;display:grid;place-items:center;box-shadow:0 0 20px var(--primary)}
.logo b{color:#fff}.logo span{color:var(--accent);font-weight:400}
.header-actions{display:flex;align-items:center;gap:12px}
.icon-btn{width:40px;height:40px;border-radius:10px;background:rgba(255,255,255,0.06);border:1px solid #ffffff14;color:#ffffff99;display:grid;place-items:center;cursor:pointer;transition:0.2s;font-size:18px}
.icon-btn:hover{background:rgba(42,127,255,0.15);border-color:var(--primary);color:white}
#model{font-family:'Rajdhani';font-weight:600;background:rgba(42,127,255,0.12);border:1px solid #2a7fff55;color:#8ec2ff;padding:9px 16px;border-radius:24px;outline:none;cursor:pointer;min-width:170px;font-size:14px;letter-spacing:0.5px}

.main{flex:1;display:flex;overflow:hidden;max-width:1600px;margin:0 auto;width:100%}
.sidebar{width:300px;min-width:300px;border-right:1px solid #ffffff0e;background:linear-gradient(180deg,rgba(0,0,0,0.5),rgba(0,0,0,0.15));backdrop-filter:blur(12px);padding:20px;display:flex;flex-direction:column;gap:16px;overflow-y:auto}
.sidebar h3{font-family:'Orbitron';font-size:10px;letter-spacing:2.5px;color:#ffffff50;margin-top:12px;display:flex;align-items:center;gap:8px}
.sidebar h3::before{content:'';width:18px;height:1px;background:linear-gradient(90deg,var(--primary),transparent)}

/* FIXED CARD - THIS WAS THE BUG */
.stat-card{position:relative;background:linear-gradient(135deg, rgba(42,127,255,0.1), rgba(0,0,0,0.3));border:1px solid #ffffff12;border-radius:14px;padding:14px 16px;transition:0.3s}
.stat-card:hover{border-color:#2a7fff55}
.stat-card .lab{display:block;font-family:'Orbitron';font-size:9px;letter-spacing:1.8px;color:#ffffff55;margin-bottom:8px;text-transform:uppercase}
.stat-card .val{display:block;font-family:'Rajdhani';font-size:16px;font-weight:700;color:var(--accent);line-height:1.3;word-break:break-word;letter-spacing:0.3px}
.stat-card .sub{display:block;font-family:'Rajdhani';font-size:12px;color:#ffffff75;margin-top:6px;line-height:1.4;font-weight:400}

.action-btn{width:100%;padding:12px 14px;background:rgba(255,255,255,0.04);border:1px solid #ffffff10;border-radius:11px;color:#ffffff99;font-family:'Rajdhani';font-size:13px;font-weight:600;cursor:pointer;transition:0.2s;text-align:left;display:flex;align-items:center;gap:10px}
.action-btn:hover{background:rgba(42,127,255,0.12);border-color:#2a7fff55;color:white;transform:translateX(3px)}

#chat{flex:1;overflow-y:auto;padding:28px;display:flex;flex-direction:column;gap:22px}
.msg{max-width:70%;padding:14px 18px;border-radius:18px;line-height:1.65;position:relative;font-size:14.5px;word-wrap:break-word}
.msg.user{align-self:flex-end;background:linear-gradient(135deg,#2a7fff,#6a5cff);color:white;border-bottom-right-radius:6px}
.msg.bot{align-self:flex-start;background:rgba(255,255,255,0.06);border:1px solid #ffffff14;backdrop-filter:blur(12px);border-bottom-left-radius:6px;white-space:pre-wrap;padding-top:22px;margin-top:12px}
.msg.bot::before{content:'NEXUS CORE';position:absolute;top:-10px;left:14px;font-family:'Orbitron';font-size:7.5px;letter-spacing:2px;color:var(--accent);background:#0e1726;border:1px solid rgba(0,255,234,0.25);padding:4px 9px;border-radius:20px}

.input-wrap{padding:16px 22px;border-top:1px solid #ffffff0f;background:rgba(5,5,7,0.95);backdrop-filter:blur(20px)}
.input-bar{max-width:900px;margin:0 auto;display:flex;align-items:center;gap:10px;background:rgba(255,255,255,0.06);border:1px solid #2a7fff33;border-radius:32px;padding:6px 6px 6px 20px;transition:0.3s}
.input-bar:focus-within{border-color:var(--primary);box-shadow:0 0 0 4px rgba(42,127,255,0.12)}
#msg{flex:1;background:transparent;border:none;color:white;font-family:'Rajdhani';font-size:15px;outline:none}
#send{width:44px;height:44px;min-width:44px;border-radius:50%;border:none;background:linear-gradient(135deg,var(--primary),var(--accent));cursor:pointer;display:grid;place-items:center;transition:0.25s}
#send:hover{transform:scale(1.07)}

/* SPECS */
#specsOverlay{position:fixed;inset:0;background:rgba(0,0,0,0.7);backdrop-filter:blur(8px);z-index:100;display:none}
#specsOverlay.open{display:block}
#specsPanel{position:fixed;top:0;right:0;width:420px;max-width:90vw;height:100vh;background:linear-gradient(180deg,#0f1220,#080a12);border-left:1px solid #2a7fff44;z-index:101;transform:translateX(100%);transition:0.4s cubic-bezier(0.2,0.8,0.2,1);display:flex;flex-direction:column}
#specsPanel.open{transform:translateX(0)}
.specs-head{padding:22px 24px;border-bottom:1px solid #ffffff0e;display:flex;justify-content:space-between;align-items:center}
.specs-head h2{font-family:'Orbitron';font-size:14px;letter-spacing:2px}
.specs-body{padding:20px 24px;overflow-y:auto;display:flex;flex-direction:column;gap:16px}
.spec-group{background:rgba(255,255,255,0.04);border:1px solid #ffffff0e;border-radius:12px;padding:16px}
.spec-group h4{font-family:'Orbitron';font-size:10px;letter-spacing:1.5px;color:var(--accent);margin-bottom:12px}
.spec-row{display:flex;justify-content:space-between;padding:8px 0;border-bottom:1px solid #ffffff08;font-size:13px}
.spec-row:last-child{border:none}
.spec-row span:first-child{color:#ffffff66}.spec-row span:last-child{color:white;font-weight:600;font-family:'JetBrains Mono';font-size:12px}
@media(max-width:900px){.sidebar{display:none}.msg{max-width:88%}}
