:root {
  --bg-0: #0b0d12;
  --bg-1: #11141b;
  --bg-2: #161a23;
  --bg-3: #1d2230;
  --line: #262c3a;
  --text: #e7ebf3;
  --muted: #8a93a6;
  --gold: #f5c542;
  --gold-2: #ffd76a;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --orange: #f97316;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -100px, rgba(245, 197, 66, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(139, 92, 246, 0.07), transparent 60%),
    var(--bg-0);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button { font-family: inherit; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(245, 197, 66, 0.045), transparent 58%),
    linear-gradient(90deg, rgba(59, 130, 246, 0.04), transparent 42%),
    var(--bg-1);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 80% 18%, rgba(245, 197, 66, 0.22), transparent 26%),
    url("assets/coc-fankit-logo.png") no-repeat;
  background-position: center, right max(24px, calc((100vw - 1280px) / 2 + 24px)) top 18px;
  background-size: auto, clamp(260px, 27vw, 420px) auto;
  opacity: 0.20;
  filter: saturate(1.1);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(16, 19, 29, 0.98), rgba(16, 19, 29, 0.90) 54%, rgba(16, 19, 29, 0.76)),
    linear-gradient(180deg, rgba(8, 10, 16, 0.18), rgba(8, 10, 16, 0.64));
}
.hero-inner { position: relative; max-width: 1280px; margin: 0 auto; padding: 22px 28px 18px; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-icon {
  width: 64px; height: 64px; border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), #b8860b);
  display: grid; place-items: center; font-size: 32px; color: #1a1300;
  box-shadow: 0 6px 18px rgba(245, 197, 66, 0.25);
  position: relative;
  flex-shrink: 0;
}
.brand-icon.has-badge {
  width: 78px; height: 78px;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.brand-icon img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}
@media (max-width: 700px) {
  .brand-icon.has-badge { width: 64px; height: 64px; }
}
.brand-title { font-size: 27px; font-weight: 800; letter-spacing: 0.2px; }
.brand-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line);
  font-size: 12px; color: var(--muted); font-weight: 600;
}
.chip.live { color: #fff; background: linear-gradient(90deg, #ef4444, #f97316); border-color: transparent; }
.chip.tag { font-family: 'JetBrains Mono', monospace; color: var(--gold-2); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.stat {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 58%),
    var(--bg-1);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}
.stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 700; }
.stat-value { font-size: 24px; font-weight: 800; margin-top: 5px; line-height: 1.05; overflow-wrap: anywhere; }
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 6px; line-height: 1.25; }
.stat-value.win { color: var(--green); }
.stat-value.loss { color: var(--red); }
.stat-value.gold { color: var(--gold-2); }
.stat-value.warn { color: #f59e0b; }
.stat-value.info { color: #38bdf8; }
.ranked-glow {
  border-color: rgba(245, 197, 66, 0.48);
  box-shadow:
    0 0 0 1px rgba(245, 197, 66, 0.08),
    0 12px 30px rgba(245, 197, 66, 0.10),
    inset 0 1px rgba(255, 255, 255, 0.08);
}
.ranked-glow::after {
  content: "";
  position: absolute;
  inset: -70% -35%;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 42%, rgba(255, 255, 255, 0.18) 50%, transparent 58%);
  transform: translateX(-55%);
  animation: ranked-shine 4.8s ease-in-out infinite;
}
@keyframes ranked-shine {
  0%, 58% { transform: translateX(-55%); opacity: 0; }
  68% { opacity: 1; }
  86%, 100% { transform: translateX(55%); opacity: 0; }
}

/* Tabs */
.tabs {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 6px; padding: 9px 16px;
  background: rgba(11, 13, 18, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 600;
  white-space: nowrap; font-size: 14px; transition: all 0.15s;
}
.tab:hover { color: var(--text); background: var(--bg-2); }
.tab.active { color: #1a1300; background: linear-gradient(135deg, var(--gold), var(--gold-2)); }

/* Container */
.container { max-width: 1200px; margin: 0 auto; padding: 22px 16px 60px; }
.panel.hidden { display: none; }
.panel { animation: fade 0.25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.section-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--muted); margin: 22px 4px 10px;
}

/* Cards generic */
.card {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 16px; }

/* Round cards */
.rounds-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px;
}
.round {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; position: relative; overflow: hidden;
}
.round::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--muted);
}
.round.win::before { background: var(--green); }
.round.loss::before { background: var(--red); }
.round.live::before { background: linear-gradient(180deg, var(--gold), var(--orange)); }
.round-head { display: flex; justify-content: space-between; align-items: center; }
.round-num { font-weight: 800; font-size: 15px; }
.round-state { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.round-opp { font-size: 14px; color: var(--text); margin-top: 2px; opacity: 0.9; }
.round-score { display: flex; justify-content: space-between; align-items: end; margin-top: 12px; gap: 8px; }
.round-side { flex: 1; }
.round-side .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.round-side .stars { font-size: 22px; font-weight: 800; }
.round-side .destr { font-size: 12px; color: var(--muted); margin-top: 2px; }
.round-side.them { text-align: right; }
.round-vs { font-size: 12px; color: var(--muted); padding: 0 8px; }
.round-result {
  margin-top: 12px; font-size: 12px; font-weight: 700;
  padding: 6px 10px; border-radius: 8px; display: inline-block;
}
.result-win { background: rgba(34, 197, 94, 0.12); color: var(--green); }
.result-loss { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.result-live { background: rgba(245, 197, 66, 0.15); color: var(--gold-2); }

/* Tables */
.table-wrap {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); overflow-x: auto;
}
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: var(--bg-2); }
.table-wrap::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--line); }
.table-header {
  display: flex; gap: 8px; padding: 12px; flex-wrap: wrap; align-items: center;
  border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.search {
  flex: 1; min-width: 200px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 9px 12px; border-radius: 10px; font-size: 14px; outline: none;
}
.search:focus { border-color: var(--gold); }
.select {
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text);
  padding: 9px 12px; border-radius: 10px; font-size: 14px; outline: none;
}
.select:focus { border-color: var(--gold); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th {
  background: var(--bg-2); color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.6px; cursor: pointer; user-select: none;
}
th .arr { opacity: 0.4; margin-left: 4px; font-size: 10px; }
th.sorted .arr { opacity: 1; color: var(--gold-2); }
tr:hover td { background: rgba(255, 255, 255, 0.02); }
tr.us td { background: rgba(245, 197, 66, 0.04); }

.stars-cell { color: var(--gold-2); letter-spacing: 1px; font-size: 14px; }
.stars-cell .empty { color: #3a3f4d; }
.dest-bar {
  display: inline-block; width: 60px; height: 6px; background: var(--bg-3); border-radius: 4px; overflow: hidden;
  vertical-align: middle; margin-right: 8px;
}
.dest-bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--gold));
}
.dest-bar.full > i { background: linear-gradient(90deg, var(--green), #4ade80); }

.pos {
  display: inline-block; min-width: 28px; text-align: center;
  font-weight: 800; padding: 3px 6px; border-radius: 6px;
  background: var(--bg-3); color: var(--muted); font-size: 12px;
}
.pos.gold { background: rgba(245, 197, 66, 0.15); color: var(--gold-2); }
.pos.silver { background: rgba(180, 188, 208, 0.15); color: #cdd5e8; }
.pos.bronze { background: rgba(205, 127, 50, 0.18); color: #d6986a; }

.th-badge {
  display: inline-block; min-width: 26px; padding: 2px 6px; border-radius: 6px;
  background: var(--bg-3); color: var(--text); font-size: 11px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.tag-mono { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: 12px; }

/* Group cards */
.group-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
}
.clan-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; position: relative;
}
.clan-card.us { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(245, 197, 66, 0.25); }
.clan-card .name { font-weight: 700; font-size: 16px; }
.clan-card .tag { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-size: 12px; margin-top: 2px; }
.clan-card .meta { display: flex; gap: 10px; margin-top: 12px; }
.clan-card .meta div { flex: 1; }
.clan-card .meta .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.clan-card .meta .val { font-size: 18px; font-weight: 800; }
.us-badge {
  position: absolute; top: 10px; right: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1300; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.6px;
}

/* Player cards on ranking */
.podium {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 16px;
}
.podium-card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; text-align: center;
}
.podium-card.gold { border-color: rgba(245, 197, 66, 0.5); box-shadow: 0 0 0 1px rgba(245, 197, 66, 0.15); }
.podium-medal { font-size: 36px; line-height: 1; }
.podium-name { font-size: 18px; font-weight: 800; margin-top: 6px; }
.podium-score { font-size: 22px; color: var(--gold-2); font-weight: 800; margin-top: 4px; }
.podium-meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ===== Bônus CWL spotlight ===== */
.bonus-hero {
  position: relative;
  margin-top: 8px;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(245, 197, 66, 0.35);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(245, 197, 66, 0.18), transparent 70%),
    radial-gradient(500px 200px at 100% 100%, rgba(249, 115, 22, 0.12), transparent 70%),
    linear-gradient(180deg, #1a1505, #11141b 70%);
  box-shadow: 0 12px 40px rgba(245, 197, 66, 0.08), inset 0 0 0 1px rgba(255, 215, 106, 0.05);
  overflow: hidden;
}
.bonus-hero::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, transparent 0 24px, rgba(245, 197, 66, 0.03) 24px 25px);
  pointer-events: none;
}
.bonus-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 16px;
  flex-wrap: wrap; position: relative;
}
.bonus-eyebrow { font-size: 12px; color: var(--gold-2); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.bonus-title { font-size: 26px; font-weight: 800; margin-top: 4px; }
.bonus-sub { font-size: 13px; color: var(--muted); margin-top: 4px; max-width: 560px; }

.bonus-control { display: flex; align-items: center; gap: 8px; }
.bonus-control-lbl { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
.bonus-select { min-width: 70px; }

.bonus-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px; margin-top: 18px; position: relative;
}
.bonus-card {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px;
  padding: 14px 14px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.10), rgba(249, 115, 22, 0.06));
  border: 1px solid rgba(245, 197, 66, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.bonus-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245, 197, 66, 0.15); }
.bonus-card.top {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.22), rgba(249, 115, 22, 0.12));
  border-color: rgba(245, 197, 66, 0.5);
}
.bonus-rank {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.35); color: var(--gold-2); font-weight: 800; font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
}
.bonus-card.top .bonus-rank {
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #1a1300;
}
.bonus-info { min-width: 0; }
.bonus-name { font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bonus-stats { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bonus-score { text-align: right; }
.bonus-score-val { font-weight: 800; font-size: 16px; color: var(--gold-2); }
.bonus-score-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.bonus-medal { font-size: 22px; filter: drop-shadow(0 2px 4px rgba(245, 197, 66, 0.4)); }

.bonus-next {
  margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding-top: 14px; border-top: 1px dashed rgba(245, 197, 66, 0.2); position: relative;
}
.bonus-next-lbl { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.bonus-next-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: var(--bg-3); color: var(--muted); border: 1px solid var(--line);
}

/* ===== Ranking banner ===== */
.rank-banner {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-radius: 14px; margin-bottom: 16px;
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.12), rgba(245, 197, 66, 0.02));
  border: 1px solid rgba(245, 197, 66, 0.25);
}
.rank-banner-eyebrow { font-size: 11px; color: var(--gold-2); font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.rank-banner-title { font-size: 18px; font-weight: 800; }
.rank-banner-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rank-banner-right { display: flex; flex-wrap: wrap; gap: 6px; max-width: 60%; }
.rank-chip {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: rgba(245, 197, 66, 0.12); color: var(--gold-2);
  border: 1px solid rgba(245, 197, 66, 0.3); font-weight: 600;
  white-space: nowrap;
}

/* Bonus row styling in tables */
tr.bonus-row td { background: rgba(245, 197, 66, 0.06); }
tr.bonus-row:hover td { background: rgba(245, 197, 66, 0.10); }
tr.bonus-row td:first-child { box-shadow: inset 3px 0 0 var(--gold); }

.bonus-tag {
  display: inline-block; margin-left: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: #1a1300;
  vertical-align: middle;
}

/* ===== Visão Geral V2 (clean) ===== */
.highlights-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px;
  margin-bottom: 18px;
}
.hl-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: 16px;
  padding: 18px;
}
.hl-card-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px dashed var(--line);
}
.hl-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.2), rgba(249, 115, 22, 0.1));
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.hl-card-title { font-size: 16px; font-weight: 800; }
.hl-card-sub { font-size: 12px; color: var(--muted); }
.hl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hl-item {
  display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 8px;
  transition: background 0.15s;
}
.hl-item:hover { background: var(--bg-3); }
.hl-item.first {
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.10), transparent);
  border: 1px solid rgba(245, 197, 66, 0.18);
}
.hl-pos { font-size: 16px; font-weight: 800; text-align: center; color: var(--muted); }
.hl-player { display: flex; flex-direction: column; min-width: 0; }
.hl-player-main { display: flex; align-items: center; gap: 7px; min-width: 0; }
.hl-player-name { font-weight: 700; font-size: 14px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.08; overflow-wrap: anywhere; }
.hl-player-th { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.hl-primary { font-weight: 800; color: var(--gold-2); font-size: 15px; white-space: nowrap; grid-column: 3; grid-row: 1; }
.hl-secondary { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; white-space: nowrap; grid-column: 3; grid-row: 2; justify-self: end; margin-top: -2px; }
.hl-empty { padding: 16px; text-align: center; color: var(--muted); font-size: 13px; }
.ranked-icon {
  width: 24px; height: 24px; flex: 0 0 24px;
  display: inline-grid; place-items: center;
  border-radius: 7px 7px 10px 10px;
  border: 1px solid rgba(255,255,255,0.24);
  box-shadow: inset 0 1px rgba(255,255,255,0.28), 0 3px 8px rgba(0,0,0,0.28);
  position: relative;
  overflow: hidden;
}
.ranked-icon::before {
  content: "⚔";
  font-size: 13px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.45));
}
.ranked-icon::after {
  content: "";
  position: absolute; inset: auto 5px 3px;
  height: 3px; border-radius: 999px;
  background: rgba(255,255,255,0.55);
}
.ranked-icon.dragon {
  background:
    radial-gradient(circle at 35% 20%, #ffe88a, transparent 24px),
    linear-gradient(145deg, #ffb238, #c33122 58%, #5b1120);
}
.ranked-icon.titan {
  background:
    radial-gradient(circle at 35% 20%, #d9f7ff, transparent 23px),
    linear-gradient(145deg, #75d5ff, #1e6fb9 58%, #17245a);
}
.ranked-icon.legend {
  background:
    radial-gradient(circle at 35% 20%, #fff4b8, transparent 23px),
    linear-gradient(145deg, #ffc94a, #7b2cff 58%, #2a123e);
}
.ranked-icon.unknown {
  background: linear-gradient(145deg, #9ca3af, #374151);
}
.ranked-icon-img {
  width: 36px; height: 36px; flex: 0 0 36px;
  object-fit: contain;
  margin: -4px 0;
  filter: drop-shadow(0 3px 4px rgba(0,0,0,0.55));
}

/* Bonus strip compacto (substitui o megabanner) */
.bonus-strip {
  background: linear-gradient(90deg, rgba(245, 197, 66, 0.08), rgba(245, 197, 66, 0.02));
  border: 1px solid rgba(245, 197, 66, 0.25);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 18px;
}
.bonus-strip-head {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  margin-bottom: 10px;
}
.bonus-strip-sub { font-size: 12px; color: var(--muted); }
.bonus-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bonus-chip-mini {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: var(--bg-3); border: 1px solid var(--line);
  font-size: 12px;
}
.bonus-chip-mini.top {
  background: rgba(245, 197, 66, 0.12);
  border-color: rgba(245, 197, 66, 0.3);
}
.bcm-rank { font-weight: 800; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.bonus-chip-mini.top .bcm-rank { color: var(--gold-2); }
.bcm-name { font-weight: 600; }
.bcm-meta { color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: 11px; }

.activity-mini {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.activity-mini-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1;
}
.ami-icon { font-family: 'Inter', system-ui, sans-serif; font-size: 11px; opacity: 0.9; }
.ami-value { color: #aab6d3; font-weight: 700; }

/* Roster toolbar */
.roster-toolbar {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px;
}
.roster-toolbar .search { flex: 1; min-width: 220px; }

/* ===== V2 Clã ===== */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty-text { font-size: 14px; max-width: 480px; margin: 0 auto; }

.activity-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 18px;
}
.sum-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px;
}
.sum-card.good { border-color: rgba(34, 197, 94, 0.3); background: linear-gradient(180deg, rgba(34, 197, 94, 0.06), var(--bg-1)); }
.sum-card.info { border-color: rgba(56, 189, 248, 0.32); background: linear-gradient(180deg, rgba(56, 189, 248, 0.06), var(--bg-1)); }
.sum-card.warn { border-color: rgba(245, 197, 66, 0.3); background: linear-gradient(180deg, rgba(245, 197, 66, 0.06), var(--bg-1)); }
.sum-card.bad { border-color: rgba(239, 68, 68, 0.3); background: linear-gradient(180deg, rgba(239, 68, 68, 0.06), var(--bg-1)); }
.sum-title { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.sum-value { font-size: 28px; font-weight: 800; margin-top: 4px; }
.sum-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }

.act-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.4px; text-transform: uppercase;
}
.act-badge.act-engaged, .act-badge.act-active { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.act-badge.act-participating { background: rgba(56, 189, 248, 0.14); color: #38bdf8; }
.act-badge.act-oscillating, .act-badge.act-warm { background: rgba(245, 197, 66, 0.15); color: var(--gold-2); }
.act-badge.act-absent, .act-badge.act-inactive { background: rgba(239, 68, 68, 0.15); color: #f87171; }

tr.act-engaged td:first-child, tr.act-active td:first-child { box-shadow: inset 3px 0 0 var(--green); }
tr.act-participating td:first-child { box-shadow: inset 3px 0 0 #38bdf8; }
tr.act-oscillating td:first-child, tr.act-warm td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
tr.act-absent td:first-child, tr.act-inactive td:first-child { box-shadow: inset 3px 0 0 var(--red); }

.act-bar {
  display: inline-block; width: 80px; height: 6px; background: var(--bg-3); border-radius: 4px; overflow: hidden;
  vertical-align: middle; margin-right: 6px;
}
.act-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #ef4444 0%, #f97316 30%, #f5c542 60%, #22c55e 100%); }

.role-tag {
  display: inline-block; margin-left: 6px;
  font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: var(--bg-3); color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px;
}

.pref { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.6px; }
.pref-in { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.pref-out { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.mono-mini { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.muted { color: var(--muted); }

.formula-note {
  margin-top: 16px; padding: 12px 16px; border-radius: 12px;
  background: var(--bg-2); border: 1px dashed var(--line); font-size: 12px; color: var(--muted);
}

/* Clan header */
.clan-header {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 20px;
}
.clan-h-title { font-size: 22px; font-weight: 800; }
.clan-h-sub { font-size: 13px; color: var(--muted); margin-top: 2px; font-family: 'JetBrains Mono', monospace; }
.clan-h-desc { font-size: 13px; color: var(--text); margin-top: 8px; opacity: 0.85; max-width: 600px; }
.clan-h-stats { display: flex; gap: 16px; flex-wrap: wrap; }
.mini-stat { min-width: 80px; }
.mini-lbl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 600; }
.mini-val { font-size: 18px; font-weight: 800; margin-top: 2px; }

/* Roster grid */
.roster-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px;
}
.member-card {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; position: relative;
}
.member-card.act-engaged, .member-card.act-active { border-left: 3px solid var(--green); }
.member-card.act-participating { border-left: 3px solid #38bdf8; }
.member-card.act-oscillating, .member-card.act-warm { border-left: 3px solid var(--gold); }
.member-card.act-absent, .member-card.act-inactive { border-left: 3px solid var(--red); opacity: 0.92; }

.m-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.m-name { font-size: 16px; font-weight: 700; }
.m-tag { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.m-th .th-badge.big { font-size: 13px; padding: 5px 10px; }

.m-row { display: flex; gap: 12px; flex-wrap: wrap; }
.m-row .mini-stat { flex: 1; min-width: 70px; }

.heroes { display: flex; flex-wrap: wrap; gap: 5px; }
.hero-badge {
  font-size: 11px; padding: 3px 7px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; font-weight: 600;
  background: var(--bg-3); color: var(--text);
}
.hero-badge.maxed { background: rgba(34, 197, 94, 0.18); color: #4ade80; }
.hero-badge.good { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.hero-badge.warn { background: rgba(245, 197, 66, 0.18); color: var(--gold-2); }
.hero-badge.bad { background: rgba(239, 68, 68, 0.18); color: #f87171; }

.progress-row { display: flex; gap: 8px; }
.pb { flex: 1; }
.pb-lbl { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.pb-bar { height: 5px; border-radius: 3px; background: var(--bg-3); overflow: hidden; }
.pb-bar > i { display: block; height: 100%; background: var(--blue); }
.pb-bar.maxed > i { background: var(--green); }
.pb-bar.good > i { background: var(--blue); }
.pb-bar.warn > i { background: var(--gold); }
.pb-bar.bad > i { background: var(--red); }

.activity-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 6px; border-top: 1px dashed var(--line); }
.m-score { font-size: 11px; font-weight: 700; color: var(--muted); }

/* War log result row */
tr.wl-win td:first-child { box-shadow: inset 3px 0 0 var(--green); }
tr.wl-lose td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.wl-tie td:first-child { box-shadow: inset 3px 0 0 var(--muted); }

/* Capital ranking */
.capital-grid { display: flex; flex-direction: column; gap: 6px; }
.cap-card {
  display: grid; grid-template-columns: 50px 1fr 200px 100px; align-items: center; gap: 10px;
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.cap-rank { font-family: 'JetBrains Mono', monospace; color: var(--muted); font-weight: 700; }
.cap-name { font-weight: 700; }
.cap-stats { font-size: 11px; }
.cap-bar { height: 8px; background: var(--bg-3); border-radius: 4px; overflow: hidden; }
.cap-bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--blue)); }
.cap-val { text-align: right; font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--gold-2); }

@media (max-width: 700px) {
  .cap-card { grid-template-columns: 40px 1fr auto; }
  .cap-bar { display: none; }
}

@media (max-width: 1180px) {
  .hero-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

/* Footer */
.foot {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 24px 16px; border-top: 1px solid var(--line);
}
.foot .dot { margin: 0 8px; }

/* Responsive */
@media (max-width: 700px) {
  .brand-title { font-size: 20px; }
  .podium { grid-template-columns: 1fr; }
  th, td { padding: 8px 6px; font-size: 12px; }
  .hero-inner { padding: 16px 14px 12px; }
  .container { padding: 16px 12px 50px; }
  .tabs { padding: 8px 10px; }
  .tab { padding: 7px 10px; font-size: 13px; }
  .activity-summary { grid-template-columns: repeat(2, 1fr); }
  .clan-h-stats { gap: 10px; }
  .mini-val { font-size: 16px; }

  /* Hero stats compactos: priorizar conteúdo dos rankings */
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; }
  .stat { padding: 8px 10px; }
  .stat-label { font-size: 9px; letter-spacing: 0.4px; }
  .stat-value { font-size: 14px; margin-top: 2px; }
  .stat-sub { display: none; }
}
@media (max-width: 480px) {
  .brand-title { font-size: 18px; }
  .brand-sub { font-size: 12px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .hl-item { grid-template-columns: 28px 1fr auto; }
  .hl-secondary { grid-column: 2 / -1; text-align: right; padding-top: 2px; }
}
