*{box-sizing:border-box}
body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(circle at top left,#4f46e540,transparent 35%),
    radial-gradient(circle at bottom right,#22c55e22,transparent 32%),
    #070b10;
  color:#eef4ff;
  font-family:Inter,Arial,sans-serif;
  display:flex;
}
.sidebar{
  width:340px;
  background:#0d141fdd;
  border-right:1px solid #243144;
  padding:22px;
  min-height:100vh;
  position:sticky;
  top:0;
}
.brand{display:flex;align-items:center;gap:14px;margin-bottom:22px}
.logo{
  width:54px;height:54px;border-radius:18px;
  background:linear-gradient(135deg,#635bff,#22c55e);
  display:grid;place-items:center;font-size:30px;font-weight:1000;
  box-shadow:0 0 35px #635bff77;
}
.brand h1{margin:0;font-size:26px}
.brand p{margin:4px 0 0;color:#90a3bd}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}
.stats div,.create,.card,.hero{
  background:#0f1724cc;
  border:1px solid #26364d;
  box-shadow:0 20px 60px #0004;
}
.stats div{border-radius:18px;padding:14px}
.stats span{color:#8fa1b8;font-size:13px}
.stats strong{display:block;color:#22c55e;font-size:30px;margin-top:4px}
.create{border-radius:22px;padding:18px}
.create h2{margin:0 0 12px}
label{display:block;color:#9cafc8;font-size:13px;margin:12px 0 6px}
input,select{
  width:100%;
  background:#111b2a;
  border:1px solid #314159;
  border-radius:12px;
  color:#fff;
  padding:12px;
  outline:none;
}
.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}
button{
  border:0;
  cursor:pointer;
  color:#fff;
  background:#635bff;
  border-radius:12px;
  padding:12px 16px;
  font-weight:900;
}
button:hover{filter:brightness(1.12);transform:translateY(-1px)}
#createBtn{
  width:100%;
  margin-top:16px;
  background:linear-gradient(135deg,#635bff,#22c55e);
}
#status{min-height:20px;color:#facc15;font-size:13px}
main{flex:1;padding:26px;overflow:auto}
.hero{
  border-radius:28px;
  padding:28px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:
    linear-gradient(135deg,#111827,#0b1120 70%),
    #111827;
}
.eyebrow{color:#22c55e;font-weight:900;letter-spacing:.12em;font-size:12px}
.hero h2{font-size:42px;max-width:760px;margin:10px 0}
.hero p{color:#9eb0c8;font-size:17px;max-width:720px}
.section-title{display:flex;justify-content:space-between;align-items:end;margin:28px 0 14px}
.section-title h3{font-size:24px;margin:0}
.section-title p{margin:0;color:#8496ae}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
.card{
  border-radius:22px;
  padding:18px;
  position:relative;
  overflow:hidden;
}
.card:before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(circle at top right,#635bff33,transparent 45%);
  pointer-events:none;
}
.card>*{position:relative}
.card h4{margin:0 0 10px;color:#22c55e;font-size:20px}
.card p{color:#9fb0c7;line-height:1.5}
.badge{
  display:inline-block;
  background:#172235;
  border:1px solid #2a3950;
  color:#cbd5e1;
  padding:5px 8px;
  border-radius:99px;
  font-size:12px;
  margin:0 5px 5px 0;
}
.actions{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.actions a,.actions button{
  text-decoration:none;
  display:inline-block;
  padding:10px 13px;
  border-radius:12px;
  color:#fff;
  font-weight:900;
  font-size:14px;
}
.play{background:#635bff}
.detail{background:#243144}
.stop{background:#ef4444}
.start{background:#22c55e}
.empty{
  color:#8fa1b8;
  border:1px dashed #334155;
  border-radius:18px;
  padding:22px;
}
@media(max-width:900px){
  body{display:block}
  .sidebar{width:100%;min-height:auto;position:relative}
  .hero{display:block}
  .hero h2{font-size:30px}
  #refreshBtn{margin-top:14px}
}

.copy{background:#0ea5e9}
.delete{background:#991b1b}
.card h4{
  text-transform:uppercase;
}
.card .actions button.delete:hover{
  background:#dc2626;
}

.copy{background:#0ea5e9}
.logs{background:#9333ea}
.delete{background:#991b1b}
.card h4{text-transform:uppercase}

.room-card.ready{
  border-color:#22c55e88;
  box-shadow:0 0 45px #22c55e18;
}

.map-card:after{
  content:"";
  position:absolute;
  width:120px;
  height:120px;
  right:-32px;
  bottom:-32px;
  border-radius:50%;
  background:var(--accent);
  opacity:.18;
  filter:blur(4px);
}

.modal{
  position:fixed;
  inset:0;
  background:#0009;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:20px;
}

.modal.open{
  display:flex;
}

.modal-box{
  width:min(980px,96vw);
  max-height:86vh;
  background:#0f1724;
  border:1px solid #2b3a51;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 40px 120px #000b;
}

.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 18px;
  border-bottom:1px solid #2b3a51;
}

.modal-head h3{
  margin:0;
}

.modal-head button{
  background:#ef4444;
}

#logContent{
  margin:0;
  padding:18px;
  max-height:70vh;
  overflow:auto;
  background:#05070b;
  color:#d1fae5;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size:13px;
  line-height:1.45;
}
