:root{
  --bg:#05060a;
  --panel:#0b0f17;
  --panel2:#0f172a;
  --text:#e6f1ff;
  --muted:#94a3b8;
  --border:#1f2937;
  --accent:#22c55e;
  --accent2:#16a34a;
  --accent3:#22d3ee;
  --accent4:#a78bfa;
  --danger:#ef4444;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background: radial-gradient(1200px 800px at 10% 0%, rgba(34,197,94,.12), transparent 60%),
              radial-gradient(900px 600px at 80% 20%, rgba(34,197,94,.10), transparent 55%),
              var(--bg);
  color:var(--text);
  font-family:var(--sans);
}

.muted{color:var(--muted)}
.topbar{
  position:sticky; top:0;
  z-index:10;
  display:flex;
  gap:16px;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  background: rgba(7,11,9,.85);
  backdrop-filter: blur(10px);
}
.brand{display:flex; gap:12px; align-items:center}
.logo{
  width:42px;height:42px;border-radius:12px;
  display:grid;place-items:center;
  background: linear-gradient(135deg, rgba(34,197,94,.30), rgba(34,197,94,.08));
  border:1px solid rgba(34,197,94,.35);
  font-weight:800;
  letter-spacing:.5px;
}
.titles .title{font-weight:800; line-height:1}
.titles .subtitle{font-size:12px;color:var(--muted); margin-top:4px}
.base{display:flex; gap:10px; align-items:end; flex-wrap:wrap; justify-content:flex-end}
.base label{font-size:12px; color:var(--muted); display:block; margin-bottom:6px}
.base input{
  width:min(520px, 74vw);
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(11,18,14,.8);
  color:var(--text);
  outline:none;
}
.base input:focus{border-color: rgba(34,197,94,.6); box-shadow: 0 0 0 3px rgba(34,197,94,.15)}

.layout{display:flex; height:calc(100% - 74px)}
.tabs{
  width:220px;
  padding:14px;
  border-right:1px solid var(--border);
}
.tab{
  width:100%;
  text-align:left;
  padding:12px 12px;
  margin:0 0 10px;
  border-radius:14px;
  border:1px solid transparent;
  background:transparent;
  color:var(--text);
  cursor:pointer;
}
.tab:hover{background: rgba(34,197,94,.06); border-color: rgba(34,197,94,.18)}
.tab.is-active{background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.28)}

.content{flex:1; padding:18px; overflow:auto}
.panel{display:none}
.panel.is-active{display:block}

h2{margin:0 0 12px}
.card{
  background: linear-gradient(180deg, rgba(11,18,14,.9), rgba(11,18,14,.7));
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
}
.card h3{margin:0 0 10px; font-size:14px}
.hint{color:var(--muted); font-size:12px; line-height:1.35}

/* --- Modifiers controls --- */
.chk{display:flex; align-items:center; gap:10px; margin:6px 0; color:var(--text)}
.mini{font-size:12px; color:var(--muted)}
.switch{position:relative; display:inline-block; width:44px; height:24px}
.switch input{opacity:0; width:0; height:0}
.switch .slider{position:absolute; cursor:pointer; top:0; left:0; right:0; bottom:0; background:#2a2f3b; transition:.2s; border-radius:999px; border:1px solid #333a4d}
.switch .slider:before{position:absolute; content:""; height:18px; width:18px; left:3px; bottom:2px; background:white; transition:.2s; border-radius:999px}
.switch input:checked + .slider{background:var(--accent)}
.switch input:checked + .slider:before{transform:translateX(19px)}
.grid2{display:grid; grid-template-columns:1fr 1fr; gap:14px}
@media (max-width: 960px){
  .layout{flex-direction:column}
  .tabs{width:auto; display:flex; gap:10px; overflow:auto; border-right:none; border-bottom:1px solid var(--border)}
  .tab{white-space:nowrap; width:auto; margin:0}
  .grid2{grid-template-columns:1fr}
}

.row{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin:10px 0}
.form{display:grid; grid-template-columns:repeat(4, 1fr); gap:10px; margin:10px 0}
@media (max-width: 960px){.form{grid-template-columns:repeat(2, 1fr)}}
label{font-size:12px; color:var(--muted); display:block; margin-bottom:6px}
input[type="text"], input[type="number"]{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(11,18,14,.8);
  color:var(--text);
  outline:none;
  font-family:var(--sans);
}
input[type="file"]{color:var(--muted)}

.btn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(34,197,94,.25);
  background: rgba(34,197,94,.10);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}
.btn:hover{background: rgba(34,197,94,.16)}
.btn.primary{background: rgba(34,197,94,.22); border-color: rgba(34,197,94,.45)}
.btn.danger{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10)}
.btn:disabled{opacity:.55; cursor:not-allowed}

.textarea{
  width:100%;
  min-height:140px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background:rgba(11,18,14,.8);
  color:var(--text);
  outline:none;
  font-family:var(--mono);
  font-size:12px;
}

.output{margin-top:14px}
.out,.log{
  margin:0;
  padding:12px;
  background: rgba(0,0,0,.35);
  border:1px solid var(--border);
  border-radius:18px;
  color: #c9ffe6;
  font-family:var(--mono);
  font-size:12px;
  overflow:auto;
  max-height:46vh;
}
.log{max-height:60vh}
code{font-family:var(--mono); font-size:12px; color:#b8f7d4}


.topbar{
  background: linear-gradient(180deg, rgba(34,211,238,0.10), rgba(34,197,94,0.06) 40%, rgba(0,0,0,0));
  backdrop-filter: blur(10px);
}

.logo{
  background: linear-gradient(135deg, var(--accent3), var(--accent));
  color: #041014;
  box-shadow: 0 10px 30px rgba(34,211,238,0.15), 0 10px 30px rgba(34,197,94,0.10);
}

.tab.is-active{
  border-color: rgba(34,211,238,0.35);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.15), 0 10px 25px rgba(34,211,238,0.06);
}

.btn.primary{
  background: linear-gradient(135deg, var(--accent3), var(--accent));
  border-color: rgba(34,211,238,0.35);
  color: #06131a;
}

.btn.primary:hover{ filter: brightness(1.05); }

.card{
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
}

.textarea{
  width: 100%;
  min-height: 180px;
  resize: vertical;
}


/* Features table */
.tableWrap{ overflow:auto; max-height: 420px; border:1px solid rgba(255,255,255,0.08); border-radius: 14px; }
.tbl{ width:100%; border-collapse: collapse; font-size: 12px; }
.tbl thead th{
  position: sticky; top: 0;
  background: rgba(10,12,18,0.92);
  backdrop-filter: blur(6px);
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  user-select:none;
}
.tbl tbody td{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}
.tbl tbody tr:hover{ background: rgba(255,255,255,0.04); }
.tbl .num{ font-variant-numeric: tabular-nums; }

/* Anchors rendering */
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border:1px solid rgba(255,255,255,0.12);
  border-radius:999px;
  font-size:12px;
  white-space:nowrap;
}
.chip.soft{ opacity: 0.85; }

.anchorList{ display:flex; flex-direction:column; gap:10px; }
.anchorRow{
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,0.02);
}
.anchorTop{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.anchorTeams{ font-weight:700; letter-spacing:0.3px; }
.anchorTags{ display:flex; gap:8px; flex-wrap:wrap; }
.anchorMeta{ margin-top: 8px; opacity:0.92; font-size: 13px; }
.anchorFine{ margin-top: 6px; opacity:0.85; font-size: 12px; }
.anchorFine code{ font-size: 12px; }

.empty{ opacity: 0.75; padding: 6px 0; }

@media (max-width: 780px){
  .anchorTop{ flex-direction:column; align-items:flex-start; }
}
