:root{
  --bg:#0b0f17;
  --panel:#111827;
  --panel2:#0f172a;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --accent:#60a5fa;
  --accent2:#34d399;
  --warn:#fbbf24;
  --danger:#fb7185;
  --ok:#22c55e;
  --border:rgba(255,255,255,0.07);
  --shadow: 0 12px 50px rgba(0,0,0,0.4);
  --radius: 18px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:var(--sans);
  background: radial-gradient(1200px 900px at 15% 10%, rgba(96,165,250,0.16), transparent 60%),
              radial-gradient(1200px 900px at 90% 40%, rgba(52,211,153,0.12), transparent 55%),
              var(--bg);
  color:var(--text);
  min-height:100vh;
}

header{
  padding:18px 18px;
  border-bottom:1px solid var(--border);
  background:rgba(17,24,39,0.6);
  backdrop-filter: blur(8px);
  position:sticky;
  top:0;
  z-index:10;
}

.wrap{ max-width:1200px; margin:0 auto; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
}

h1{
  margin:0;
  font-size:16px;
  letter-spacing:0.2px;
  font-weight:800;
}

.subtitle{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
  line-height:1.3;
}

.tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.tab{
  cursor:pointer;
  padding:9px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(2,6,23,0.35);
  color: var(--muted);
  font-weight:800;
  font-size:12px;
  user-select:none;
  transition:.15s;
}

.tab:hover{ filter:brightness(1.08); transform: translateY(-1px); }

.tab.active{
  color: #0b1220;
  border-color: rgba(96,165,250,0.35);
  background: linear-gradient(180deg, rgba(96,165,250,1), rgba(59,130,246,1));
}

main{ padding:20px 18px 80px; }

.card{
  background: linear-gradient(180deg, rgba(17,24,39,0.95), rgba(15,23,42,0.95));
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
  overflow:hidden;
  margin-bottom:16px;
}

.card h2{
  margin:0;
  font-size:13px;
  font-weight:900;
  letter-spacing:0.2px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.hint{
  margin-top:8px;
  font-size:12px;
  color:var(--muted);
  line-height:1.4;
}

textarea, input, select{
  width:100%;
  background: rgba(2,6,23,0.55);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  color:var(--text);
  font-size:13px;
  outline:none;
  transition:0.15s;
  font-family:var(--sans);
}

textarea{
  min-height:160px;
  resize:vertical;
  font-family:var(--mono);
  line-height:1.35;
  font-size:12px;
  margin-top:12px;
}

textarea:focus, input:focus{
  border-color: rgba(96,165,250,0.5);
  box-shadow:0 0 0 4px rgba(96,165,250,0.12);
}

button{
  border:none;
  cursor:pointer;
  border-radius:12px;
  padding:10px 14px;
  font-weight:900;
  font-size:12px;
  transition:0.15s;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#0b1220;
  background: linear-gradient(180deg, rgba(96,165,250,1), rgba(59,130,246,1));
}

button:hover{ transform: translateY(-1px); filter:brightness(1.05); }
button:active{ transform: translateY(0px); filter:brightness(0.98); }

.btn2{
  background: linear-gradient(180deg, rgba(52,211,153,1), rgba(16,185,129,1));
}

.btnDanger{
  background: linear-gradient(180deg, rgba(251,113,133,1), rgba(244,63,94,1));
}

.btnGhost{
  background: rgba(15,23,42,0.8);
  border:1px solid var(--border);
  color:var(--text);
}

.row{
  display:flex;
  gap:10px;
  margin-top:12px;
  flex-wrap:wrap;
  align-items:center;
}

.mono{ font-family:var(--mono); }

.tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:11px;
  color:var(--muted);
  background: rgba(2,6,23,0.4);
  user-select:none;
  font-weight:900;
}

.tag.green{ color:rgba(34,197,94,0.95); border-color: rgba(34,197,94,0.25); }
.tag.red{ color:rgba(251,113,133,0.95); border-color: rgba(251,113,133,0.25); }
.tag.yellow{ color:rgba(251,191,36,0.95); border-color: rgba(251,191,36,0.25); }
.tag.blue{ color:rgba(96,165,250,0.95); border-color: rgba(96,165,250,0.25); }

.divider{
  height:1px;
  background: var(--border);
  margin: 14px 0;
}

.listBox{
  margin-top:12px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(2,6,23,0.35);
  overflow:hidden;
}

.item{
  padding:12px 12px;
  border-bottom:1px solid var(--border);
  cursor:pointer;
  transition:.12s;
}
.item:hover{ background: rgba(255,255,255,0.03); }
.item:last-child{ border-bottom:none; }

.inline{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap;
}

.small{
  font-size:11px;
  color:var(--muted);
  line-height:1.4;
}

.table{
  width:100%;
  border-collapse: collapse;
  margin-top:12px;
  font-size:12px;
}
.table th, .table td{
  border-bottom:1px solid var(--border);
  padding:10px 8px;
  text-align:left;
  vertical-align:top;
}
.table th{
  font-size:11px;
  color:var(--muted);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:0.08em;
}
.right{ text-align:right; }

.collapse{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(2,6,23,0.35);
  display:none;
}

.legend{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}

.toast{
  position: fixed;
  bottom: 20px;
  right: 20px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: rgba(17,24,39,0.95);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  display:none;
  z-index:999;
}
.toast strong{
  display:block;
  margin-bottom:6px;
  font-size:12px;
}

.clickSource, .clickPlayer, .clickOwner{
  cursor:pointer;
  color: rgba(96,165,250,0.95);
  text-decoration: underline;
  font-weight:900;
}
.clickSource:hover, .clickPlayer:hover, .clickOwner:hover{
  filter: brightness(1.2);
}

.hidden{ display:none !important; }
