/* ---------- Chọn nhân vật ---------- */
#select-screen { max-width: 1000px; margin: 0 auto; padding: 30px 12px 60px; }
.char-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 900px) { .char-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .char-grid { grid-template-columns: 1fr; } }
.char-card {
  background: linear-gradient(180deg, var(--bg2), #11151e);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center;
  cursor: pointer; transition: .15s;
}
.char-card:hover { border-color: #48586e; transform: translateY(-2px); }
.char-card.sel { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc) inset; }
.cc-name { font-weight: 800; font-size: 17px; margin-top: 8px; }
.cc-tag { color: var(--acc2); font-size: 12.5px; min-height: 34px; margin-top: 3px; }
.cc-stats { text-align: left; font-size: 12.5px; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.cc-stats div { display: flex; justify-content: space-between; padding: 1px 0; }
.cc-stats b { font-variant-numeric: tabular-nums; }
.cc-growth { color: var(--good); }

/* ---------- Nhân vật ---------- */
.hero-panel { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.hero-art {
  width: 150px; height: 170px; border-radius: 14px; flex: none;
  background: radial-gradient(circle at 50% 35%, #263349, #131922);
  border: 1px solid var(--line); display: grid; place-items: center; font-size: 66px;
}
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: 1; min-width: 260px; }
.slot {
  background: var(--bg3); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; text-align: center; cursor: pointer; transition: .15s; min-height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
}
.slot:hover { border-color: #4b5a70; }
.slot .s-label { font-size: 11px; color: var(--txt2); }
.slot .s-ico { font-size: 26px; line-height: 1.1; }
.slot .s-ico img { width: 1em; height: 1em; object-fit: contain; }
.slot .s-name { font-size: 12px; font-weight: 600; }
.slot.filled { border-color: var(--rar, var(--line)); box-shadow: 0 0 0 1px var(--rar) inset; }
.slot.empty .s-ico { opacity: .3; }

.skill-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.skill-slot {
  background: var(--bg3); border: 1px dashed var(--line); border-radius: 10px;
  padding: 12px 6px; text-align: center; color: var(--txt2); font-size: 12px;
}

/* ---------- Tiềm năng ---------- */
.talent-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 980px) { .talent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .talent-grid { grid-template-columns: 1fr; } }
.talent-card {
  background: var(--bg2); border: 1px solid var(--line); border-top: 3px solid var(--tc);
  border-radius: 12px; padding: 12px;
}
.tc-head { font-weight: 800; font-size: 14px; }
.tc-blurb { color: var(--txt2); font-size: 12px; min-height: 30px; }
.tc-pts { font-size: 30px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.tc-pts small { font-size: 13px; color: var(--txt2); font-weight: 400; }
.tc-ctrl { display: flex; gap: 6px; justify-content: center; margin: 6px 0; }
.tc-ctrl button { width: 34px; height: 30px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); }
.tc-ctrl button:hover:not(:disabled) { background: #2a3546; }
.tc-per { font-size: 12px; color: #a7f3d0; }
.tc-ms { font-size: 11.5px; color: var(--txt2); margin-top: 6px; border-top: 1px dashed #222b39; padding-top: 5px; }
.tc-ms .hit { color: var(--acc); }
.preview-box { background: #14251c; border: 1px solid #2f6b45; border-radius: 10px; padding: 10px; }

/* ---------- Item / shop ---------- */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.item-tile {
  background: var(--bg3); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 8px; text-align: center; cursor: pointer; position: relative; transition: .15s;
  border-top: 3px solid var(--rar);
}
.item-tile:hover { transform: translateY(-2px); border-color: #4b5a70; }
.item-tile.sel { box-shadow: 0 0 0 1px var(--acc) inset; border-color: var(--acc); }
.item-tile.dim { opacity: .45; }
.item-icon { font-size: 30px; line-height: 1.1; display: block; }
.item-icon img { width: 1em; height: 1em; object-fit: contain; }
.item-name { font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.item-rar { font-size: 11px; color: var(--rar); }
.item-price { font-size: 12px; color: var(--acc); font-weight: 700; margin-top: 4px; }
.tile-badge {
  position: absolute; top: 4px; right: 4px; font-size: 10px; padding: 1px 5px;
  border-radius: 5px; background: #0f1620; border: 1px solid var(--line); color: var(--txt2);
}
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- Đấu trường ---------- */
.bracket { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.br-node {
  flex: 1; min-width: 74px; text-align: center; padding: 8px 6px; border-radius: 9px;
  background: var(--bg3); border: 1px solid var(--line); font-size: 12.5px; color: var(--txt2);
}
.br-node.done { border-color: #2f6b45; color: var(--good); background: #14251c; }
.br-node.cur { border-color: var(--acc); color: var(--acc); font-weight: 800; background: #241d09; }
.br-arrow { color: var(--txt2); }

.vs-head { display: flex; align-items: center; gap: 14px; justify-content: center; text-align: center; }
.vs-side { flex: 1; }
.vs-side .p { font-size: 44px; line-height: 1; }
.vs-side .n { font-weight: 800; margin-top: 4px; }
.vs-x { font-size: 22px; font-weight: 900; color: var(--bad); }
.power-num { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }

.odds-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.odds-btn {
  border: 1px solid var(--line); background: var(--bg3); border-radius: 12px; padding: 12px;
  text-align: center; transition: .15s;
}
.odds-btn:hover { border-color: #4b5a70; }
.odds-btn.on { border-color: var(--acc); background: #241d09; box-shadow: 0 0 0 1px var(--acc) inset; }
.odds-btn .t { font-weight: 800; }
.odds-btn .o { font-size: 22px; font-weight: 900; color: var(--acc); font-variant-numeric: tabular-nums; }
.odds-btn .s { font-size: 12px; color: var(--txt2); }

.bet-input {
  background: #0e131b; border: 1px solid var(--line); color: var(--txt);
  border-radius: 9px; padding: 9px 12px; width: 140px; font-variant-numeric: tabular-nums;
  font-weight: 700; text-align: right;
}
.side-bets { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .side-bets, .odds-box { grid-template-columns: 1fr; } }
.sb-opts { display: flex; gap: 6px; flex-wrap: wrap; }

.prob-bar { height: 10px; border-radius: 99px; overflow: hidden; background: var(--bad); display: flex; }
.prob-bar > i { display: block; height: 100%; background: var(--good); }

/* ---------- Hồ sơ ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.kpi { background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.kpi .v { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12px; color: var(--txt2); }
textarea.save-box {
  width: 100%; height: 110px; background: #0e131b; color: var(--txt2);
  border: 1px solid var(--line); border-radius: 9px; padding: 8px; font: 12px monospace; resize: vertical;
}
