/* CSBR Mix — visual de transmissão de e-sports */

:root {
  --bg: #0a0c10;
  --bg-2: #0f1218;
  --panel: #12161d;
  --panel-2: #181d26;
  --panel-3: #1f2530;
  --line: rgb(255 255 255 / 0.07);
  --line-2: rgb(255 255 255 / 0.13);
  --text: #eef1f6;
  --muted: #8a93a6;
  --dim: #5b6476;
  --brand: #ff3b47;
  --brand-2: #ff6670;
  --brand-glow: rgb(255 59 71 / 0.35);
  --ok: #2fe08d;
  --warn: #ffb020;
  --team-a: #3fb4ff;
  --team-a-dim: rgb(63 180 255 / 0.14);
  --team-b: #ff9a3c;
  --team-b-dim: rgb(255 154 60 / 0.14);
  --radius: 16px;
  --display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'Cascadia Mono', Consolas, ui-monospace, monospace;
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --cut-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 15% -120px, rgb(255 59 71 / 0.16), transparent 70%),
    radial-gradient(900px 420px at 85% -160px, rgb(63 180 255 / 0.1), transparent 70%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--brand);
  color: #fff;
}

.boot {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.loader {
  width: 42px;
  height: 42px;
  border: 3px solid var(--line-2);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.display {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.muted {
  color: var(--muted);
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

/* ---------- Topo ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
  padding: 0 28px;
  background: rgb(10 12 16 / 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(240, 190, 30, 0.25));
}

.brand-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.08em;
  line-height: 1;
}

.brand-text span {
  color: var(--brand);
}

.brand-text small {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--dim);
}

.nav {
  display: flex;
  gap: 4px;
  height: 100%;
}

.nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 16px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.nav a:hover {
  color: var(--text);
}

.nav a.active {
  color: var(--text);
}

.nav a.active::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 3px;
  background: var(--brand);
  box-shadow: 0 0 14px var(--brand);
}

.topbar .me {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar .me .who-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.1;
  text-align: right;
}

.topbar .me .who-name small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--warn);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line-2);
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--dim);
  clip-path: var(--cut-sm);
}

.live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
}

.live.on {
  color: var(--ok);
  border-color: rgb(47 224 141 / 0.35);
}

.live.on::before {
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: blink 1.4s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.35;
  }
}

main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 28px 90px;
}

/* ---------- Base ---------- */

.panel {
  position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}

.stack > * + * {
  margin-top: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--brand);
  box-shadow: 0 0 10px var(--brand);
}

.section-title .count {
  color: var(--text);
}

h1,
h2,
h3 {
  margin: 0;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  background: var(--panel-3);
  clip-path: var(--cut-sm);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s,
    filter 0.15s,
    transform 0.06s;
}

.btn:hover:not(:disabled) {
  background: #2a3240;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), #d61f37);
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  filter: drop-shadow(0 0 14px var(--brand-glow));
}

.btn.go {
  background: linear-gradient(135deg, #22c77c, #12945a);
  color: #04140c;
}

.btn.go:hover:not(:disabled) {
  filter: brightness(1.1) drop-shadow(0 0 14px rgb(47 224 141 / 0.35));
}

.btn.ghost {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line-2);
  clip-path: none;
  border-radius: 10px;
}

.btn.ghost:hover:not(:disabled) {
  background: var(--panel-3);
}

.btn.danger {
  background: transparent;
  color: #ff7a82;
  box-shadow: inset 0 0 0 1px rgb(255 59 71 / 0.35);
  clip-path: none;
  border-radius: 10px;
}

.btn.danger:hover:not(:disabled) {
  background: rgb(255 59 71 / 0.1);
}

.btn.danger.confirm {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 0 20px var(--brand-glow);
}

.btn.discord {
  min-height: 54px;
  padding: 0 30px;
  font-size: 16px;
  background: #5865f2;
  color: #fff;
}

.btn.discord:hover {
  background: #6b77f5;
}

.btn.steam {
  background: linear-gradient(135deg, #1e3a5c, #16263b);
  color: #c7e3ff;
  box-shadow: inset 0 0 0 1px rgb(102 192 244 / 0.4);
}

.btn.steam:hover:not(:disabled) {
  background: linear-gradient(135deg, #24476f, #1b3049);
}

.btn.sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  background: rgb(255 255 255 / 0.05);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.tag.status {
  color: #fff;
  background: rgb(255 59 71 / 0.16);
  border-color: rgb(255 59 71 / 0.45);
}

.tag.status.live-phase::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand);
  animation: blink 1.2s ease-in-out infinite;
}

.tag.test {
  color: var(--warn);
  border-color: rgb(255 176 32 / 0.4);
}

.avatar {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
}

.avatar.ring {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--ring, var(--line-2));
}

.avatar.xl {
  width: 92px;
  height: 92px;
  font-size: 30px;
}

.avatar.lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
}

.avatar.sm {
  width: 30px;
  height: 30px;
  font-size: 12px;
}

/* Selo de KD (cores por faixa, estilo nível) */
.kd {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--tier);
  background: color-mix(in srgb, var(--tier) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--tier) 40%, transparent);
}

.kd.t0 {
  --tier: #4fd1c5;
}
.kd.t1 {
  --tier: #9aa4b5;
}
.kd.t2 {
  --tier: #4ade80;
}
.kd.t3 {
  --tier: #facc15;
}
.kd.t4 {
  --tier: #fb923c;
}
.kd.t5 {
  --tier: #ff4d5a;
}

.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgb(255 176 32 / 0.14), rgb(255 176 32 / 0.03));
  border: 1px solid rgb(255 176 32 / 0.3);
  font-weight: 500;
}

/* ---------- Login ---------- */

.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.landing {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  min-height: 100vh;
  padding: 24px 16px;
}

.landing-logo {
  width: min(380px, 78vw);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(240, 190, 30, 0.22));
}

.login-card {
  position: relative;
  width: min(460px, 100%);
  padding: 46px 38px 38px;
  text-align: center;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--team-a), var(--brand), var(--team-b));
}

.login-card .logo {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
}

.login-card h1 {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card h1 span {
  color: var(--brand);
}

.login-card p {
  margin: 10px 0 30px;
  line-height: 1.6;
  color: var(--muted);
}

.login-feats {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- Placar do mix ---------- */

.match {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, var(--team-a-dim), transparent 38%, transparent 62%, var(--team-b-dim)),
    linear-gradient(180deg, var(--panel-2), var(--panel));
}

.match::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--team-a) 0 40%, var(--brand) 40% 60%, var(--team-b) 60%);
}

.match-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 18px 24px 0;
}

.match-id {
  margin-right: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.match-id b {
  color: var(--text);
}

.scoreboard {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 26px 34px 30px;
}

.side {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.side.B {
  flex-direction: row-reverse;
  text-align: right;
}

.side.A {
  --ring: var(--team-a);
}

.side.B {
  --ring: var(--team-b);
}

.side-info {
  min-width: 0;
}

.side-team {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--ring);
}

.side-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-sub {
  font-size: 13px;
  color: var(--muted);
}

.side .win {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #04140c;
  background: var(--ok);
  clip-path: var(--cut-sm);
}

.center {
  text-align: center;
  min-width: 200px;
}

.vs {
  font-family: var(--display);
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #fff, #8a93a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.big-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 72px;
  line-height: 1;
}

.big-score .A {
  color: var(--team-a);
  text-shadow: 0 0 30px rgb(63 180 255 / 0.4);
}

.big-score .B {
  color: var(--team-b);
  text-shadow: 0 0 30px rgb(255 154 60 / 0.4);
}

.big-score .lose {
  opacity: 0.45;
  text-shadow: none;
}

.big-score .sep {
  font-size: 40px;
  color: var(--dim);
}

.center-sub {
  margin-top: 10px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.fill {
  width: 220px;
  height: 6px;
  margin: 14px auto 0;
  border-radius: 99px;
  background: var(--panel-3);
  overflow: hidden;
}

.fill i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 12px var(--brand);
  transition: width 0.4s ease;
}

/* Fases */
.phases {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
}

.phase {
  position: relative;
  padding: 14px 10px;
  text-align: center;
  font-family: var(--display);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.phase + .phase {
  border-left: 1px solid var(--line);
}

.phase.done {
  color: var(--muted);
}

.phase.done::before {
  content: '✓ ';
  color: var(--ok);
}

.phase.current {
  color: #fff;
  background: linear-gradient(180deg, transparent, rgb(255 59 71 / 0.16));
}

.phase.current::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--brand);
  box-shadow: 0 0 12px var(--brand);
}

/* ---------- Vez do capitão ---------- */

.turn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 20%, transparent), transparent 70%);
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
  overflow: hidden;
}

.turn.A {
  --tc: var(--team-a);
}

.turn.B {
  --tc: var(--team-b);
}

.turn::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--tc);
}

.turn .t-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--tc);
}

.turn .t-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.turn.mine {
  animation: glow 1.6s ease-in-out infinite;
}

.turn .t-you {
  margin-left: auto;
  padding: 8px 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #fff;
  background: var(--brand);
  clip-path: var(--cut-sm);
}

@keyframes glow {
  50% {
    box-shadow: 0 0 0 1px var(--tc), 0 0 28px color-mix(in srgb, var(--tc) 35%, transparent);
  }
}

.order {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.order span {
  min-width: 46px;
  padding: 6px 10px;
  text-align: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  background: var(--panel-3);
  border: 1px solid var(--line);
}

.order span.A {
  color: var(--team-a);
}

.order span.B {
  color: var(--team-b);
}

.order span.done {
  opacity: 0.3;
}

.order span.current {
  background: color-mix(in srgb, currentColor 18%, transparent);
  border-color: currentColor;
  box-shadow: 0 0 14px color-mix(in srgb, currentColor 30%, transparent);
}

/* ---------- Jogadores ---------- */

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 66px;
  padding: 11px 14px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  animation: enter 0.25s ease-out;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.player .slot-n {
  position: absolute;
  top: 6px;
  right: 10px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  color: var(--dim);
}

.player.empty {
  justify-content: center;
  border-style: dashed;
  border-color: var(--line-2);
  background: transparent;
  color: var(--dim);
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: none;
}

.player.me {
  border-color: rgb(255 59 71 / 0.55);
  background: linear-gradient(90deg, rgb(255 59 71 / 0.1), var(--panel-2) 60%);
}

.player .pinfo {
  min-width: 0;
  flex: 1;
}

.player .pname {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player .pname .crown {
  margin-right: 4px;
}

.player .pmeta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.player .you {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-2);
}

.player.pickable {
  cursor: pointer;
  transition:
    border-color 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
}

.player.pickable:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--tc, var(--brand));
  box-shadow: 0 8px 26px rgb(0 0 0 / 0.4), 0 0 0 1px var(--tc, var(--brand));
}

.player.pickable .pick-hint {
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--tc, var(--brand));
  opacity: 0;
  transition: opacity 0.15s;
}

.player.pickable:hover .pick-hint {
  opacity: 1;
}

.player.selected {
  border-color: var(--warn);
  background: linear-gradient(90deg, rgb(255 176 32 / 0.16), var(--panel-2));
}

.board {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 20px;
  align-items: start;
}

.team {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--td), transparent 160px), var(--bg-2);
  border: 1px solid var(--line);
}

.team.A {
  --tcol: var(--team-a);
  --td: var(--team-a-dim);
}

.team.B {
  --tcol: var(--team-b);
  --td: var(--team-b-dim);
}

.team .player {
  --ring: var(--tcol);
}

.team-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.team-head h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.16em;
  color: var(--tcol);
}

.team-head span {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.team .player + .player,
.pool .player + .player {
  margin-top: 8px;
}

.pool {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}

.pool.active {
  border-color: color-mix(in srgb, var(--tc) 40%, transparent);
}

.teams-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ---------- Mapas ---------- */

.maps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

/* Até 7 mapas: todos na mesma linha. */
.maps.fit {
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
}

.map {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  aspect-ratio: 3 / 4;
  padding: 14px;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  text-align: left;
  color: #fff;
  background:
    radial-gradient(120% 80% at 70% 10%, hsl(var(--hue) 70% 55% / 0.55), transparent 60%),
    linear-gradient(165deg, hsl(var(--hue) 45% 30%), hsl(calc(var(--hue) + 30) 40% 10%));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  isolation: isolate;
}

.map img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.3s ease;
}

/* Emblema do mapa (web/images): inteiro, centralizado sobre um fundo escuro com brilho. */
.map.has-badge {
  background:
    radial-gradient(70% 55% at 50% 38%, rgb(255 255 255 / 0.1), transparent 70%),
    linear-gradient(180deg, #1c222c, #0d1015);
}

.map.has-badge img {
  inset: 9% auto auto 50%;
  width: 72%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  translate: -50% 0;
  filter: drop-shadow(0 8px 18px rgb(0 0 0 / 0.55));
}

.map.has-badge .m-code {
  display: none;
}

.map.has-badge::before {
  background: linear-gradient(180deg, transparent 58%, rgb(0 0 0 / 0.75));
}

.map::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 35%, rgb(0 0 0 / 0.85)),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 0.035) 0 2px, transparent 2px 14px);
}

.map .m-code {
  position: absolute;
  top: 12px;
  left: 14px;
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.65;
}

.map .m-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 10px rgb(0 0 0 / 0.6);
}

.map .m-sub {
  margin-top: 6px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}

.map.clickable {
  cursor: pointer;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}

.map.clickable:hover:not(:disabled) {
  transform: translateY(-4px);
  box-shadow:
    inset 0 0 0 2px #fff,
    0 14px 34px rgb(0 0 0 / 0.5);
}

.map.clickable:hover img {
  scale: 1.06;
}

.map.clickable.ban-mode:hover:not(:disabled) {
  box-shadow:
    inset 0 0 0 2px var(--brand),
    0 14px 34px rgb(255 59 71 / 0.25);
}

.map.clickable.pick-mode:hover:not(:disabled) {
  box-shadow:
    inset 0 0 0 2px var(--ok),
    0 14px 34px rgb(47 224 141 / 0.25);
}

.map.banned::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: grayscale(1) brightness(0.45);
}

.map.banned .m-name,
.map.banned .m-sub,
.map.banned .m-code {
  opacity: 0.55;
}

.map.picked {
  box-shadow:
    inset 0 0 0 2px var(--ok),
    0 0 26px rgb(47 224 141 / 0.2);
}

.map.decider {
  box-shadow:
    inset 0 0 0 2px var(--warn),
    0 0 26px rgb(255 176 32 / 0.2);
}

.stamp {
  position: absolute;
  top: 42%;
  left: 50%;
  translate: -50% -50%;
  rotate: -14deg;
  padding: 6px 14px;
  border: 3px solid currentColor;
  border-radius: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.14em;
  background: rgb(0 0 0 / 0.35);
  animation: stamp 0.25s ease-out;
}

.map.banned .stamp {
  color: #ff5260;
}

.map.picked .stamp {
  color: var(--ok);
}

@keyframes stamp {
  from {
    opacity: 0;
    scale: 1.6;
  }
}

.series {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 300px));
  gap: 14px;
  margin-bottom: 24px;
}

.series .map {
  aspect-ratio: 16 / 9;
}

.series .map.has-badge img {
  inset: 50% 14px auto auto;
  width: auto;
  height: 80%;
  translate: 0 -50%;
}

.series .map.has-badge .m-num {
  left: 14px;
  right: auto;
}

.series .m-num {
  position: absolute;
  top: 10px;
  right: 14px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  opacity: 0.5;
}

/* ---------- Conexão ---------- */

.connect-box {
  margin-top: 24px;
  padding: 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(47 224 141 / 0.1), transparent 60%), var(--bg-2);
  border: 1px solid rgb(47 224 141 / 0.3);
}

.terminal {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: #05070a;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 15px;
  overflow-x: auto;
}

.terminal::before {
  content: '>';
  color: var(--ok);
}

.terminal code {
  flex: 1;
  white-space: nowrap;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* ---------- Abrir mix ---------- */

.empty-hero {
  padding: 56px 24px;
  text-align: center;
}

.empty-hero .big {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.empty-hero p {
  margin: 10px 0 0;
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 26px 40px;
}

.field-label {
  margin-bottom: 10px;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.seg {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.seg button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--panel-3);
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.seg button:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 0.3);
}

.seg button.on {
  border-color: var(--brand);
  background: rgb(255 59 71 / 0.16);
  box-shadow: 0 0 16px rgb(255 59 71 / 0.18);
}

.seg button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pool-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pool-strip .tag {
  color: var(--text);
}

label.field {
  display: grid;
  gap: 8px;
}

label.field span {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type='text'] {
  height: 46px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  width: 100%;
  transition: border-color 0.15s;
}

input[type='text']:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(255 59 71 / 0.18);
}

/* ---------- Perfil ---------- */

.profile-hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 30px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 200px at 0% 0%, rgb(255 59 71 / 0.2), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
}

.profile-hero h1 {
  font-family: var(--display);
  font-size: 34px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-hero .avatar {
  --ring: var(--brand);
}

.steam-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

.steam-state .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
}

.steam-state.ok .dot {
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
}

.hero-rating {
  margin-left: auto;
  text-align: right;
}

.hero-rating .v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 54px;
  line-height: 1;
  color: var(--brand);
  text-shadow: 0 0 24px var(--brand-glow);
}

.hero-rating .l {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 22px;
  align-items: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.stat {
  padding: 16px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.stat .v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
}

.stat .l {
  margin-top: 4px;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  font-size: 12px;
  font-family: var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line-2);
}

.form-stack {
  display: grid;
  gap: 16px;
}

/* ---------- Ranking ---------- */

.podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  align-items: end;
  gap: 16px;
  margin-bottom: 26px;
}

.podium-card {
  position: relative;
  padding: 24px 18px 20px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--medal) 18%, transparent), var(--panel) 70%);
  overflow: hidden;
}

.podium-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--medal);
  box-shadow: 0 0 16px var(--medal);
}

.podium-card.p1 {
  --medal: #ffc93c;
  padding-top: 36px;
}

.podium-card.p2 {
  --medal: #c9d3e0;
}

.podium-card.p3 {
  --medal: #e0925a;
}

.podium-card .avatar {
  --ring: var(--medal);
  margin: 0 auto 12px;
}

.podium-card .pos {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--medal);
}

.podium-card .pn {
  margin: 4px 0 10px;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.podium-card .pr {
  font-family: var(--display);
  font-weight: 700;
  font-size: 36px;
  line-height: 1;
}

.podium-card .ps {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

th {
  padding: 0 14px 4px;
  text-align: left;
  font-family: var(--display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}

td {
  padding: 12px 14px;
  background: var(--panel-2);
  white-space: nowrap;
}

td:first-child {
  border-radius: 10px 0 0 10px;
  font-family: var(--display);
  font-weight: 700;
  color: var(--muted);
  width: 48px;
}

td:last-child {
  border-radius: 0 10px 10px 0;
}

tr.me td {
  background: rgb(255 59 71 / 0.12);
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

td.rating {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}

.who {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

/* ---------- Avisos ---------- */

#toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
  font-weight: 500;
  animation: toast-in 0.22s ease-out;
}

.toast::before {
  content: '✓';
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  color: #04140c;
  background: var(--ok);
}

.toast.error::before {
  content: '!';
  color: #fff;
  background: var(--brand);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

/* ---------- Telas menores ---------- */

@media (max-width: 960px) {
  .maps.fit {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .board {
    grid-template-columns: 1fr 1fr;
  }

  .board .pool {
    grid-column: 1 / -1;
    order: -1;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: auto;
    flex-wrap: wrap;
    gap: 0 12px;
    padding: 10px 16px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    height: 44px;
  }

  .nav a {
    flex: 1;
    justify-content: center;
    padding: 0 6px;
    font-size: 12px;
  }

  .topbar .me .who-name,
  .live {
    display: none;
  }

  main {
    padding: 20px 16px 70px;
  }

  .panel {
    padding: 18px;
  }

  .scoreboard {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 18px 22px;
  }

  .side,
  .side.B {
    flex-direction: row;
    text-align: left;
  }

  .center {
    order: -1;
  }

  .side-name {
    font-size: 20px;
  }

  .avatar.xl {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .big-score {
    font-size: 54px;
  }

  .phases {
    grid-template-columns: repeat(5, 1fr);
  }

  .phase {
    padding: 10px 2px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .board,
  .teams-2,
  .podium {
    grid-template-columns: 1fr;
  }

  .podium-card.p1 {
    order: -1;
  }

  .turn .t-text {
    font-size: 17px;
  }

  .profile-hero {
    flex-wrap: wrap;
    padding: 22px;
  }

  .hero-rating {
    margin-left: 0;
    text-align: left;
  }

  .maps,
  .maps.fit {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Avisos e relógio do capitão ---------- */

.bell {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.6;
}

.bell.on {
  opacity: 1;
  border-color: rgb(255 176 32 / 0.4);
}

.clock {
  display: grid;
  gap: 6px;
  min-width: 92px;
  text-align: right;
}

.clock-n {
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.clock-bar {
  display: block;
  height: 4px;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.1);
  overflow: hidden;
}

.clock-bar i {
  display: block;
  height: 100%;
  margin-left: auto;
  background: var(--tc);
  transition: width 0.25s linear;
}

.clock.hurry .clock-n {
  color: var(--brand);
  animation: blink 0.6s ease-in-out infinite;
}

.clock.hurry .clock-bar i {
  background: var(--brand);
}

.turn .spacer {
  flex: 1;
}

.turn .t-you {
  margin-left: 0;
}

/* ---------- Complete e controles de admin ---------- */

.sub-calls {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.sub-call {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 18%, transparent), transparent 70%);
  animation: glow 1.6s ease-in-out infinite;
}

.sub-call.A {
  --tc: var(--team-a);
}

.sub-call.B {
  --tc: var(--team-b);
}

.sub-call .badge {
  font-size: 26px;
}

.sub-call .t-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--tc);
}

.admin-box {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}

.admin-box summary {
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.admin-box[open] summary {
  margin-bottom: 12px;
  color: var(--text);
}

.admin-box .slots {
  margin-top: 12px;
}

.admin-box.emergency {
  border-color: rgb(255 59 71 / 0.4);
  background: linear-gradient(135deg, rgb(255 59 71 / 0.1), transparent 60%), var(--bg-2);
}

.admin-box .seg {
  margin-bottom: 16px;
}

.row.gap {
  gap: 10px;
}

.score-form {
  margin-top: 18px;
}

.score-in {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.score-in.A {
  color: var(--team-a);
}

.score-in.B {
  color: var(--team-b);
}

input[type='number'] {
  width: 72px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  text-align: center;
}

input[type='number']:focus {
  outline: none;
  border-color: var(--brand);
}

.danger-zone {
  border-color: rgb(255 59 71 / 0.45);
  background: linear-gradient(135deg, rgb(255 59 71 / 0.12), transparent 50%), linear-gradient(180deg, var(--panel-2), var(--panel));
}

.tag.link {
  color: var(--brand-2);
  text-decoration: none;
  border-style: dashed;
}

/* Editor do map pool */
.maps.pool-edit {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

.maps.pool-edit .map {
  aspect-ratio: 4 / 3;
}

.maps.pool-edit .map.has-badge {
  aspect-ratio: 5 / 6;
}

.maps.pool-edit .map.has-badge img {
  top: 7%;
  width: 58%;
}



.map.off {
  filter: grayscale(0.9) brightness(0.55);
}

.map.selected {
  box-shadow:
    inset 0 0 0 2px var(--brand),
    0 0 20px rgb(255 59 71 / 0.2);
}

.map .check {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand);
  font-weight: 700;
  font-size: 13px;
}

.add-map {
  margin-top: 4px;
  max-width: 460px;
}

.add-map input {
  flex: 1;
}

/* ---------- Histórico ---------- */

.back {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.back:hover {
  color: var(--text);
}

.boot.small {
  min-height: 240px;
}

.history {
  display: grid;
  gap: 12px;
}

.h-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel-2);
  text-decoration: none;
  transition:
    border-color 0.15s,
    transform 0.12s;
}

.h-card:hover {
  border-color: var(--line-2);
  transform: translateY(-2px);
}

.h-maps {
  display: flex;
}

.h-map {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  min-height: 92px;
  padding: 10px 12px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(165deg, hsl(var(--hue) 45% 32%), hsl(calc(var(--hue) + 30) 40% 12%));
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
}

.h-map img {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
}

.h-map.has-badge {
  justify-content: center;
  padding-bottom: 8px;
  background:
    radial-gradient(70% 60% at 50% 35%, rgb(255 255 255 / 0.1), transparent 70%),
    linear-gradient(180deg, #1c222c, #0d1015);
  font-size: 12px;
}

.h-map.has-badge img {
  inset: 8px auto auto 50%;
  width: auto;
  height: 58%;
  aspect-ratio: 1;
  object-fit: contain;
  opacity: 1;
  translate: -50% 0;
}

.h-map + .h-map {
  border-left: 2px solid var(--panel-2);
}

.h-body {
  padding: 12px 18px;
  min-width: 0;
}

.h-meta {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h-meta b {
  color: var(--text);
}

.h-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.h-team {
  min-width: 0;
}

.h-team.B {
  text-align: right;
}

.h-team.A .avatar {
  --ring: var(--team-a);
}

.h-team.B .avatar {
  --ring: var(--team-b);
}

.h-avatars {
  display: flex;
  gap: 2px;
}

.h-team.B .h-avatars {
  justify-content: flex-end;
}

.h-avatars .avatar {
  width: 26px;
  height: 26px;
  font-size: 10px;
}

.h-names {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-team.won .h-names {
  color: var(--text);
}

.h-result {
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  color: var(--dim);
}

.h-result .A {
  color: var(--team-a);
}

.h-result .B {
  color: var(--team-b);
}

.h-result .lose {
  opacity: 0.45;
}

/* ---------- Partida ---------- */

.stat-team {
  padding: 16px 12px 8px;
}

.stats-table {
  border-spacing: 0 4px;
}

.stats-table td {
  padding: 9px 10px;
  background: rgb(255 255 255 / 0.03);
}

.stats-table th {
  padding: 0 10px 2px;
}

.plink {
  color: inherit;
  text-decoration: none;
}

.plink:hover .who {
  color: var(--brand-2);
}

.mvp {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #241a00;
  background: #ffc93c;
}

.win-tag {
  padding: 2px 8px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #04140c !important;
  background: var(--ok);
  border-radius: 4px;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.hl {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  font-size: 14px;
}

.wl {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
}

.wl.w {
  color: #04140c;
  background: var(--ok);
}

.wl.l {
  color: #fff;
  background: rgb(255 59 71 / 0.7);
}

tr.click {
  cursor: pointer;
}

tr.click:hover td {
  background: var(--panel-3);
}

a.player.linked,
a.podium-card {
  color: inherit;
  text-decoration: none;
}

a.player.linked:hover,
a.podium-card:hover {
  border-color: var(--line-2);
}

.stats.wide {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

/* ---------- Gráfico de evolução ---------- */

.chart-wrap {
  position: relative;
}

.chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: pan-y;
}

.c-grid line {
  stroke: rgb(255 255 255 / 0.06);
  stroke-width: 1;
}

.c-grid.zero line {
  stroke: rgb(255 255 255 / 0.22);
}

.c-grid text,
.c-axis {
  fill: var(--muted);
  font-family: var(--body);
  font-size: 12px;
}

.c-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.c-end {
  fill: var(--brand);
  stroke: var(--panel);
  stroke-width: 2;
}

.c-label {
  fill: var(--text);
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
}

.c-cursor line {
  stroke: rgb(255 255 255 / 0.35);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.c-cursor circle {
  fill: var(--brand);
  stroke: var(--panel);
  stroke-width: 2;
}

.c-tip {
  display: none;
  position: absolute;
  z-index: 2;
  min-width: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-3);
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.5);
  font-size: 12px;
  pointer-events: none;
  transform: translate(12px, -50%);
}

.c-tip.flip {
  transform: translate(calc(-100% - 12px), -50%);
}

.c-tip-v {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
}

@media (max-width: 720px) {
  .h-card {
    grid-template-columns: 1fr;
  }

  .h-map {
    min-height: 64px;
  }

  .clock {
    min-width: 64px;
  }

  .sub-call {
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 11px;
    letter-spacing: 0.04em;
  }
}

/* ---------- Controles da partida (plano B do chat) ---------- */

.admin-box.controls {
  border-color: rgb(63 180 255 / 0.35);
  background: linear-gradient(135deg, rgb(63 180 255 / 0.08), transparent 60%), var(--bg-2);
}

.control-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ctl {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 16px 10px 14px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--panel-2);
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.08s;
}

.ctl:hover:not(:disabled) {
  border-color: rgb(255 255 255 / 0.3);
  background: var(--panel-3);
}

.ctl:active:not(:disabled) {
  transform: translateY(1px);
}

.ctl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.ctl-i {
  font-size: 24px;
  line-height: 1;
}

.ctl-t {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ctl-s {
  font-size: 12px;
  color: var(--muted);
}

.ctl.go {
  border-color: rgb(47 224 141 / 0.45);
  background: linear-gradient(180deg, rgb(47 224 141 / 0.16), var(--panel-2));
}

.ctl.go .ctl-t {
  color: var(--ok);
}

.ctl.danger .ctl-t {
  color: #ff7a82;
}

.ctl.danger.confirm {
  border-color: var(--brand);
  background: rgb(255 59 71 / 0.22);
  box-shadow: 0 0 20px var(--brand-glow);
}

.ctl.danger.confirm .ctl-t,
.ctl.danger.confirm .ctl-s {
  color: #fff;
}

@media (max-width: 720px) {
  .control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-grid .ctl.go {
    grid-column: 1 / -1;
  }
}
