:root{
  --bg:#050207;
  --panel:#0c0a11;
  --panel2:#0b0810;
  --ink:#fff6d6;
  --muted:#d2b451;
  --gold:#ffcc00;
  --gold2:#ff8c00;
  --line:rgba(255,204,0,.22);
  --line2:rgba(255,255,255,.08);
  --danger:#ff4d7d;
  --ok:#7cff7a;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:
    radial-gradient(900px 650px at 14% 18%, rgba(255,204,0,.14), transparent 55%),
    radial-gradient(900px 650px at 92% 82%, rgba(255,140,0,.10), transparent 55%),
    linear-gradient(180deg, var(--bg), #020109);
}

a{color:inherit}
.wrap{
  width:min(1200px, calc(100vw - 32px));
  margin:0 auto;
  padding:22px 0 34px;
}

.top{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}
.back{
  text-decoration:none;
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,204,0,.06);
}
.back:hover{border-color:rgba(255,204,0,.35)}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1 1 auto;
  min-width:240px;
}
.brand h1{
  margin:0;
  font-size:20px;
  letter-spacing:.06em;
  text-transform:uppercase;
  text-shadow:0 0 14px rgba(255,204,0,.22);
}
.brand p{
  margin:3px 0 0;
  color:rgba(255,246,214,.70);
  font-size:13px;
}
.logo{
  width:48px;
  height:48px;
  flex:0 0 auto;
  filter: drop-shadow(0 0 14px rgba(255,204,0,.22));
}

.topActions{
  display:flex;
  gap:10px;
}

.layout{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap:14px;
}
@media (max-width: 980px){
  .layout{grid-template-columns:1fr}
}

.panel{
  border:1px solid var(--line2);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(12,10,17,.86), rgba(12,10,17,.62));
  box-shadow:0 24px 55px rgba(0,0,0,.45);
  overflow:hidden;
}

.sidebar{padding:14px}
.content{padding:14px}

.field{margin-bottom:14px}
.field label{
  display:block;
  font-size:12px;
  color:rgba(255,246,214,.70);
  margin-bottom:6px;
  letter-spacing:.06em;
  text-transform:uppercase;
}

input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:var(--ink);
  outline:none;
}
textarea{resize:vertical; min-height:64px}
input:focus, textarea:focus{
  border-color:rgba(255,204,0,.35);
  box-shadow:0 0 0 3px rgba(255,204,0,.10);
}

.row{display:flex; gap:10px}
.row > *{flex:1}
@media (max-width: 520px){
  .row{flex-direction:column}
}

.btn{
  appearance:none;
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(255,204,0,.30);
  background:linear-gradient(180deg, rgba(255,204,0,.14), rgba(255,140,0,.08));
  color:var(--ink);
  font-weight:650;
  letter-spacing:.02em;
  cursor:pointer;
  transition: transform .06s ease, border-color .12s ease, box-shadow .12s ease;
  box-shadow:0 0 18px rgba(255,204,0,.12);
}
.btn:hover{border-color:rgba(255,204,0,.45); box-shadow:0 0 28px rgba(255,204,0,.16)}
.btn:active{transform: translateY(1px)}
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}
.btn.secondary{
  border-color:rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  box-shadow:none;
}
.btn.secondary:hover{border-color:rgba(255,204,0,.26)}
.btn.danger{
  border-color:rgba(255,77,125,.38);
  background:rgba(255,77,125,.10);
  box-shadow:none;
}

.seg{
  display:flex;
  gap:8px;
}
.seg button{
  flex:1;
  appearance:none;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(255,246,214,.88);
  cursor:pointer;
}
.seg button.active{
  border-color:rgba(255,204,0,.40);
  background:rgba(255,204,0,.10);
  box-shadow:0 0 0 3px rgba(255,204,0,.08);
}

.hint{
  margin-top:8px;
  color:rgba(255,246,214,.55);
  font-size:12px;
  line-height:1.35;
}
.hint code{color:rgba(255,246,214,.8)}

.divider{
  height:1px;
  background:rgba(255,255,255,.08);
  margin:14px 0;
}

.list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:8px;
}
.wItem{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
  cursor:pointer;
}
.wItem:hover{border-color:rgba(255,204,0,.20)}
.wItem.active{
  border-color:rgba(255,204,0,.40);
  box-shadow:0 0 0 3px rgba(255,204,0,.08);
}
.wItem .name{font-weight:650}
.wItem .meta{color:rgba(255,246,214,.55); font-size:12px}

.msg{
  margin-top:10px;
  font-size:13px;
  color:rgba(255,246,214,.75);
}
.msg.error{color:rgba(255,77,125,.95)}
.msg.ok{color:rgba(124,255,122,.95)}

.hidden{display:none}

.empty{
  padding:18px;
  border:1px dashed rgba(255,255,255,.14);
  border-radius:18px;
  background:rgba(0,0,0,.16);
}
.empty h2{margin:0 0 8px; font-size:18px}
.empty p{margin:0; color:rgba(255,246,214,.65); line-height:1.45}
.steps{
  margin:0 0 12px;
  padding-left:18px;
  color:rgba(255,246,214,.65);
  line-height:1.55;
}
.steps li{margin:6px 0}

.contentHeader{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.contentHeader h2{margin:0; font-size:22px}
.sub{margin-top:4px; color:rgba(255,246,214,.65); font-size:13px}

.chips{display:flex; gap:8px; flex-wrap:wrap}
.chip{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.20);
  color:rgba(255,246,214,.86);
}
.chip strong{color:var(--gold)}

.grid2{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-bottom:12px;
}
@media (max-width: 980px){
  .grid2{grid-template-columns:1fr}
}

.card{
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(11,8,16,.75), rgba(11,8,16,.55));
  padding:14px;
}
.card h3{
  margin:0 0 10px;
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,246,214,.80);
}
.cardHead{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}

.stats3{
  display:grid;
  grid-template-columns: 1fr;
  gap:8px;
}
.stats3 > div{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
}
.stats3 .k{color:rgba(255,246,214,.70)}

.matches{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.mRow{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
}
.mRow:hover{border-color:rgba(255,204,0,.18)}
.mLeft{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.mTitle{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  font-weight:650;
}
.pill{
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}
.pill.win{border-color:rgba(124,255,122,.24); color:rgba(124,255,122,.95)}
.pill.loss{border-color:rgba(255,77,125,.28); color:rgba(255,77,125,.95)}
.mSub{
  color:rgba(255,246,214,.60);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.mActions{
  display:flex;
  gap:8px;
}
.iconBtn{
  appearance:none;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.04);
  color:rgba(255,246,214,.86);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
}
.iconBtn:hover{border-color:rgba(255,204,0,.22)}
.iconBtn.danger:hover{border-color:rgba(255,77,125,.35); color:rgba(255,77,125,.95)}

.leaderboard h2{
  margin:0 0 10px;
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,246,214,.80);
}
.lbList{display:flex; flex-direction:column; gap:8px}
.lbRow{
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.18);
}
.lbRow .left{min-width:0}
.lbRow .name{font-weight:650}
.lbRow .meta{color:rgba(255,246,214,.60); font-size:12px}
.lbRow .right{display:flex; gap:8px; align-items:center}
.tag{
  font-size:11px;
  padding:3px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
}

.momentum{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sparkDots{display:flex; gap:6px; flex-wrap:wrap}
.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
}
.dot.win{background:rgba(255,204,0,.85); border-color:rgba(255,204,0,.25)}
.dot.loss{background:rgba(255,77,125,.70); border-color:rgba(255,77,125,.25)}

.bar{
  height:12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  overflow:hidden;
}
.bar > div{
  height:100%;
  width:50%;
  background:linear-gradient(90deg, rgba(255,77,125,.55), rgba(255,204,0,.85));
}

body.modalOpen{overflow:hidden}
.modal{
  position:fixed;
  inset:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.modal.hidden{display:none}
.modalBackdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
}
.modalCard{
  position:relative;
  width:min(760px, calc(100vw - 24px));
  max-height:min(80vh, 680px);
  overflow:auto;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(12,10,17,.96), rgba(12,10,17,.86));
  box-shadow:0 28px 80px rgba(0,0,0,.55);
}
.modalHead{
  position:sticky;
  top:0;
  z-index:1;
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
  padding:14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:linear-gradient(180deg, rgba(12,10,17,.98), rgba(12,10,17,.92));
}
.modalHead h2{
  margin:0;
  font-size:16px;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.modalBody{padding:14px}
.modalBody h3{
  margin:16px 0 8px;
  font-size:13px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(255,246,214,.86);
}
