/* ══════════════════════════════════════════════════════════════
   CARTA PROTEGIDA (slab) — tela de Atletas
   --tc = cor da equipe (vem do extractLogoColor)
   Padrão: tema escuro. Tema branco: html[data-theme="light"]
   ══════════════════════════════════════════════════════════════ */

/* tamanho da carta só na tela de atletas */
#atletas-list .ath-flip-wrapper { width: 230px; height: 350px; }
#atletas-list > .ath-card { width: 230px; height: 350px; }

.ath-card.cC {
  --slab: rgba(255,255,255,.07); --slab-edge: rgba(255,255,255,.28);
  --in-top: #1c1823; --in-mid: #120f18; --ink: #f4f1f8; --mute: #a59eb2; --line: rgba(255,255,255,.08);
  --wash: 10,8,15;
  width: 230px; height: 350px; border-radius: 20px; padding: 9px; overflow: hidden;
  background: var(--slab); border: 1px solid var(--slab-edge);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 2px 10px rgba(255,255,255,.10), inset 0 -6px 14px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.6);
  font-family: 'Sora', sans-serif; isolation: isolate;
}
[data-theme="light"] .ath-card.cC {
  --slab: rgba(255,255,255,.55); --slab-edge: rgba(255,255,255,.95);
  --in-top: #ffffff; --in-mid: #f3f0f7; --ink: #17121f; --mute: #8a8398; --line: rgba(23,18,31,.08);
  --wash: 255,255,255;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6), inset 0 2px 10px rgba(255,255,255,.9), inset 0 -6px 14px rgba(20,10,40,.10), 0 18px 40px rgba(30,20,60,.18);
}
.ath-card.cC::before { display: none; }              /* remove a colmeia do card antigo */
.ath-card.cC:hover, .ath-card.cC.active {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 22px 50px rgba(0,0,0,.7), 0 0 18px var(--tc) !important;
}
/* brilho do acrílico */
.cC::after {
  content: ''; position: absolute; inset: 0; border-radius: 20px; pointer-events: none; z-index: 15;
  background: linear-gradient(125deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 72%, rgba(255,255,255,.08) 86%, rgba(255,255,255,0) 100%);
}
[data-theme="light"] .cC::after {
  background: linear-gradient(125deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,0) 22%, rgba(255,255,255,0) 70%, rgba(255,255,255,.18) 86%, rgba(255,255,255,0) 100%);
}

/* ── plaquinha (nome da equipe) ── */
.cC .cC-plate {
  position: relative; height: 40px; margin-right: 40px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 10px; overflow: hidden;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='40'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='120' height='40' filter='url(%23n)'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #3a3740 0%, #26232b 48%, #1c1a20 52%, #2a272f 100%);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.7), inset 0 -1px 0 rgba(255,255,255,.08), 0 1px 0 rgba(255,255,255,.10);
}
[data-theme="light"] .cC .cC-plate { box-shadow: inset 0 2px 5px rgba(0,0,0,.65), inset 0 -1px 0 rgba(255,255,255,.10), 0 1px 0 rgba(255,255,255,.55); }
.cC .cC-plate::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 35%, rgba(255,255,255,0) 70%, rgba(255,255,255,.05) 100%); }
.cC .cC-plate .ath-edit-row { position: relative; z-index: 1; width: 100%; text-align: center; }
.cC .cC-plate .ath-team {
  font: 600 17px 'Sora', sans-serif; color: #f4f2f6; letter-spacing: -.2px; text-transform: none;
  white-space: nowrap; overflow: visible; text-overflow: clip; margin: 0; text-shadow: 0 1px 2px rgba(0,0,0,.6); cursor: text;
}
.cC .cC-plate .ath-edit-input { font-size: 12px !important; text-align: center; }

/* ── escudo à direita da plaquinha ── */
.cC .cC-badge {
  position: absolute; z-index: 2; right: 13px; top: 13px; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #2b2732, #141118); border: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.15);
}
[data-theme="light"] .cC .cC-badge { background: radial-gradient(circle at 35% 30%, #ffffff, #e9e6ef); border-color: rgba(0,0,0,.08); }
.cC .cC-badge img { width: 25px; height: 25px; object-fit: contain; }
.cC .cC-badge span { font: 900 8px 'Orbitron', monospace; color: var(--tc); }

/* ── carta interna ── */
.cC .cC-inner {
  position: relative; margin-top: 8px; height: calc(100% - 48px); border-radius: 12px; overflow: hidden;
  background: linear-gradient(180deg, var(--in-top) 0%, var(--in-mid) 52%, color-mix(in srgb, var(--tc) 38%, var(--in-mid)) 100%);
  box-shadow: inset 0 0 0 1px var(--line);
}
.cC .cC-inner::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tc); z-index: 6; }

/* fundo (cena tingida com a cor da equipe) */
.cC .cC-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cC .cC-bg .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; filter: grayscale(1) contrast(1.2) brightness(.75); }
[data-theme="light"] .cC .cC-bg .scene { filter: grayscale(1) contrast(1.15) brightness(1.05); }
.cC .cC-bg .tint { position: absolute; inset: 0; background: var(--tc); mix-blend-mode: color; opacity: .9; }
.cC .cC-bg .shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, var(--tc) 100%); mix-blend-mode: multiply; opacity: .55; }
.cC .cC-bg .wash { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(var(--wash),.88) 0%, rgba(var(--wash),.55) 42%, rgba(var(--wash),.2) 75%, rgba(var(--wash),.1) 100%); }
.cC .cC-bg .fog { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(0deg, color-mix(in srgb, var(--tc) 30%, var(--in-mid)) 0%, transparent 100%); }

/* foto do atleta (clique troca a foto) */
.cC .cC-photo { position: absolute; z-index: 1; right: 4px; bottom: 0; width: 150px; height: 255px; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; }
.cC .cC-photo img { height: 250px; width: auto; max-width: none; margin-right: -52px;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 38%); mask: linear-gradient(90deg, transparent 0, #000 38%); }
.cC .cC-photo img.sem-foto { height: 200px; margin-right: -20px; opacity: .55; }

/* coluna de dados */
.cC .cC-left { position: absolute; z-index: 3; left: 12px; top: 12px; bottom: 12px; width: 96px; display: flex; flex-direction: column; pointer-events: none; }
.cC .cC-left > * { pointer-events: auto; }
.cC .cC-left .ath-name {
  font: 700 16px 'Sora', sans-serif; color: var(--ink); line-height: 1.1; letter-spacing: -.3px; text-transform: none;
  white-space: nowrap; overflow: visible; text-overflow: clip; border: 0; padding: 0; text-shadow: 0 0 8px var(--in-mid), 0 0 2px var(--in-mid);
}
.cC .cC-left .ath-edit-input { font-size: 11px !important; }
.cC .cC-rating { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; font: 600 15px 'Sora', sans-serif; color: var(--ink); text-shadow: 0 0 8px var(--in-mid); }
.cC .cC-rating i { display: none; }   /* quadradinho de cor do K/D removido */
.cC .cC-rating small { font: 600 7px 'Sora', sans-serif; letter-spacing: 1px; color: var(--mute); margin-left: 1px; }
.cC .cC-list { margin-top: auto; display: flex; flex-direction: column; gap: 7px; }
.cC .cC-it { text-shadow: 0 0 8px var(--in-mid), 0 0 2px var(--in-mid); }
.cC .cC-it small { display: block; font: 600 6.5px 'Sora', sans-serif; letter-spacing: 1.1px; color: var(--mute); text-transform: uppercase; }
.cC .cC-it b { display: block; font: 600 13px 'Sora', sans-serif; color: var(--ink); line-height: 1.15; }

/* faixa vertical da direita */
.cC .cC-rail {
  position: absolute; z-index: 4; right: 0; top: 0; bottom: 3px; width: 20px; display: flex; flex-direction: column; align-items: center;
  padding: 32px 0 8px; border-left: 1px solid var(--line); background: color-mix(in srgb, var(--in-mid) 55%, transparent);
}
.cC .cC-rail .mono { writing-mode: vertical-rl; font: 500 6.5px ui-monospace, 'Courier New', monospace; letter-spacing: 1.4px; color: var(--ink); opacity: .8; white-space: nowrap; text-transform: uppercase; max-height: 170px; overflow: hidden; }
.cC .cC-rail .brand { margin-top: auto; writing-mode: vertical-rl; transform: rotate(180deg); font: 900 7px 'Orbitron', monospace; letter-spacing: 1.2px; color: var(--ink); white-space: nowrap; }
.cC .cC-rail .brand b { color: var(--tc); }

/* botão de virar: no topo da faixa direita (o canto superior é do escudo) */
.cC .ath-flip-btn { top: 60px; right: 11px; width: 20px; height: 20px; font-size: 11px; z-index: 16; }

/* menu (Scout / Mesclar / Excluir) acompanha o raio da carta */
.cC .ath-menu { border-radius: 0 0 20px 20px; z-index: 17; }
