* {
  box-sizing: border-box;
}

:root {
  --bg-1: #090511;
  --bg-2: #120427;
  --bg-3: #1d1160;
  --line: rgba(255,255,255,0.09);
  --text: #f3f4ff;
  --muted: #afb3d9;
  --accent: #7c6bff;
  --accent-2: #3ea6ff;
  --accent-3: #cd6bff;
  --panel: rgba(10, 9, 20, 0.78);
  --panel-2: rgba(13, 11, 30, 0.85);
  --shadow: 0 25px 70px rgba(0,0,0,0.45);
}

html, body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 20%, rgba(146, 78, 255, 0.20), transparent 22%),
    radial-gradient(circle at 80% 15%, rgba(62, 166, 255, 0.18), transparent 24%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 42%, var(--bg-3) 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
  overflow-x: hidden;
}

body {
  position: relative;
}

#matrix-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.bg-grid,
.noise,
.bg-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.noise {
  opacity: 0.07;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.4) 1px, transparent 1px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,0.25) 1px, transparent 1px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.30) 1px, transparent 1px),
    radial-gradient(circle at 85% 70%, rgba(255,255,255,0.2) 1px, transparent 1px);
  background-size: 180px 180px;
}

.bg-glow {
  filter: blur(75px);
}

.bg-glow-1 {
  background: radial-gradient(circle at 25% 40%, rgba(169, 89, 255, 0.26), transparent 25%);
}

.bg-glow-2 {
  background: radial-gradient(circle at 75% 25%, rgba(58, 131, 255, 0.26), transparent 23%);
}

.topbar,
.hero,
.section {
  position: relative;
  z-index: 2;
}

.topbar {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124,107,255,0.25), rgba(62,166,255,0.16));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 0 30px rgba(124,107,255,0.24);
  font-size: 18px;
}

.brand-title {
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.14em;
  font-size: 15px;
  font-weight: 800;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.login-btn,
.primary-btn,
.ghost-btn,
.submit-btn {
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.login-btn {
  padding: 12px 20px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #715dff, #4f7eff);
  box-shadow: 0 10px 30px rgba(108, 105, 255, 0.35);
  font-weight: 700;
}

.login-btn:hover,
.primary-btn:hover,
.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 38px rgba(108, 105, 255, 0.44);
}

.hero {
  width: min(1240px, calc(100% - 48px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 150px);
}

.hero-card,
.side-panel,
.feature-card,
.login-modal,
.stat-card,
.terminal {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.hero-card {
  align-self: center;
  padding: 42px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(12, 10, 25, 0.76), rgba(9, 9, 20, 0.66));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
}

.eyebrow,
.login-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: #9cc7ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-card h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4.4rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.hero-card h1 span {
  color: #9b8aff;
  text-shadow: 0 0 18px rgba(155,138,255,0.45);
}

.hero-card p {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.primary-btn,
.submit-btn {
  padding: 14px 22px;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, #715dff, #4f7eff);
  font-weight: 700;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 16px;
  color: white;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  font-weight: 700;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.stat-card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  color: #96a8ff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.side-panel {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal {
  width: 100%;
  min-height: 320px;
  border-radius: 26px;
  padding: 0;
  background: linear-gradient(180deg, rgba(10,10,20,0.88), rgba(7,8,16,0.78));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-top {
  display: flex;
  gap: 8px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.terminal-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
}

.terminal-body {
  padding: 26px 24px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #a8d2ff;
  font-size: 0.96rem;
  line-height: 1.9;
}

.blink {
  animation: blink 1s step-end infinite;
}

.section {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 58px;
}

.section-muted {
  padding-top: 0;
  padding-bottom: 84px;
}

.section-title {
  margin-bottom: 18px;
  font-family: "Orbitron", sans-serif;
  letter-spacing: 0.10em;
  font-size: 1.05rem;
  color: #e2e5ff;
  text-transform: uppercase;
}

.section-text {
  max-width: 820px;
  color: var(--muted);
  line-height: 1.8;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 24px;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  z-index: 20;
  background: rgba(3, 3, 10, 0.56);
}

.modal-overlay.active {
  display: grid;
}

.login-modal {
  position: relative;
  width: min(520px, 100%);
  border-radius: 28px;
  padding: 34px 30px 30px;
  background: linear-gradient(180deg, rgba(9,8,20,0.95), rgba(11,10,25,0.92));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 28px 80px rgba(0,0,0,0.52);
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  color: white;
  font-size: 24px;
  background: rgba(255,255,255,0.06);
}

.login-header h2 {
  margin: 0;
  font-size: 2rem;
}

.login-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.login-form {
  margin-top: 24px;
}

.login-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #ecedff;
}

.login-form input {
  width: 100%;
  margin-bottom: 18px;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid rgba(153,124,255,0.42);
  background: rgba(255,255,255,0.03);
  color: white;
  outline: none;
  font-size: 1rem;
}

.login-form input:focus {
  border-color: rgba(105, 156, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(95, 132, 255, 0.15);
}

.form-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 16px;
}

.forgot-link {
  color: #98a8ff;
  text-decoration: none;
  font-size: 0.95rem;
}

.submit-btn {
  width: 100%;
  font-size: 1rem;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-bottom: 36px;
  }

  .side-panel {
    order: -1;
  }

  .terminal {
    min-height: 220px;
  }
}

@media (max-width: 820px) {
  .topbar {
    width: min(100% - 28px, 1240px);
    padding-top: 18px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-actions {
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .hero,
  .section {
    width: min(100% - 28px, 1240px);
  }

  .hero-card {
    padding: 26px;
  }

  .hero-stats,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .hero-card h1 {
    font-size: 2.2rem;
  }

  .login-modal {
    padding: 28px 18px 22px;
  }
}


/* ===== Pages privées ===== */

.private-page {
  width: min(1240px, calc(100% - 48px));
  margin: 34px auto 80px;
  position: relative;
  z-index: 2;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.portal-card,
.content-panel,
.info-item {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.portal-card,
.content-panel {
  padding: 26px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 10, 25, 0.82), rgba(9, 9, 20, 0.72));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 25px 70px rgba(0,0,0,0.45);
}

.portal-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124,107,255,0.16);
  border: 1px solid rgba(124,107,255,0.28);
  color: #aeb8ff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.portal-card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.portal-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  text-decoration: none;
  color: white;
  background: linear-gradient(135deg, #715dff, #4f7eff);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(108, 105, 255, 0.35);
}

.portal-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 38px rgba(108, 105, 255, 0.44);
}

.content-panel h1 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: clamp(2rem, 3vw, 3.2rem);
}

.highlight-user {
  color: #9b8aff;
  font-weight: 700;
}

.info-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.info-item {
  padding: 18px 20px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e6e8ff;
}

@media (max-width: 980px) {
  .member-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Dashboard maths ===== */

.chapter-hero {
  margin-bottom: 28px;
}

.chapter-section {
  position: relative;
  z-index: 2;
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.chapter-card {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(12, 10, 25, 0.82), rgba(9, 9, 20, 0.72));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 25px 70px rgba(0,0,0,0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.chapter-card h3 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.chapter-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .chapter-grid {
    grid-template-columns: 1fr;
  }
}



/* -----------------------------
   Auth / compte
-------------------------------- */
.input,
.select,
.textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(13, 11, 30, 0.9);
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
  outline: none;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(124,107,255,0.75);
  box-shadow: 0 0 0 4px rgba(124,107,255,0.16);
}

.label {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 14px;
}

.form-group {
  margin-bottom: 18px;
}

.auth-shell,
.account-shell {
  width: min(1240px, calc(100% - 48px));
  margin: 34px auto 64px;
  position: relative;
  z-index: 2;
}

.auth-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.panel-card,
.account-card,
.table-card,
.notice-card {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(12, 10, 25, 0.76), rgba(9, 9, 20, 0.66));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.panel-card h2,
.account-card h2,
.table-card h2 {
  margin-top: 0;
}

.form-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.helper-text {
  color: var(--muted);
  line-height: 1.6;
}

.error-box,
.success-box,
.info-box {
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 18px;
  line-height: 1.5;
}

.error-box {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.28);
  color: #ffd0d0;
}

.success-box {
  background: rgba(90, 230, 143, 0.12);
  border: 1px solid rgba(90, 230, 143, 0.28);
  color: #d4ffe4;
}

.info-box {
  background: rgba(95, 152, 255, 0.12);
  border: 1px solid rgba(95, 152, 255, 0.24);
  color: #d8e6ff;
}

.account-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  margin-bottom: 28px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.summary-item {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.summary-item .label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-item .value {
  font-size: 28px;
  font-weight: 800;
}

.account-meta {
  display: grid;
  gap: 12px;
}

.account-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.account-meta-row:last-child {
  border-bottom: 0;
}

.chapter-table {
  width: 100%;
  border-collapse: collapse;
}

.chapter-table th,
.chapter-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.chapter-table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-table tr:last-child td {
  border-bottom: 0;
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(124,107,255,0.16);
  color: #eef0ff;
  border: 1px solid rgba(124,107,255,0.22);
  font-size: 13px;
  font-weight: 700;
}

.empty-state {
  color: var(--muted);
  line-height: 1.7;
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.link-btn {
  color: #dbe5ff;
  text-decoration: none;
  font-weight: 700;
}

.save-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1000;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(13, 11, 30, 0.95);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 40px rgba(0,0,0,0.35);
  color: var(--text);
}

.save-toast a {
  color: #b7c7ff;
}

@media (max-width: 980px) {
  .auth-grid,
  .account-hero {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .chapter-table,
  .chapter-table thead,
  .chapter-table tbody,
  .chapter-table th,
  .chapter-table td,
  .chapter-table tr {
    display: block;
  }

  .chapter-table thead {
    display: none;
  }

  .chapter-table tr {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .chapter-table td {
    border-bottom: 0;
    padding: 6px 0;
  }

  .chapter-table td::before {
    content: attr(data-label) " : ";
    color: var(--muted);
    font-weight: 700;
  }
}


.leaderboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
  align-items: stretch;
}

.leaderboard-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.leaderboard-card-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
}

.leaderboard-title {
  margin: 6px 0 0;
  font-size: clamp(1.55rem, 1.1rem + 1vw, 2rem);
  line-height: 1.15;
}

.leaderboard-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.summary-pill {
  min-height: 106px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-pill .mini-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.summary-pill strong {
  font-size: 1.5rem;
  line-height: 1;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.leaderboard-table th,
.leaderboard-table td {
  text-align: left;
  vertical-align: middle;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.leaderboard-table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leaderboard-table th:nth-child(1),
.leaderboard-table td:nth-child(1) {
  width: 68px;
}

.leaderboard-table th:nth-child(3),
.leaderboard-table td:nth-child(3),
.leaderboard-table th:nth-child(4),
.leaderboard-table td:nth-child(4) {
  width: 96px;
  white-space: nowrap;
}

.leaderboard-table tr:last-child td {
  border-bottom: 0;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(124,107,255,0.16);
  border: 1px solid rgba(124,107,255,0.25);
  color: #eef0ff;
  font-weight: 800;
}

.leaderboard-value {
  font-weight: 800;
  color: #ffffff;
}

.leaderboard-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  min-height: 78px;
}

.current-user-row td {
  background: rgba(124,107,255,0.08);
}

.current-user-row td:first-child {
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}

.current-user-row td:last-child {
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  flex-wrap: wrap;
}

.user-pill .you-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(62,166,255,0.16);
  border: 1px solid rgba(62,166,255,0.24);
  color: #d9f0ff;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.quick-nav-card {
  margin-top: 28px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.quick-nav-row {
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.quick-nav-title {
  margin: 12px 0 0;
  line-height: 1.15;
}

.quick-nav-actions {
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 1320px) {
  .leaderboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .leaderboard-grid {
    grid-template-columns: 1fr;
  }

  .leaderboard-card-head,
  .leaderboard-note {
    min-height: 0;
  }
}

@media (max-width: 980px) {
  .leaderboard-summary {
    grid-template-columns: 1fr;
  }

  .quick-nav-row {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .leaderboard-table,
  .leaderboard-table thead,
  .leaderboard-table tbody,
  .leaderboard-table th,
  .leaderboard-table td,
  .leaderboard-table tr {
    display: block;
  }

  .leaderboard-table thead {
    display: none;
  }

  .leaderboard-table tr {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .leaderboard-table td {
    width: auto !important;
    border-bottom: 0;
    padding: 6px 0;
    white-space: normal !important;
  }

  .leaderboard-table td::before {
    content: attr(data-label) " : ";
    color: var(--muted);
    font-weight: 700;
  }

  .quick-nav-actions {
    width: 100%;
  }

  .quick-nav-actions .ghost-btn,
  .quick-nav-actions .login-btn {
    flex: 1 1 100%;
  }
}
