/* ─── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #07070f;
  --bg2: #0d0d1a;
  --bg3: #12121f;
  --border: #1e1e30;
  --accent: #94a3b8;
  --accent-bright: #c0cfe8;
  --text: #d4dae8;
  --text-muted: #6b7a96;
  --text-hint: #3d4560;

  /* Rarity colors */
  --c-common: #555570;
  --c-uncommon: #2a7a4f;
  --c-rare: #2a4a9f;
  --c-epic: #7a2a9f;
  --c-legendary: #c8760a;

  --radius: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.5);
  --transition: .2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-bright); }

h1,h2,h3 { font-weight: 700; letter-spacing: -.02em; color: var(--accent-bright); }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }

.accent { color: var(--accent-bright); }
.text-muted { color: var(--text-muted); }
.hint { color: var(--text-hint); font-size: .85em; }
.text-sm { font-size: .85em; }

/* ─── NAVBAR ─────────────────────────────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo { display: flex; align-items: center; gap: 10px; color: var(--accent-bright); font-weight: 800; font-size: 1rem; letter-spacing: .05em; }
.nav-logo-img { height: 32px; width: 32px; object-fit: contain; }
.nav-logo-text .accent { color: #c0cfe8; }

.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link { padding: 6px 12px; border-radius: 6px; color: var(--text-muted); font-size: .9rem; transition: all var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--accent-bright); background: var(--bg3); }
.admin-link { color: #f59e0b !important; }

.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-coins { color: #f59e0b; font-weight: 700; font-size: .9rem; }
.nav-avatar-wrap { display: flex; align-items: center; gap: 8px; }
.nav-avatar { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border); }
.nav-username { font-size: .85rem; color: var(--text-muted); }

/* ─── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 9px 18px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #07070f; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-bright); border-color: var(--accent-bright); color: #07070f; }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover:not(:disabled) { background: rgba(148,163,184,.12); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover:not(:disabled) { color: var(--text); border-color: var(--accent); }
.btn-danger { background: transparent; color: #ef4444; border-color: #ef4444; }
.btn-danger:hover { background: rgba(239,68,68,.1); }
.btn-sm { padding: 5px 12px; font-size: .82rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-full { width: 100%; }
.discord-btn { background: #5865f2; border-color: #5865f2; color: white; }
.discord-btn:hover { background: #4752c4; color: white; }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.main-content { flex: 1; padding: 32px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }
.page-header { margin-bottom: 28px; }
.page-header h1 { margin-bottom: 4px; }
.section { margin-top: 40px; }
.section h2 { margin-bottom: 16px; }

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}
.cards-grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 12px;
}

.card {
  background: linear-gradient(155deg, #0f0f1e, #1a1a30);
  border-radius: var(--radius);
  border: 2px solid var(--c-common);
  padding: 10px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: default;
  user-select: none;
}
.card-md { width: 130px; }
.card-sm { width: 100px; font-size: .85em; }
.card-lg { width: 180px; }

/* Rarity borders/glows */
.rarity-common  { border-color: #444458; }
.rarity-uncommon{ border-color: var(--c-uncommon); box-shadow: 0 0 10px rgba(42,122,79,.3); }
.rarity-rare    { border-color: var(--c-rare); box-shadow: 0 0 10px rgba(42,74,159,.4); }
.rarity-epic    { border-color: var(--c-epic); box-shadow: 0 0 12px rgba(122,42,159,.5); }
.rarity-legendary { border-color: var(--c-legendary); box-shadow: 0 0 16px rgba(200,118,10,.6), 0 0 32px rgba(200,118,10,.2); animation: legendPulse 2s infinite alternate; }

@keyframes legendPulse { from { box-shadow: 0 0 16px rgba(200,118,10,.5), 0 0 32px rgba(200,118,10,.15); } to { box-shadow: 0 0 24px rgba(200,118,10,.8), 0 0 48px rgba(200,118,10,.3); } }

.card-selectable { cursor: pointer; }
.card-selectable:hover { transform: translateY(-3px) scale(1.02); }
.card-selected {
  border-color: #fff !important;
  box-shadow: 0 0 20px rgba(255,255,255,.4) !important;
}

.card-header { display: flex; justify-content: space-between; margin-bottom: 6px; }
.card-type-badge { font-size: .6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.card-rarity-badge { font-size: .65rem; font-weight: 800; letter-spacing: .05em; border-radius: 3px; padding: 1px 4px; }
.rarity-badge-common  { background: #333; color: #aaa; }
.rarity-badge-uncommon{ background: var(--c-uncommon); color: #fff; }
.rarity-badge-rare    { background: var(--c-rare); color: #fff; }
.rarity-badge-epic    { background: var(--c-epic); color: #fff; }
.rarity-badge-legendary { background: var(--c-legendary); color: #fff; }

.card-img-wrap { width: 100%; aspect-ratio: 1/1; margin-bottom: 8px; border-radius: 4px; overflow: hidden; }
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #0d0d1a);
  display: flex; align-items: center; justify-content: center;
}
.card-initials { font-size: 1.5rem; font-weight: 900; color: var(--accent); opacity: .8; }
.card-sm .card-initials { font-size: 1.1rem; }

.card-name { font-size: .78rem; font-weight: 700; color: var(--accent-bright); text-align: center; margin-bottom: 2px; line-height: 1.2; }
.card-tournament { font-size: .65rem; color: var(--c-legendary); text-align: center; margin-bottom: 4px; }

.card-stats { margin-top: 6px; display: flex; flex-direction: column; gap: 2px; }
.stat-row { display: flex; align-items: center; gap: 4px; }
.stat-label { font-size: .6rem; color: var(--text-muted); width: 20px; text-transform: uppercase; font-weight: 700; }
.stat-bar-wrap { flex: 1; height: 4px; background: rgba(255,255,255,.08); border-radius: 2px; overflow: hidden; }
.stat-bar { height: 100%; background: var(--accent); border-radius: 2px; }
.stat-bar-def { background: #2a7a4f; }
.stat-bar-spd { background: #4a8aca; }
.stat-bar-sta { background: #9a6a2a; }
.stat-val { font-size: .6rem; color: var(--text-muted); width: 20px; text-align: right; }

.type-live { color: #22c55e !important; font-weight: 800; }

.card-multiplier-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--c-legendary); color: white;
  font-size: .6rem; font-weight: 900;
  padding: 2px 5px; border-radius: 4px;
  letter-spacing: .03em;
  box-shadow: 0 0 8px rgba(200,118,10,.6);
}

.card-selected-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,.15); border-radius: calc(var(--radius) - 2px);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: white; pointer-events: none;
}

.card-wrapper { position: relative; }
.card-meta-below { font-size: .72rem; color: var(--text-muted); margin-top: 4px; text-align: center; }

/* ─── HERO ───────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
  position: relative;
  overflow: hidden;
}
.hero-glow {
  position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(148,163,184,.08), transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 640px; margin: 0 auto 60px; }
.hero-title { font-size: 3.5rem; font-weight: 900; letter-spacing: -.04em; margin-bottom: 16px; }
.hero-sub { font-size: 1.3rem; color: var(--accent); margin-bottom: 12px; }
.hero-desc { color: var(--text-muted); margin-bottom: 32px; line-height: 1.8; }

.hero-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: left;
  transition: border-color var(--transition);
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { margin-bottom: 8px; font-size: 1rem; }
.feature-card p { color: var(--text-muted); font-size: .9rem; }

/* ─── DASHBOARD ──────────────────────────────────────────────────────────── */
.player-welcome { display: flex; align-items: center; gap: 16px; }
.welcome-avatar { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--border); }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.dash-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.dash-card h3 { margin-bottom: 14px; font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.dash-card-icon { font-size: 2rem; margin-bottom: 10px; }

.coins-amount { font-size: 2rem; font-weight: 900; color: #f59e0b; margin-bottom: 12px; }

.quick-actions { display: flex; flex-direction: column; gap: 10px; }

.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 1.6rem; font-weight: 900; }
.stat-lbl { display: block; font-size: .8rem; color: var(--text-muted); }

/* ─── MATCH LIST ─────────────────────────────────────────────────────────── */
.match-list { display: flex; flex-direction: column; gap: 6px; }
.match-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color var(--transition);
  color: var(--text);
}
.match-row:hover { border-color: var(--accent); }
.match-vs { flex: 1; font-weight: 600; }
.match-format { color: var(--text-muted); font-size: .85rem; }
.match-score { font-weight: 700; font-size: 1rem; }
.match-result { font-weight: 800; font-size: .85rem; padding: 2px 8px; border-radius: 4px; }
.result-win { background: rgba(34,197,94,.15); color: #22c55e; }
.result-loss { background: rgba(239,68,68,.15); color: #ef4444; }
.result-pending { color: #f59e0b; }

/* ─── UPGRADES ───────────────────────────────────────────────────────────── */
.upgrade-rows { display: flex; flex-direction: column; gap: 10px; }
.upgrade-row { display: flex; align-items: center; gap: 10px; }
.level-pips { display: flex; gap: 4px; flex: 1; }
.pip { width: 14px; height: 8px; border-radius: 3px; background: var(--border); }
.pip-filled { background: var(--accent); }

.upgrades-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.upgrade-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.upgrade-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.upgrade-icon { font-size: 2.5rem; }
.upgrade-levels { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.level-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--border); }
.level-owned { border-color: var(--c-uncommon); background: rgba(42,122,79,.08); }
.level-current { border-color: var(--accent); }
.level-num { font-weight: 700; width: 36px; }
.level-bonus { flex: 1; color: var(--accent); }
.level-cost { color: #f59e0b; font-weight: 600; }
.level-owned-badge { color: var(--c-uncommon); font-size: .8rem; font-weight: 700; }
.max-level-badge { text-align: center; color: var(--c-legendary); font-weight: 800; font-size: 1.1rem; padding: 12px; border: 1px solid var(--c-legendary); border-radius: var(--radius); }

/* ─── DECK BUILDER ───────────────────────────────────────────────────────── */
.deck-builder { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.deck-panel { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 80px; height: fit-content; }
.deck-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.deck-count { color: var(--accent); font-weight: 700; }
.deck-cards { min-height: 120px; max-height: 500px; overflow-y: auto; margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.deck-card-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--bg3); border-radius: 6px; border: 1px solid var(--border); }
.deck-card-name { flex: 1; font-size: .85rem; font-weight: 600; }
.deck-card-rarity { font-size: .7rem; }
.deck-remove-btn { color: #ef4444; cursor: pointer; font-size: 1rem; background: none; border: none; padding: 0 4px; }
.empty-deck-msg { color: var(--text-hint); font-size: .85rem; text-align: center; padding: 20px 0; }

.collection-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; }
.search-input { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 12px; color: var(--text); font-size: .85rem; width: 220px; }
.search-input:focus { outline: none; border-color: var(--accent); }

/* ─── PACKS ──────────────────────────────────────────────────────────────── */
.packs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.pack-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; text-align: center; transition: transform var(--transition), border-color var(--transition);
}
.pack-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.pack-icon { font-size: 3rem; margin-bottom: 12px; }
.pack-name { font-size: 1.2rem; margin-bottom: 8px; }
.pack-desc { color: var(--text-muted); font-size: .9rem; margin-bottom: 16px; }
.pack-details { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: .9rem; color: var(--text-muted); }
.pack-cost { color: #f59e0b; font-weight: 700; }

/* Pack opening modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.8); }
.modal-box {
  position: relative; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; max-width: 800px; width: 90%;
  text-align: center; max-height: 90vh; overflow-y: auto;
}
.modal-box h2 { margin-bottom: 24px; }
.pack-reveal-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-bottom: 24px; }
.pack-reveal-item { opacity: 0; transform: scale(0.5) rotateY(180deg); transition: all .4s ease; }
.pack-reveal-item.revealed { opacity: 1; transform: scale(1) rotateY(0deg); }

/* ─── PLAY ───────────────────────────────────────────────────────────────── */
.play-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-bottom: 40px; }
.play-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.play-card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.play-card h2 { margin-bottom: 8px; }
.play-card p { color: var(--text-muted); margin-bottom: 20px; font-size: .9rem; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: 5px; font-weight: 600; }
.form-select, .form-input {
  width: 100%; padding: 9px 12px; background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: .9rem; transition: border-color var(--transition);
}
.form-select:focus, .form-input:focus { outline: none; border-color: var(--accent); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .75rem; font-weight: 700; }
.badge-action { background: rgba(239,68,68,.15); color: #ef4444; }
.badge-waiting { background: rgba(245,158,11,.12); color: #f59e0b; }
.badge-success { background: rgba(34,197,94,.12); color: #22c55e; }
.badge-muted { background: var(--bg3); color: var(--text-muted); }

/* ─── MATCH PAGE ─────────────────────────────────────────────────────────── */
.draft-section { max-width: 900px; margin: 0 auto; }
.draft-header { margin-bottom: 24px; }
.draft-pool { margin-bottom: 24px; }
.draft-card-wrapper { cursor: pointer; }
.draft-actions { text-align: center; margin-top: 8px; }

.waiting-section { text-align: center; padding: 80px 20px; }
.waiting-icon { font-size: 4rem; margin-bottom: 20px; }

.result-section { max-width: 800px; margin: 0 auto; }
.result-scoreboard {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg2); border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px 32px; margin-bottom: 20px;
}
.result-win { border-color: #22c55e; box-shadow: 0 0 24px rgba(34,197,94,.2); }
.result-loss { border-color: #ef4444; box-shadow: 0 0 24px rgba(239,68,68,.2); }
.result-draw { border-color: #f59e0b; box-shadow: 0 0 24px rgba(245,158,11,.2); }
.result-team { display: flex; align-items: center; gap: 12px; }
.result-team-left { flex-direction: row; }
.result-team-right { flex-direction: row-reverse; }
.result-avatar { width: 40px; height: 40px; border-radius: 50%; }
.result-team-name { font-weight: 700; }
.result-score-num { font-size: 2.5rem; font-weight: 900; color: var(--accent-bright); }
.result-vs-center { text-align: center; }
.result-label { display: block; font-size: .8rem; font-weight: 800; letter-spacing: .1em; margin-bottom: 4px; }
.result-dash { font-size: 1.5rem; color: var(--text-muted); }
.result-reward { text-align: center; color: #f59e0b; font-weight: 700; font-size: 1.1rem; margin-bottom: 24px; }
.result-teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.result-team-cards h3 { margin-bottom: 12px; }
.result-actions { display: flex; gap: 12px; justify-content: center; }

/* Replay / Pitch */
.replay-section { margin: 32px 0; }
.replay-section h2 { margin-bottom: 16px; }
.pitch {
  background: linear-gradient(90deg, #0d1f0d 50%, #1f0d0d 50%);
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  position: relative; height: 120px;
  display: flex; align-items: stretch; overflow: hidden;
  margin-bottom: 16px;
}
.pitch-half { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px; }
.pitch-center { width: 40px; display: flex; align-items: center; justify-content: center; border-left: 1px dashed rgba(255,255,255,.1); border-right: 1px dashed rgba(255,255,255,.1); }
.pitch-ball { font-size: 1.4rem; transition: all .5s ease; }
.pitch-team-label { font-size: .75rem; color: rgba(255,255,255,.4); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.pitch-scoreboard {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.6); padding: 3px 14px; border-radius: 20px;
  font-weight: 900; font-size: 1.1rem; color: var(--accent-bright); letter-spacing: .1em;
}

.event-feed {
  height: 200px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px; font-size: .85rem;
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px;
}
.event-entry { padding: 4px 8px; border-radius: 4px; border-left: 3px solid transparent; }
.event-goal { border-color: #22c55e; background: rgba(34,197,94,.08); color: #22c55e; font-weight: 700; }
.event-shot { border-color: #f59e0b; background: rgba(245,158,11,.06); color: #f59e0b; }
.event-counter { border-color: #4a8aca; background: rgba(74,138,202,.06); color: #7aabdc; }
.event-save { border-color: var(--accent); background: rgba(148,163,184,.06); }
.event-clearance { border-color: var(--border); color: var(--text-muted); }
.event-halftime { border-color: var(--text-muted); background: rgba(255,255,255,.04); color: var(--text-muted); text-align: center; }
.event-fulltime { border-color: #f59e0b; background: rgba(245,158,11,.1); color: #f59e0b; font-weight: 700; text-align: center; }
.event-kickoff { color: var(--text-hint); }

/* ─── LEADERBOARD ────────────────────────────────────────────────────────── */
.leaderboard-table-wrap { overflow-x: auto; }
.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th { text-align: left; padding: 10px 16px; color: var(--text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; border-bottom: 1px solid var(--border); }
.leaderboard-table td { padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.04); }
.leaderboard-table tbody tr:hover { background: rgba(255,255,255,.02); }
.leaderboard-table .row-self { background: rgba(148,163,184,.06); }
.rank-col { width: 50px; text-align: center; }
.rank-medal { font-size: 1.3rem; }
.rank-num { font-weight: 700; color: var(--text-muted); }
.lb-player { display: flex; align-items: center; gap: 10px; }
.lb-avatar { width: 28px; height: 28px; border-radius: 50%; }

/* ─── FILTER BAR ─────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: .82rem; color: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.filter-btn.active, .filter-btn:hover { background: var(--accent); color: #07070f; border-color: var(--accent); font-weight: 700; }

/* ─── MISC ───────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h2 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; }

.msg-bar { padding: 10px 14px; border-radius: var(--radius); font-size: .9rem; margin-top: 10px; }
.msg-success { background: rgba(34,197,94,.12); color: #22c55e; border: 1px solid rgba(34,197,94,.3); }
.msg-error { background: rgba(239,68,68,.12); color: #ef4444; border: 1px solid rgba(239,68,68,.3); }

.rarity-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 4px; }
.rarity-dot.rarity-common { background: #555; }
.rarity-dot.rarity-uncommon { background: var(--c-uncommon); }
.rarity-dot.rarity-rare { background: var(--c-rare); }
.rarity-dot.rarity-epic { background: var(--c-epic); }
.rarity-dot.rarity-legendary { background: var(--c-legendary); }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.site-footer { text-align: center; padding: 20px; color: var(--text-hint); font-size: .8rem; border-top: 1px solid var(--border); margin-top: 40px; }

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-title { font-size: 2.2rem; }
  .deck-builder { grid-template-columns: 1fr; }
  .deck-panel { position: static; }
  .result-teams-grid { grid-template-columns: 1fr; }
  .result-scoreboard { flex-direction: column; gap: 16px; }
  .nav-username { display: none; }
  .nav-links { display: none; }
}
