:root{
  --bg:#071126;
  --card:#0f1724;
  --muted:#9aa7b6;
  --accent:#00e6a8;
  --danger:#ff5f6d;
  --glass: rgba(255,255,255,0.04);
}

*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial}
body{background:linear-gradient(180deg,var(--bg),#041023);color:#e6eef3}

.app{display:flex;flex-direction:column;min-height:100vh}
.topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid rgba(255,255,255,0.03);background:linear-gradient(180deg,rgba(255,255,255,0.02),transparent)}
.title{display:flex;gap:12px;align-items:center}
.title h1{margin:0;font-size:20px}
.title .subtitle{margin:0;color:var(--muted);font-size:13px}
.logo{font-size:28px}

.controls-top{display:flex;flex-direction:column;gap:10px}
.control-row{display:flex;gap:12px;align-items:center}
.control-row label{color:var(--muted);font-size:13px}
.control-row select,input{background:var(--glass);border:1px solid rgba(255,255,255,0.04);padding:6px;border-radius:8px;color:#e6eef3}
.control-row input[type="range"]{width:150px}

.buttons{display:flex;gap:8px;margin-top:6px}
.buttons button{background:linear-gradient(90deg,#0b1220,#142233);border:1px solid rgba(255,255,255,0.03);color:#fff;padding:8px 10px;border-radius:10px;cursor:pointer}

.game-area{display:flex;gap:18px;padding:20px;flex:1}
.sidebar{width:300px;display:flex;flex-direction:column;gap:12px}
.panel{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));padding:12px;border-radius:10px;border:1px solid rgba(255,255,255,0.03)}
.panel h3{margin:0 0 8px 0}
.stat{margin:6px 0;color:var(--muted)}
.panel.small{font-size:12px;color:var(--muted)}

.board-wrap{flex:1;display:flex;flex-direction:column;gap:12px}
.hud{display:flex;justify-content:space-between;align-items:center;color:var(--muted);padding:6px 8px}
.status{background:rgba(255,255,255,0.02);padding:6px 10px;border-radius:8px}

.svg-container{background:linear-gradient(180deg,rgba(255,255,255,0.01),transparent);border-radius:14px;padding:18px;flex:1;display:flex;align-items:center;justify-content:center;position:relative;overflow:hidden}

/* Node visuals */
.node {
  cursor:pointer;
  transition:transform .12s ease;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.6));
}
.node:hover{transform:scale(1.06)}

.node-circle {
  fill: #061424;
  stroke: rgba(255,255,255,0.06);
  stroke-width:2;
  transition: all 220ms ease;
}

/* states */
.node-healthy .node-circle { fill: linear-gradient(#0b2430,#08303b); box-shadow: 0 0 6px rgba(0,255,182,0.04);}
.node-infected .node-circle { fill: var(--danger); stroke: rgba(255,80,90,0.6); }
.node-quarantine .node-circle { fill: linear-gradient(#2d2f61,#1b2c47); stroke: #ffd166; }
.node-cleared .node-circle { fill: rgba(0,230,168,0.12); stroke: rgba(0,230,168,0.6); }

/* glow rings */
.glow {
  filter: blur(6px);
  opacity: .9;
}
.glow.infected { fill: rgba(255,90,100,0.18); transition: opacity .2s ease; }
.glow.quarantine { fill: rgba(255,200,80,0.12); }
.glow.cleared { fill: rgba(0,230,168,0.12); }

/* link styles */
.link-line { stroke: rgba(255,255,255,0.06); stroke-width:2; transition:stroke .15s ease; }
.link-infected { stroke: rgba(255,80,90,0.5); stroke-width:3; }
.link-quarantine { stroke: rgba(255,200,80,0.22); }

/* smaller screens responsiveness */
@media (max-width:1000px){
  .game-area{flex-direction:column}
  .sidebar{width:100%;order:2}
  .board-wrap{order:1}
}
