*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a12;
  --card: #111120;
  --card-border: rgba(255,255,255,0.07);
  --gold: #C89B3C;
  --green: #00c853;
  --red: #ff1744;
  --cyan: #4fc3f7;
  --text: #ccd3da;
  --muted: #6b7a8d;
  --font: 'Inter', sans-serif;
}

body { background: var(--bg); color: var(--text); font-family: var(--font); min-height: 100vh; overflow-x: hidden; }

/* Background */
#bg { position: fixed; inset: 0; z-index: 0; }
.bg-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; animation: bgFade 32s infinite; }
.bg-img:nth-child(1) { animation-delay: 0s; }
.bg-img:nth-child(2) { animation-delay: 8s; }
.bg-img:nth-child(3) { animation-delay: 16s; }
.bg-img:nth-child(4) { animation-delay: 24s; }
.bg-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,10,18,0.85) 0%, rgba(10,10,18,0.75) 50%, rgba(10,10,18,0.92) 100%); }
@keyframes bgFade {
  0%,100% { opacity: 0; }
  8%,33%  { opacity: 1; }
  41%     { opacity: 0; }
}

/* App layout */
#app { position: relative; z-index: 1; max-width: 1400px; margin: 0 auto; padding: 24px 20px 40px; }

/* Header */
header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
h1 { font-size: 2.8rem; font-weight: 800; color: var(--gold); letter-spacing: 4px; line-height: 1; text-shadow: 0 0 30px rgba(200,155,60,0.4); }
.subtitle { font-size: 0.7rem; letter-spacing: 3px; color: var(--muted); text-transform: uppercase; display: block; margin-top: 4px; }
.header-right { display: flex; align-items: center; gap: 10px; padding-top: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status-dot.ok { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-dot.err { background: var(--red); }
#api-label { font-size: 0.75rem; color: var(--muted); }
#btn-refresh { background: transparent; border: 1px solid var(--gold); color: var(--gold); padding: 6px 14px; border-radius: 20px; cursor: pointer; font-size: 0.8rem; font-family: var(--font); transition: all .2s; }
#btn-refresh:hover { background: rgba(200,155,60,0.15); }
#btn-refresh:disabled { opacity: .5; cursor: not-allowed; }
#last-updated { font-size: 0.7rem; color: var(--muted); text-align: right; margin-bottom: 20px; }

/* Summary */
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: rgba(17,17,32,0.7); border: 1px solid var(--card-border); border-radius: 10px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; backdrop-filter: blur(8px); }
.stat-icon { font-size: 1.4rem; }
.stat-label { font-size: 0.65rem; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.stat-value { font-size: 1.3rem; font-weight: 700; color: var(--text); margin-top: 2px; }
.stat-value.green { color: var(--green); }
.stat-value.cyan  { color: var(--cyan); }
.stat-value.gold  { color: var(--gold); }

/* Players grid */
.players-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.loading { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 40px; }

/* Player card */
.card { background: rgba(17,17,32,0.8); border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; backdrop-filter: blur(8px); transition: border-color .2s; }
.card:hover { border-color: rgba(200,155,60,0.3); }
.card.in-game { border-color: rgba(0,200,83,0.4); }

/* Card header */
.card-head { padding: 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--card-border); }
.avatar-wrap { position: relative; flex-shrink: 0; }
.avatar { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--card-border); object-fit: cover; background: #1a1a2e; }
.avatar-letter { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--card-border); background: #1a1a2e; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700; color: var(--gold); }
.level-badge { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); background: #1a1a2e; border: 1px solid var(--card-border); border-radius: 8px; font-size: 0.6rem; padding: 1px 5px; color: var(--muted); white-space: nowrap; }
.card-name { flex: 1; min-width: 0; }
.summoner-name { font-size: 0.95rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-bottom: 3px; }
.rank-text { font-size: 0.78rem; font-weight: 500; margin-top: 2px; }
.rank-text.IRON      { color: #7a6a5a; }
.rank-text.BRONZE    { color: #a0522d; }
.rank-text.SILVER    { color: #a0a8b0; }
.rank-text.GOLD      { color: #d4aa40; }
.rank-text.PLATINUM  { color: #5eb8c0; }
.rank-text.EMERALD   { color: #2ecc71; }
.rank-text.DIAMOND   { color: #7aa5d2; }
.rank-text.MASTER    { color: #9b59b6; }
.rank-text.GRANDMASTER { color: #e74c3c; }
.rank-text.CHALLENGER  { color: #f1c40f; }
.rank-text.unranked  { color: var(--muted); }
.in-game-badge { font-size: 0.6rem; background: rgba(0,200,83,0.15); border: 1px solid rgba(0,200,83,0.4); color: var(--green); padding: 2px 6px; border-radius: 4px; }
.card-refresh-btn { margin-left: auto; flex-shrink: 0; background: transparent; border: 1px solid var(--card-border); color: var(--muted); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; transition: all .2s; align-self: flex-start; }
.card-refresh-btn:hover { border-color: var(--gold); color: var(--gold); transform: rotate(30deg); }
.card-refresh-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.ext-links { display: flex; gap: 6px; }
.ext-link { font-size: 0.65rem; color: var(--muted); text-decoration: none; padding: 3px 6px; border: 1px solid var(--card-border); border-radius: 4px; transition: color .2s, border-color .2s; white-space: nowrap; }
.ext-link:hover { color: var(--gold); border-color: var(--gold); }

/* Stats row */
.card-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px 16px; gap: 4px; border-bottom: 1px solid var(--card-border); }
.stat-mini { text-align: center; }
.stat-mini-label { font-size: 0.6rem; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.stat-mini-val { font-size: 0.95rem; font-weight: 600; margin-top: 2px; }
.stat-mini-sub { font-size: 0.65rem; color: var(--muted); }

/* Match history */
.matches-title { font-size: 0.6rem; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; padding: 10px 16px 4px; }
.match-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 13px;
  border-left: 3px solid transparent;
  transition: background .15s;
  text-decoration: none; color: inherit;
  cursor: pointer;
}
.match-row:hover { background: rgba(255,255,255,0.05); }
a.match-row:hover { background: rgba(255,255,255,0.07); }
.match-row.win  { border-left-color: var(--green); }
.match-row.loss { border-left-color: var(--red); }
.match-champ { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--card-border); flex-shrink: 0; background: #1a1a2e; }
.match-main { flex: 1; min-width: 0; overflow: hidden; }
.match-top { display: flex; align-items: center; gap: 5px; overflow: hidden; }
.match-bot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 3px; }
.match-result { font-size: 0.65rem; font-weight: 700; flex-shrink: 0; width: 10px; }
.match-result.win  { color: var(--green); }
.match-result.loss { color: var(--red); }
.match-kda { font-size: 0.73rem; font-weight: 600; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.match-queue { font-size: 0.56rem; background: rgba(255,255,255,0.06); border-radius: 3px; padding: 1px 4px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.match-time { font-size: 0.56rem; color: var(--muted); white-space: nowrap; margin-left: auto; flex-shrink: 0; }
.match-bot-stats { display: flex; gap: 3px; align-items: center; flex-shrink: 0; }
.match-stat { font-size: 0.58rem; color: var(--muted); white-space: nowrap; }
.match-items { display: flex; gap: 2px; flex-shrink: 0; }
.item-icon { width: 16px; height: 16px; border-radius: 2px; object-fit: cover; background: rgba(255,255,255,0.05); }
.item-empty { width: 16px; height: 16px; border-radius: 2px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); }
.no-matches { font-size: 0.72rem; color: var(--muted); padding: 12px 16px; text-align: center; }

/* In-game badge clickable */
.in-game-badge { cursor: pointer; }
.in-game-badge:hover { opacity: .8; text-decoration: underline; }

/* Match row clickable */
.match-row.clickable { cursor: pointer; }
.match-row.clickable:hover { background: rgba(255,255,255,0.06); }

/* ── Modal ─────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #0e0e1c; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; width: min(980px,96vw);
  max-height: 90vh; overflow-y: auto;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,0.07); position: sticky; top:0; background:#0e0e1c; z-index:1;
}
.modal-meta { display: flex; align-items: center; gap: 8px; }
.modal-queue { font-size:.88rem; font-weight:700; color:var(--gold); }
.modal-sep { color:var(--muted); }
.modal-dur,.modal-date { font-size:.78rem; color:var(--muted); }
.modal-close {
  background:transparent; border:1px solid rgba(255,255,255,0.12);
  color:var(--muted); width:30px; height:30px; border-radius:50%;
  cursor:pointer; font-size:.85rem; transition:all .2s;
}
.modal-close:hover { border-color:var(--red); color:var(--red); }
.modal-loading { padding:60px; text-align:center; color:var(--muted); font-size:.9rem; }
.modal-teams { display:grid; grid-template-columns:1fr 1fr; }
.modal-team:first-child { border-right:1px solid rgba(255,255,255,0.07); }
.team-hdr {
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 14px; font-size:.72rem; font-weight:600; margin-bottom:2px;
}
.team-hdr.win  { background:rgba(0,200,83,0.1);  color:var(--green); }
.team-hdr.loss { background:rgba(255,23,68,0.08); color:var(--red); }
.team-kills { font-size:.68rem; font-weight:400; opacity:.8; }
.mp-row {
  display:flex; align-items:center; gap:7px;
  padding:5px 14px; transition:background .1s;
}
.mp-row:hover { background:rgba(255,255,255,0.04); }
.mp-champ { width:28px; height:28px; border-radius:50%; object-fit:cover; flex-shrink:0; border:1px solid rgba(255,255,255,0.1); }
.mp-name { font-size:.7rem; color:var(--text); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; }
.mp-link:hover { color:var(--gold); text-decoration:underline; }
.mp-kda { font-size:.72rem; font-weight:600; white-space:nowrap; flex-shrink:0; min-width:52px; text-align:center; color:var(--text); }
.mp-kda.perfect { color:var(--gold); }
.mp-cs { font-size:.62rem; color:var(--muted); white-space:nowrap; flex-shrink:0; min-width:36px; }
.mp-items { display:flex; gap:2px; flex-shrink:0; }
.mp-item { width:18px; height:18px; border-radius:3px; object-fit:cover; vertical-align:middle; }
.mp-item-empty { display:inline-block; width:18px; height:18px; border-radius:3px; background:rgba(255,255,255,0.05); }
.mp-dmg-wrap { display:flex; align-items:center; gap:5px; flex-shrink:0; width:90px; }
.mp-dmg-bar { height:5px; border-radius:3px; min-width:2px; transition:width .4s; }
.mp-dmg-bar.win-bar  { background:var(--green); }
.mp-dmg-bar.loss-bar { background:var(--red); opacity:.7; }
.mp-dmg-val { font-size:.58rem; color:var(--muted); white-space:nowrap; }
@media (max-width:640px) {
  .modal-teams { grid-template-columns:1fr; }
  .modal-team:first-child { border-right:none; border-bottom:1px solid rgba(255,255,255,0.07); }
  .mp-dmg-wrap { display:none; }
}

/* Live game badge */
.live-badge { font-size:.82rem; font-weight:700; color:#ff1744; animation:livePulse 1.2s infinite; }
@keyframes livePulse { 0%,100%{opacity:1} 50%{opacity:.35} }
.team-hdr.live-blue { background:rgba(91,155,213,0.13); color:#5b9bd5; }
.team-hdr.live-red  { background:rgba(192,57,43,0.13);  color:#e74c3c; }
.mp-champ-lbl { font-size:.62rem; color:var(--muted); white-space:nowrap; flex-shrink:0; }

/* ── Slot machine ──────────────────────────────────── */
.slot-btn {
  background: linear-gradient(135deg,#2c1654,#1a0d2e);
  border: 1px solid rgba(180,100,255,0.4); color: #d4aaff;
  padding: 7px 18px; border-radius: 20px; cursor: pointer;
  font-family: var(--font); font-size:.82rem; font-weight:600; letter-spacing:1px;
  transition: all .2s; white-space: nowrap;
}
.slot-btn:hover { background:linear-gradient(135deg,#3d1f7a,#2a1050); border-color:rgba(180,100,255,0.8); box-shadow:0 0 12px rgba(160,80,255,0.4); }
.slot-modal-overlay {
  position:fixed; inset:0; z-index:300;
  background:rgba(0,0,0,0.88); backdrop-filter:blur(8px);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .2s;
}
.slot-modal-overlay.open { opacity:1; pointer-events:all; }
.slot-box {
  background:linear-gradient(160deg,#1a0d2e,#0e0e1c);
  border:1px solid rgba(180,100,255,0.3); border-radius:18px;
  padding:28px 32px; width:min(400px,92vw); text-align:center;
  box-shadow:0 0 40px rgba(120,50,200,0.3);
}
.slot-title { font-size:1.3rem; font-weight:800; color:#d4aaff; letter-spacing:3px; display:block; margin-bottom:14px; }
.slot-coins-row { font-size:.82rem; color:var(--muted); margin-bottom:20px; }
.slot-coins-row span { color:var(--gold); font-weight:700; font-size:1rem; }
.slot-reels { display:flex; gap:12px; justify-content:center; margin-bottom:18px; }
.slot-reel {
  width:80px; height:80px; border-radius:12px; font-size:2.4rem; line-height:80px;
  background:rgba(255,255,255,0.05); border:2px solid rgba(180,100,255,0.25);
  transition:border-color .2s; user-select:none;
}
.slot-reel.spinning { border-color:rgba(180,100,255,0.7); filter:blur(1px); }
.slot-result { min-height:28px; font-size:.95rem; font-weight:700; margin-bottom:16px; white-space:pre-line; }
.slot-result.win  { color:var(--green); text-shadow:0 0 10px rgba(0,200,83,0.5); }
.slot-result.loss { color:var(--muted); }
.slot-spin-btn {
  background:linear-gradient(135deg,#6a0dad,#9b30d4); border:none; color:#fff;
  padding:12px 36px; border-radius:24px; font-size:1rem; font-weight:700;
  cursor:pointer; font-family:var(--font); letter-spacing:1px; transition:all .2s;
  width:100%;
}
.slot-spin-btn:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 6px 20px rgba(120,50,200,0.5); }
.slot-spin-btn:disabled { opacity:.4; cursor:not-allowed; transform:none; }
.slot-paytable { margin-top:16px; font-size:.68rem; color:var(--muted); line-height:1.8; border-top:1px solid rgba(255,255,255,0.06); padding-top:12px; }
.slot-close-row { text-align:right; margin-bottom:10px; }

/* Responsive */
@media (max-width: 1100px) { .players-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  {
  .players-grid { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 2rem; }
}

/* ── Live Game Modal — szczegółowy widok ─────────────────── */

.modal-box.lg-wide { width: min(1100px, 97vw); }

.lg-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.lg-team:first-child { border-right: 1px solid rgba(255,255,255,0.07); }

.lg-team-hdr {
  padding: 9px 14px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.lg-blue { background: rgba(91,155,213,0.13); color: #5b9bd5; }
.lg-red  { background: rgba(192,57,43,0.13);  color: #e74c3c; }

.lg-players { display: flex; flex-direction: column; }

/* ── Per-player row ─── */
.lg-player {
  padding: 9px 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background .12s;
}
.lg-player:last-child { border-bottom: none; }
.lg-player:hover { background: rgba(255,255,255,0.03); }

.lg-player-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

/* Profile icon */
.lg-icon-wrap { position: relative; flex-shrink: 0; }
.lg-icon { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(255,255,255,0.12); background: #1a1a2e; }
.lg-lvl {
  position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%);
  background: #111120; border: 1px solid rgba(255,255,255,0.15);
  font-size: .52rem; padding: 1px 4px; border-radius: 5px; color: #6b7a8d;
  white-space: nowrap;
}

/* Summoner spells */
.lg-spells { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.lg-spell { width: 16px; height: 16px; border-radius: 3px; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); }
.lg-spell-empty { display: block; width: 16px; height: 16px; border-radius: 3px; background: rgba(255,255,255,0.05); }

/* Champion icon */
.lg-champ { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.15); }

/* Name + position */
.lg-player-meta { flex: 1; min-width: 0; }
.lg-name {
  display: block; font-size: .78rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none; transition: color .15s;
}
.lg-name:hover { color: var(--gold); text-decoration: underline; }
.lg-pos {
  font-size: .6rem; color: var(--muted); background: rgba(255,255,255,0.06);
  border-radius: 3px; padding: 1px 5px; display: inline-block; margin-top: 2px;
}

/* Stats block */
.lg-player-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  padding-left: 2px;
}

/* Rank */
.lg-rank { font-size: .7rem; font-weight: 600; white-space: nowrap; }
.lg-rank.IRON        { color: #7a6a5a; }
.lg-rank.BRONZE      { color: #a0522d; }
.lg-rank.SILVER      { color: #a0a8b0; }
.lg-rank.GOLD        { color: #d4aa40; }
.lg-rank.PLATINUM    { color: #5eb8c0; }
.lg-rank.EMERALD     { color: #2ecc71; }
.lg-rank.DIAMOND     { color: #7aa5d2; }
.lg-rank.MASTER      { color: #9b59b6; }
.lg-rank.GRANDMASTER { color: #e74c3c; }
.lg-rank.CHALLENGER  { color: #f1c40f; }
.lg-rank.unranked    { color: var(--muted); }

.lg-rank-row { display: flex; align-items: center; gap: 5px; }

/* Winrate */
.lg-wr { font-size: .7rem; font-weight: 600; white-space: nowrap; }
.lg-wr-sub { font-size: .62rem; font-weight: 400; color: var(--muted); }
.lg-wr.wr-high { color: var(--green); }
.lg-wr.wr-low  { color: var(--red); }
.lg-wr.wr-none { color: var(--muted); font-weight: 400; font-style: italic; }

/* KDA */
.lg-kda { font-size: .68rem; color: var(--cyan); white-space: nowrap; }
.lg-kda-label { color: var(--muted); font-size: .6rem; }

/* Tags */
.lg-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 2px;
}
.lg-tag {
  font-size: .58rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(200,155,60,0.1);
  border: 1px solid rgba(200,155,60,0.25);
  color: var(--gold);
  white-space: nowrap;
  font-weight: 500;
}
.lg-tag.tag-green {
  background: rgba(0,200,83,0.1);
  border-color: rgba(0,200,83,0.25);
  color: var(--green);
}
.lg-tag.tag-red {
  background: rgba(255,23,68,0.1);
  border-color: rgba(255,23,68,0.25);
  color: var(--red);
}

@media (max-width: 700px) {
  .lg-teams { grid-template-columns: 1fr; }
  .lg-team:first-child { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); }
}

/* ── Team Comparison Bar ─────────────────────────────── */
.team-compare {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
}
.tc-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tc-side {
  min-width: 100px;
  flex-shrink: 0;
}
.tc-left  { text-align: left; }
.tc-right { text-align: right; }

.tc-fav-badge {
  display: inline-block;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(200,155,60,0.18);
  border: 1px solid rgba(200,155,60,0.45);
  color: var(--gold);
  margin-bottom: 4px;
  animation: favPulse 2s infinite;
}
@keyframes favPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(200,155,60,0); }
  50%      { box-shadow: 0 0 8px 2px rgba(200,155,60,0.25); }
}

.tc-rank-lbl {
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.tc-wr-lbl {
  font-size: .65rem;
  color: var(--muted);
}
.blue-txt { color: #5b9bd5; }
.red-txt  { color: #e74c3c; }

.tc-bar-wrap {
  flex: 1;
  text-align: center;
}
.tc-label {
  font-size: .6rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.tc-bar {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  background: rgba(255,255,255,0.05);
}
.tc-bar-blue {
  background: linear-gradient(to right, #3a6fa8, #5b9bd5);
  height: 100%;
  border-radius: 4px 0 0 4px;
  transition: width .6s ease;
  min-width: 4px;
}
.tc-bar-red {
  background: linear-gradient(to right, #c0392b, #e74c3c);
  height: 100%;
  border-radius: 0 4px 4px 0;
  transition: width .6s ease;
  min-width: 4px;
}
.tc-pcts {
  display: flex;
  justify-content: space-between;
  font-size: .62rem;
  font-weight: 700;
  margin-top: 4px;
  padding: 0 1px;
}

@media (max-width: 500px) {
  .tc-side { min-width: 70px; }
  .tc-row { gap: 8px; }
}

/* ── Site navigation (used on all pages) ── */
.site-nav { display:flex; gap:6px; }
.nav-link {
  padding: 7px 18px;
  border-radius: 6px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.nav-link:hover { color:#fff; background: rgba(255,255,255,0.08); }
.nav-link.active {
  color: #c8a23c;
  border-color: rgba(200,162,60,0.4);
  background: rgba(200,162,60,0.12);
}
.header-center { flex:1; display:flex; justify-content:center; align-items:center; }
