/* ==========================================================================
   COPA-BRACKET.CSS — VISUAL "CHAMPIONSHIP" DA COPA NACIONAL (07/10/2026)
   Assunto EXCLUSIVO deste arquivo: o visual neon da tela da Copa — fundo
   azul-marinho quadriculado, placa do título, caixas chanfradas com borda
   brilhante, linhas de ligação da chave, 4 cores (uma por chave), final no
   meio e taça embaixo. Só aparência: quem monta o HTML é
   UI._renderCopaBracket (ui-career-copa.js), sem mudar os dados.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,600;0,800;1,700;1,800;1,900&display=swap');

.copa-neon {
  --cn-font: 'Montserrat', 'Oswald', 'Inter', sans-serif;
  --cn-bg: #07142b;
  --cn-q1: #19d6f5;   /* chave 1: ciano   */
  --cn-q2: #f03cf0;   /* chave 2: magenta */
  --cn-q3: #ff7a1a;   /* chave 3: laranja */
  --cn-q4: #39f25a;   /* chave 4: verde   */
  --cn-line: #5aa9ff;
  --cn-bh: 28px;      /* altura da caixa de time */
  --cn-bw: 126px;     /* largura da caixa de time */
  --cn-gap: 20px;     /* espaço entre colunas (onde passam as linhas) */
  --cn-pair: 6px;     /* espaço entre os 2 times de um jogo da 1ª fase */
  font-family: var(--cn-font);
}

/* Cartões da tela da Copa no mesmo tema */
.copa-neon .card {
  background: linear-gradient(180deg, rgba(16,40,82,.92), rgba(7,20,43,.95));
  border: 1px solid rgba(25,214,245,.35);
  box-shadow: 0 0 14px rgba(25,214,245,.12), inset 0 0 18px rgba(25,214,245,.05);
  color: #e8f1ff;
  /* as cores de texto do tema ficam claras sobre o fundo escuro */
  --text-0: #ffffff; --text-1: #d6e6ff; --text-2: #8fb3e6;
  --pitch: #39f25a; --line: rgba(90,169,255,.4); --bg-4: #1d4a8c;
}
.copa-neon .card-title {
  font-family: var(--cn-font); font-style: italic; font-weight: 800;
  text-transform: uppercase; letter-spacing: .5px; color: #fff;
}
.copa-neon .card-title .dot { background: var(--cn-q1); box-shadow: 0 0 6px var(--cn-q1); }

/* ── quadro do chaveamento ── */
.cn-board {
  position: relative;
  background:
    linear-gradient(rgba(90,169,255,.07) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(90,169,255,.07) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 50% 45%, #123a75 0%, #0a1f45 45%, var(--cn-bg) 100%);
  color: #fff;
  padding: 0 0 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(90,169,255,.25);
}
.cn-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 6px 4px; }
.cn-tree {
  display: flex; align-items: stretch; justify-content: center;
  gap: var(--cn-gap); width: fit-content; min-width: 100%; margin: 0 auto;
  box-sizing: border-box;
}

/* placa do título (topo, centro) */
.cn-head { position: relative; display: flex; justify-content: center; margin-bottom: 14px; }
.cn-head::before, .cn-head::after {   /* linhas do topo que saem da placa */
  content: ""; position: absolute; top: 22px; height: 2px; width: 34%;
}
.cn-head::before { right: 50%; margin-right: 150px; background: linear-gradient(90deg, transparent, var(--cn-q1)); box-shadow: 0 0 6px var(--cn-q1); }
.cn-head::after  { left: 50%;  margin-left: 150px;  background: linear-gradient(270deg, transparent, var(--cn-q1)); box-shadow: 0 0 6px var(--cn-q1); }
.cn-plate {
  position: relative; text-align: center; padding: 8px 34px 12px; min-width: 240px;
  background: linear-gradient(180deg, #0d2a57, #08193a);
  clip-path: polygon(0 0, 100% 0, 92% 100%, 8% 100%);
  border-bottom: 2px solid var(--cn-q1);
  filter: drop-shadow(0 0 8px rgba(25,214,245,.55));
}
.cn-plate-top { font-style: italic; font-weight: 800; font-size: 13px; letter-spacing: 1px; color: var(--cn-q1); text-transform: uppercase; }
.cn-plate-main { font-style: italic; font-weight: 900; font-size: 24px; line-height: 1.05; color: #fff; text-transform: uppercase; letter-spacing: .5px; }
.cn-stripes {
  position: absolute; top: 14px; width: 74px; height: 12px;
  background: repeating-linear-gradient(-60deg, var(--c) 0 7px, transparent 7px 12px);
  filter: drop-shadow(0 0 4px var(--c));
}
.cn-stripes.l { right: 50%; margin-right: 180px; --c: var(--cn-q1); }
.cn-stripes.r { left: 50%;  margin-left: 180px;  --c: var(--cn-q1); }

/* lados e colunas */
.cn-side { display: flex; gap: var(--cn-gap); align-items: stretch; }
.cn-col { display: flex; flex-direction: column; width: var(--cn-bw); }
.cn-col-title {
  height: 18px; text-align: center; font-style: italic; font-weight: 800; font-size: 10px;
  letter-spacing: .6px; color: #9fc6ff; text-transform: uppercase; white-space: nowrap;
}
.cn-col-body { flex: 1; display: flex; flex-direction: column; }

/* um jogo = 2 caixas; as linhas saem do meio do jogo */
.cn-match { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-around; }
.cn-col.first .cn-match { justify-content: center; gap: var(--cn-pair); padding: 5px 0; }
.cn-match::after {        /* o "]" que junta os 2 times e leva ao próximo jogo */
  content: ""; position: absolute; width: calc(var(--cn-gap) / 2);
  top: 25%; bottom: 25%;
  border: 2px solid var(--qc, var(--cn-line)); opacity: .85;
  box-shadow: 0 0 5px var(--qc, var(--cn-line));
}
.cn-col.first .cn-match::after {
  top: calc(50% - (var(--cn-bh) + var(--cn-pair)) / 2);
  bottom: calc(50% - (var(--cn-bh) + var(--cn-pair)) / 2);
}
.cn-side.left  .cn-match::after { right: calc(var(--cn-gap) / -2); border-left: none; }
.cn-side.right .cn-match::after { left:  calc(var(--cn-gap) / -2); border-right: none; }
/* o traço que chega em cada caixa vindo do jogo anterior */
.cn-col:not(.first) .cn-team::before {
  content: ""; position: absolute; top: 50%; width: calc(var(--cn-gap) / 2); height: 2px;
  background: var(--qc, var(--cn-line)); box-shadow: 0 0 5px var(--qc, var(--cn-line)); opacity: .85;
}
.cn-side.left  .cn-col:not(.first) .cn-team::before { right: 100%; }
.cn-side.right .cn-col:not(.first) .cn-team::before { left: 100%; }
/* da semi até a final: só o traço reto */
.cn-col.semi .cn-match::after { top: 25%; bottom: 25%; }

/* caixa de time chanfrada com borda neon */
.cn-team { position: relative; height: var(--cn-bh); filter: drop-shadow(0 0 4px var(--tc, var(--cn-q1))); }
.cn-team-in {
  position: absolute; inset: 0; padding: 2px;
  background: var(--tc, var(--cn-q1));
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 9px 100%, 0 50%);
}
.cn-team-face {
  height: 100%; box-sizing: border-box; display: flex; align-items: center; gap: 4px;
  padding: 0 10px;
  background: linear-gradient(180deg, #1d4a8c 0%, #0e2a5a 55%, #0a1d40 100%);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
  font-style: italic; font-weight: 800; font-size: 9.5px; text-transform: uppercase; color: #fff;
}
.cn-side.right .cn-team-face { flex-direction: row-reverse; }
.cn-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; padding-right: 1px; }
.cn-side.right .cn-name { text-align: right; }
.cn-score { font-weight: 900; font-size: 11px; min-width: 10px; text-align: center; }
.cn-score small { font-size: 8px; opacity: .8; font-weight: 700; }
.cn-ser {
  font-style: normal; font-size: 8px; font-weight: 800; line-height: 13px; width: 13px; height: 13px;
  text-align: center; border-radius: 3px; background: rgba(255,255,255,.12); color: var(--sc, #cfe0ff); flex: 0 0 auto;
}
.cn-tbd .cn-team-face { justify-content: center; color: rgba(190,215,255,.45); font-weight: 700; font-size: 9px; }
.cn-tbd { filter: none; opacity: .75; }
.cn-tbd .cn-team-in { background: rgba(90,169,255,.35); }
.cn-lost { opacity: .45; filter: none; }
.cn-won .cn-name { color: #fff; text-shadow: 0 0 6px var(--tc); }
.cn-mine .cn-team-face { background: linear-gradient(180deg, #6b5410 0%, #3d2f08 60%, #2a2006 100%); color: #ffe48a; }
.cn-mine { filter: drop-shadow(0 0 6px #ffd54f); }

/* quadros laterais com o nome da chave (as "abas" do modelo) */
.cn-tabs { display: flex; flex-direction: column; width: 22px; padding-top: 18px; }
.cn-tab { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; }
.cn-tab::before {          /* linha fina de moldura do quadro */
  content: ""; position: absolute; top: 8px; bottom: 8px; width: 2px; background: var(--qc);
  box-shadow: 0 0 6px var(--qc); opacity: .7;
}
.cn-side.left  .cn-tab::before { left: 4px; }
.cn-side.right .cn-tab::before { right: 4px; }
.cn-tab span {
  position: relative; z-index: 1; writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 12px 4px; background: linear-gradient(180deg, var(--qc), color-mix(in srgb, var(--qc) 60%, #000));
  clip-path: polygon(0 8px, 100% 0, 100% 100%, 0 calc(100% - 8px));
  font-style: italic; font-weight: 900; font-size: 10px; letter-spacing: 1px; color: #061021;
  box-shadow: 0 0 10px var(--qc); white-space: nowrap;
}
.cn-side.right .cn-tab span { clip-path: polygon(0 0, 100% 8px, 100% calc(100% - 8px), 0 100%); }

/* centro: FINAL, as 2 caixas grandes e a taça */
.cn-center { display: flex; flex-direction: column; align-items: center; width: 140px; gap: 12px; padding-top: 18px; }
.cn-final-title { font-style: italic; font-weight: 900; font-size: 26px; letter-spacing: 1px; color: #fff; text-shadow: 0 0 10px rgba(90,169,255,.8); }
.cn-center .cn-team { --cn-bh: 44px; height: 44px; width: 140px; }
.cn-center .cn-team-face { font-size: 12px; justify-content: center; padding: 0 14px; }
.cn-center .cn-score { font-size: 14px; }
.cn-cup { width: 74px; height: auto; margin-top: 4px; filter: drop-shadow(0 0 10px rgba(200,220,255,.45)); }
.cn-cup-img { width: 92px; filter: drop-shadow(0 0 12px rgba(255,213,79,.45)) drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.cn-champ {
  text-align: center; padding: 6px 16px 8px; min-width: 130px;
  background: linear-gradient(180deg, #0d2a57, #08193a);
  clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%);
  border-top: 2px solid var(--cn-q1);
}
.cn-champ small { display: block; font-style: italic; font-weight: 800; font-size: 9px; letter-spacing: 1px; color: var(--cn-q1); }
.cn-champ b { font-style: italic; font-weight: 900; font-size: 13px; text-transform: uppercase; color: #fff; }
.cn-champ.you b { color: #ffe48a; text-decoration: underline; }

.cn-foot { text-align: center; font-size: 10.5px; color: #8fb3e6; margin: 10px 12px 0; font-weight: 600; }
.cn-foot b { color: #ffe48a; }

/* espaço mais estreito (janela da Copa, tela menor): o chaveamento encolhe inteiro
   pra caber na largura do quadro; abaixo de ~1000px ele rola de lado. */
.cn-scroll { container-type: inline-size; }
@container (max-width: 1400px) { .cn-tree { zoom: .9; } }
@container (max-width: 1260px) { .cn-tree { zoom: .8; } }
@container (max-width: 1120px) { .cn-tree { zoom: .72; } }

/* traço da semifinal até a caixa da final */
.cn-col.semi .cn-match::before {
  content: ""; position: absolute; top: 50%; height: 2px; width: calc(var(--cn-gap) / 2);
  background: var(--cn-line); box-shadow: 0 0 5px var(--cn-line); opacity: .85;
}
.cn-side.left  .cn-col.semi .cn-match::before { right: calc(var(--cn-gap) / -1); }
.cn-side.right .cn-col.semi .cn-match::before { left:  calc(var(--cn-gap) / -1); }
.cn-center-top, .cn-center-bot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cn-center-top { justify-content: flex-end; }
.cn-center-bot { justify-content: flex-start; }
.cn-final-pair { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* ── tela cheia (07/10/2026, app-career-copa-telacheia.js) ── */
.cn-board[onclick] { cursor: zoom-in; }
.cn-full-btn {
  position: absolute; top: 10px; right: 12px; z-index: 2; cursor: pointer;
  font-family: var(--cn-font); font-style: italic; font-weight: 800; font-size: 11px;
  text-transform: uppercase; letter-spacing: .5px; color: #061021;
  background: linear-gradient(180deg, var(--cn-q1), #0e8fb0); border: none;
  padding: 6px 12px; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
  box-shadow: 0 0 10px rgba(25,214,245,.6);
}
.cn-full-btn:hover { filter: brightness(1.15); }
.cn-full {
  position: fixed; inset: 0; z-index: 100000; background: var(--cn-bg);
  display: flex; flex-direction: column;
}
.cn-full .cn-board { flex: 1; border-radius: 0; border: none; display: flex; flex-direction: column; justify-content: center; }
.cn-full .cn-full-btn { background: linear-gradient(180deg, #ff5a5a, #b02020); color: #fff; box-shadow: 0 0 10px rgba(255,90,90,.6); }
.cn-full .cn-scroll { container-type: normal; }
