/* Player cards (Club.cardHtml in js/club.js): style A frames + pack chips. Loaded after css/style.css. */

/* ---- Style A frames (owner 26/11/2026): one painted frame per tier, img/card-<tier>.webp (360 x 505, cut by
   .ai/scripts/bd-card-frames.py). Every frame shares the same layout, so rating / club / face / name / stats are placed
   once in % of the card and sized in cqw (1cqw = 1% of the card width). ---- */
.fc-card {
  --frame: url(../img/card-bronze.webp);
  --ink-r: #fff; --ink-n: #2a1708; --ink-s: #fff;
  position: relative; width: 132px; aspect-ratio: 360 / 505; flex: none; container-type: inline-size;
  background: var(--frame) center / 100% 100% no-repeat;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 1;
}
.fc-card.t-silver { --frame: url(../img/card-silver.webp); --ink-n: #1d2733; }
.fc-card.t-gold { --frame: url(../img/card-gold.webp); --ink-r: #3a2600; --ink-n: #3a2600; }
.fc-card.t-elite { --frame: url(../img/card-elite.webp); --ink-n: #fff; }
.fc-card.t-epic { --frame: url(../img/card-epic.webp); --ink-n: #fff; }
.fc-card.t-legend { --frame: url(../img/card-legend.webp); --ink-r: #3a2600; --ink-n: #3a2600; }
.fc-card.k-totw { --frame: url(../img/card-totw.webp); --ink-r: #fff; --ink-n: #fff; }
.fc-card.k-icon { --frame: url(../img/card-icon.webp); --ink-r: #3a2600; --ink-n: #3a2600; }
.fc-card:not(.sm) { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }

/* Light ink gets a dark rim, dark ink a light one: readable on any part of the painted panels. */
.fc-ovr, .fc-pos, .fc-name, .fc-stats { --rim: rgba(0, 0, 0, .55); }
.fc-card.t-gold .fc-ovr, .fc-card.t-gold .fc-pos, .fc-card.t-legend .fc-ovr, .fc-card.t-legend .fc-pos, .fc-card.k-icon .fc-ovr, .fc-card.k-icon .fc-pos,
.fc-card.t-bronze .fc-name, .fc-card.t-silver .fc-name, .fc-card.t-gold .fc-name, .fc-card.t-legend .fc-name, .fc-card.k-icon .fc-name { --rim: rgba(255, 255, 255, .55); }

.fc-top { display: contents; }
.fc-ovr, .fc-pos, .fc-flag { position: absolute; left: 11.5%; width: 23%; text-align: center; z-index: 2; color: var(--ink-r); text-shadow: 0 .4cqw 0 var(--rim), 0 0 1.5cqw var(--rim); }
.fc-ovr { top: 13.5%; font-size: max(20px, 17cqw); font-weight: 900; letter-spacing: -.5cqw; }
.fc-pos { top: 27%; font-size: max(12px, 9cqw); font-weight: 900; }
.fc-flag { top: 34%; font-size: max(11px, 8cqw); text-shadow: none; }
/* Club short code inside the painted shield (top right). */
.fc-club {
  position: absolute; left: 67.6%; top: 14.6%; width: 16.6%; height: 11.6%; z-index: 2;
  display: grid; place-items: center; padding-bottom: 2.5%; box-sizing: border-box;
  font-size: max(9px, 7cqw); font-weight: 900; letter-spacing: -.3cqw; white-space: nowrap; overflow: hidden;
  text-shadow: 0 0 1cqw rgba(0, 0, 0, .35);
}
.fc-club::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--club, #2c66c7); clip-path: polygon(0 0, 100% 0, 100% 64%, 50% 100%, 0 64%); }
.fc-face { position: absolute; left: 31%; right: 13%; top: 18%; height: 43.5%; z-index: 1; display: grid; place-items: end center; font-size: 22cqw; }
.fc-face .fc-pic {
  height: 100%; max-width: 100%; object-fit: contain; object-position: 50% 100%; display: block;
  image-rendering: pixelated; image-rendering: crisp-edges; filter: drop-shadow(0 1cqw 1.5cqw rgba(0, 0, 0, .35));
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}
.fc-name {
  position: absolute; left: 17%; right: 17%; top: 61.3%; height: 8.6%; z-index: 2;
  text-align: center; line-height: 12cqw; font-size: max(12px, 9.6cqw); font-weight: 900;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-n); text-shadow: 0 0 1.2cqw var(--rim);
}
.fc-stats { position: absolute; left: 13.5%; right: 13.5%; top: 72.2%; height: 12.6%; z-index: 2; display: grid; grid-template-columns: repeat(4, 1fr); color: var(--ink-s); }
.fc-stats span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4cqw; font-size: max(8px, 6.5cqw); font-weight: 800; text-shadow: 0 0 1cqw var(--rim); }
.fc-stats span + span { box-shadow: inset .5cqw 0 0 color-mix(in srgb, var(--ink-s) 30%, transparent); }
.fc-stats b { font-size: max(12px, 10.5cqw); font-weight: 900; }

.fc-badge { position: absolute; left: 50%; top: 2%; transform: translateX(-50%); z-index: 3; font-style: normal; font-size: max(10px, 7cqw); font-weight: 900; padding: 1cqw 5cqw; border-radius: 0 0 3cqw 3cqw; background: #e0313f; color: #fff; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
/* TOTW / ICON ribbon under the bottom laurel, upgrade level on the face panel, legend era under the shield. */
.fc-kind { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 3; font-size: max(8px, 5.4cqw); font-weight: 900; letter-spacing: .6cqw; padding: .8cqw 4cqw; border-radius: 3cqw; color: #fff; background: rgba(0, 0, 0, .55); }
.fc-card.k-icon .fc-kind { background: #b8860b; }
.fc-card.k-totw .fc-kind { background: #1c7c43; }
.fc-lv { position: absolute; left: 12%; top: 51%; z-index: 3; font-size: max(10px, 7cqw); font-weight: 900; color: #fff; background: #2c66c7; padding: .8cqw 3cqw; border-radius: 3cqw; }
.fc-era { position: absolute; left: 12%; top: 43%; z-index: 2; font-size: max(9px, 6cqw); font-weight: 900; letter-spacing: .3cqw; padding: .6cqw 2.4cqw; border-radius: 2.4cqw; background: rgba(0, 0, 0, .4); color: #fff; }
.fc-card.t-legend .fc-era, .fc-card.k-icon .fc-era { background: #b8860b; }
.fc-card.sm { width: 124px; }

/* Moving shine over the inner panel: big single cards of the top tiers only (pack opening, card detail). */
.fc-card.t-elite::before, .fc-card.t-epic::before, .fc-card.t-legend::before, .fc-card.k-icon::before, .fc-card.k-totw::before {
  content: ''; position: absolute; left: 9%; right: 9%; top: 13.5%; bottom: 14%; z-index: 1; pointer-events: none; border-radius: 3cqw;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .45) 50%, transparent 60%) 0 0 / 300% 100% no-repeat;
  mix-blend-mode: soft-light; animation: fcSweep 3.2s ease-in-out infinite;
}
@keyframes fcSweep { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .fc-card::before { animation: none !important; } }

/* ---- collection chips, store pack, pack opening ---- */
.ct.t-epic { background: #4a1c8c; color: #f2dcff; }
.ct.t-legend { background: linear-gradient(135deg, #fff6d6, #d9b24e); color: #3a2600; }
.p-classic .st-art {
  background: linear-gradient(160deg, #ffffff, #f3dc94 45%, #b8860b);
  box-shadow: 0 8px 24px rgba(255, 205, 90, .6), inset 0 0 0 2px #fff;
}
.p-classic .st-art::before { content: '👑'; opacity: .22; }
.p-classic .st-art span, .p-classic .st-art small { color: #3a2600; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
/* Gói Siêu Sao Vũ Trụ (04/11/2026): night sky with twinkling stars */
.p-cosmic .st-art {
  background: radial-gradient(circle at 25% 20%, rgba(255, 255, 255, .9) 0 1.5px, transparent 2px), radial-gradient(circle at 75% 35%, #ffe14d 0 1.5px, transparent 2px),
    radial-gradient(circle at 60% 80%, #7fe9ff 0 1.5px, transparent 2px), linear-gradient(160deg, #3a1f8a, #120a33 60%, #2a0f4a);
  box-shadow: 0 8px 26px rgba(150, 100, 255, .65), inset 0 0 0 2px #ffd34d;
}
.p-cosmic .st-art span, .p-cosmic .st-art small { color: #fff3b0; text-shadow: 0 0 8px rgba(255, 210, 63, .8); }
.pk-slot.open.t-epic .pk-front { filter: drop-shadow(0 0 24px rgba(190, 110, 255, .95)); animation: elitePop .7s ease-out; }
.pk-slot.open.t-legend .pk-front { filter: drop-shadow(0 0 30px rgba(255, 220, 120, 1)); animation: elitePop .9s ease-out; }

/* ---- Performance (owner 22/11/2026: "Danh sách" froze the phone) ----
   Small cards live in lists of up to 240 (Danh sách / Bộ sưu tập / Chuyển nhượng): the epic sweep, the legend iridescence
   (a registered custom property = repaint every frame) and the elite conic glow ran on EVERY card → 60–120 cards repainted
   per frame. Lists show the frame still; the moving shine is kept for big single cards (pack opening, card detail). */
.fc-card.sm::before { display: none; }