:root{
  --bg:#071222;
  --panel:#0a162b;
  --card:#0c1c35;
  --line:rgba(255,255,255,.08);
  --text:#eaf2ff;
  --muted:rgba(234,242,255,.7);
  --btn:#102647;
  --btn2:#0e223f;
  --accent:#4aa3ff;
  --danger:#ff5a6a;
  --ok:#4dffb3;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}

*{box-sizing:border-box;}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial;
  background: radial-gradient(1200px 600px at 50% 120%, rgba(74,163,255,.18), transparent 60%),
              radial-gradient(800px 500px at 10% 20%, rgba(255,90,106,.12), transparent 55%),
              var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky; top:0;
  z-index:5;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  border-bottom:1px solid var(--line);
  background: rgba(7,18,34,.85);
  backdrop-filter: blur(10px);
}

.brand{display:flex; gap:12px; align-items:center;}
.logo{font-size:22px;}
.title{font-weight:800; letter-spacing:.5px;}
.subtitle{font-size:12px; color:var(--muted); margin-top:2px;}

.roomBox{display:flex; gap:8px; flex-wrap:wrap;}
.pill{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  font-size:12px;
  color:var(--muted);
}

.container{
  display:flex;
  gap:14px;
  padding:14px;
  align-items:flex-start;
}

.panel{
  width:320px;
  background: rgba(10,22,43,.72);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  box-shadow: var(--shadow);
}

.panel.wide{
  flex:1;
  min-width:520px;
}

h2{
  margin:0 0 12px 0;
  font-size:16px;
  letter-spacing:.3px;
}

.divider{
  height:1px;
  background:var(--line);
  margin:14px 0;
}

.formRow{margin:10px 0;}
label{display:block; font-size:12px; color:var(--muted); margin-bottom:6px;}
input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  outline:none;
}
input:focus{border-color: rgba(74,163,255,.5);}

.btnRow{display:flex; gap:10px; margin-top:10px;}

.btn{
  appearance:none;
  border:1px solid var(--line);
  background: linear-gradient(180deg, rgba(16,38,71,.9), rgba(14,34,63,.9));
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-size:13px;
  transition: transform .06s ease, border-color .15s ease, opacity .15s ease;
}
.btn:hover{border-color: rgba(74,163,255,.35);}
.btn:active{transform: translateY(1px);}
.btn.primary{
  border-color: rgba(74,163,255,.45);
  box-shadow: 0 0 0 3px rgba(74,163,255,.12);
}
.btn.danger{
  border-color: rgba(255,90,106,.45);
  box-shadow: 0 0 0 3px rgba(255,90,106,.10);
}
.btn:disabled{
  opacity:.45;
  cursor:not-allowed;
}
.btn.selected{
  border-color: rgba(77,255,179,.55);
  box-shadow: 0 0 0 3px rgba(77,255,179,.12);
  position:relative;
}
.btn.selected::after{
  content:"已选择";
  position:absolute;
  right:10px;
  top:-9px;
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  background: rgba(77,255,179,.14);
  border:1px solid rgba(77,255,179,.25);
  color: rgba(234,242,255,.92);
}

.playerList{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.playerItem{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
}
.playerItem .name{font-weight:650;}
.tag{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--muted);
}

.grid2{display:grid; grid-template-columns: 1fr 1fr; gap:12px;}
.card{
  background: rgba(12,28,53,.72);
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow: var(--shadow);
}
.cardTitle{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  font-weight:700;
}
.cardBody{padding:12px 14px;}
.big{font-size:22px; font-weight:900;}
.small{font-size:12px; color:var(--muted); line-height:1.6;}

.stats{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:10px;
}
.statLabel{font-size:12px; color:var(--muted); margin-bottom:6px;}
.bar{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.06);
}
.barFill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(74,163,255,.9), rgba(74,163,255,.25));
}

.actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}
.actionSet{display:flex; flex-wrap:wrap; gap:10px;}

.localsGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
.localCard{
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.03);
  padding:12px;
}
.localHeader{display:flex; justify-content:space-between; align-items:center; margin-bottom:10px;}
.localName{font-weight:850;}
.localMeta{font-size:12px; color:var(--muted);}

.hint{
  font-size:12px;
  color:var(--muted);
  line-height:1.7;
}

.events{
  height:460px;
  overflow-y:auto;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  background: rgba(255,255,255,.03);
}
.events::-webkit-scrollbar{width:10px;}
.events::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.10);
  border-radius:999px;
  border:2px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
.eventRound{
  padding:10px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background: rgba(255,255,255,.03);
  margin-bottom:10px;
}
.eventTitle{font-weight:900; margin-bottom:6px;}
.eventLine{font-size:12px; color:var(--muted); line-height:1.6; margin:2px 0;}

.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.6);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:30;
}
.modal.hidden{display:none;}
.modalInner{
  width:min(860px, 94vw);
  background: rgba(10,22,43,.95);
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  box-shadow: var(--shadow);
  padding:16px;
}
.modalScroll{max-height: 86vh; overflow:auto;}
.modalBig{font-size:22px; font-weight:950;}
.modalSmall{font-size:12px; color:var(--muted);}
.modalContent{margin-top:12px;}
.modalSection{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  margin:10px 0;
  background: rgba(255,255,255,.03);
}
.modalSection h3{
  margin:0 0 8px 0;
  font-size:14px;
}
.modalSection .li{
  font-size:12px;
  color:var(--muted);
  line-height:1.7;
  margin:3px 0;
}
.modalBtns{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:12px;
}

.toast{
  position:fixed;
  left:50%;
  bottom:26px;
  transform: translateX(-50%);
  background: rgba(12,28,53,.95);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  padding:10px 14px;
  box-shadow: var(--shadow);
  color: rgba(234,242,255,.92);
  font-size:13px;
  z-index:60;
}
.toast.hidden{display:none;}