:root{
  --text:#e7e0d6;
  --muted:#b8ad9b;
  --accent:#ff5a2f;
  --accent2:#ffb35a;
  --edge: rgba(255,179,90,.25);
  --green:#49d37a;
  --red:#ff5b5b;
}
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: "Georgia","Times New Roman",serif;
  color: var(--text);
  background: #000 url("/assets/bg.png") center/cover no-repeat fixed;
}
.wrap{ max-width:1100px; margin:0 auto; padding:18px 22px 80px; }
.top{ display:flex; gap:16px; align-items:center; justify-content:space-between; margin-bottom:14px; }
.brand h1{ margin:0; font-size:26px; letter-spacing:.6px; color: var(--accent2); text-shadow: 0 2px 0 rgba(0,0,0,.75); }
h2{ margin:0 0 10px; color: var(--accent2); text-shadow: 0 2px 0 rgba(0,0,0,.6); }

.card{
  background: rgba(0,0,0,.62);
  border:1px solid var(--edge);
  border-radius:14px;
  padding:14px;
  box-shadow: 0 18px 55px rgba(0,0,0,.65);
  margin-bottom:14px;
}
.card.compact{ padding:12px; margin-bottom:10px; }
.grid{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
@media (max-width: 1000px){ .grid{ grid-template-columns: 1fr; } .top{ flex-direction:column; align-items:flex-start; } }
.row{ display:flex; gap:10px; align-items:center; margin:10px 0; flex-wrap:wrap; }
.btn{
  background: rgba(20,14,12,.75);
  border:1px solid rgba(255,179,90,.35);
  color: var(--text);
  padding:9px 12px;
  border-radius:12px;
  cursor:pointer;
  transition: transform .05s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover{ border-color: rgba(255,179,90,.75); background: rgba(25,18,15,.85); }
.btn:active{ transform: translateY(1px); }
.btn.primary{ border-color: rgba(255,90,47,.85); background: rgba(255,90,47,.16); }
.btn.small{ padding:6px 10px; border-radius:10px; font-size:12px; }
.btn.selectBtn.selected{ border-color: rgba(255,179,90,.95); box-shadow: 0 0 0 2px rgba(255,179,90,.18); }
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

input{
  background: rgba(10,7,8,.72);
  border:1px solid rgba(255,179,90,.25);
  color: var(--text);
  padding:9px 11px;
  border-radius:12px;
  outline:none;
  min-width:220px;
}
label{ color:var(--muted); font-size:13px; }
.tiny{ color:var(--muted); font-size:12px; }
.hint{ color:var(--muted); margin:6px 0 12px; }
.pill{
  display:inline-block;
  border:1px solid rgba(255,179,90,.35);
  color: var(--accent2);
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  background: rgba(0,0,0,.35);
}
.list .item{
  border:1px solid rgba(255,179,90,.20);
  background: rgba(0,0,0,.55);
  border-radius:14px;
  padding:12px;
  margin:10px 0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.item .meta{ color:var(--muted); font-size:12px; margin-top:3px; }
.item .title{ font-weight:900; color: var(--text); }
.hidden{ display:none; }
.me{ text-align:right; color:var(--muted); font-size:13px; }
.me strong{ color: var(--text); }
.big{ font-size:18px; font-weight:900; color: var(--text); }

/* Popup match panel */
.panel{
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100vw; height: 65vh;
  background: rgba(0,0,0,.82);
  border-top: 1px solid rgba(255,179,90,.25);
  box-shadow: 0 -18px 60px rgba(0,0,0,.75);
  overflow: hidden; z-index: 9999;
}
.panelHead{ display:flex; align-items:center; justify-content:space-between; padding:8px 12px; border-bottom: 1px solid rgba(255,255,255,.06); }
.panelTitle{ font-weight:900; color: var(--accent2); }
.panelFrame{ width:100%; height: calc(100% - 46px); border:0; background: transparent; }

.flash { animation: flash 0.9s linear infinite; }
@keyframes flash{ 0%{ filter: brightness(1); } 50%{ filter: brightness(1.18); } 100%{ filter: brightness(1); } }
.nudge { animation: nudge 0.9s ease-in-out infinite; }
@keyframes nudge { 0%{ transform: translateX(0); } 25%{ transform: translateX(-6px); } 50%{ transform: translateX(6px); } 75%{ transform: translateX(-3px); } 100%{ transform: translateX(0); } }

/* Match page inside iframe */
.matchBody{ background: transparent; }
.matchShell{ height: 100vh; padding: 8px 10px; }
.matchHeader{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.matchTitle{ font-weight:900; color: var(--accent2); }
.matchSub{ color: var(--muted); font-size:12px; margin-top:2px; }
.matchMain{ display:flex; flex-direction:column; gap:8px; }

.chat{
  border:1px solid rgba(255,179,90,.20);
  background: rgba(0,0,0,.50);
  border-radius:14px;
  padding:10px;
  overflow:auto;
}
.compactChat{ height: 130px; }
.chat .msg{ margin:7px 0; padding:7px 9px; border-radius:12px; border:1px solid rgba(255,255,255,.06); background: rgba(255,255,255,.02); }
.chat .who{ font-weight:900; font-size:11px; margin-bottom:3px; }
.chat .who.green{ color: var(--green); }
.chat .who.red{ color: var(--red); }
.chat .who.sys{ color: var(--accent2); }

body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  pointer-events: none;
  z-index: -1;
}

/* Condensed match layout: left info (25%) + right chat (75%) */
.matchSplit{
  display:flex;
  gap:10px;
  height: calc(100vh - 56px);
}
.matchLeft{ width:25%; min-width: 240px; display:flex; flex-direction:column; gap:8px; }
.matchRight{ flex:1; min-width: 0; }
.matchTitleMini{ font-weight:900; color: var(--accent2); margin-bottom:8px; }
.chatFill{ flex:1; min-height: 0; height:auto; }
