/* Liderlik tablosu — profesyonel düzen, site paleti */
.leaderboard-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  min-width: 0;
  padding-bottom: 1.5rem;
  animation: lb-fade-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes lb-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Üst başlık (klasik kart) —— */
.leaderboard-page__header {
  margin-bottom: 0;
  border-color: var(--site-border) !important;
  background: var(--site-surface-gradient) !important;
  box-shadow:
    0 24px 56px -28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.leaderboard-page__header .pointer-events-none {
  background: radial-gradient(
    ellipse 80% 60% at 100% 0%,
    rgba(22, 119, 255, 0.09),
    transparent
  ) !important;
}

.leaderboard-page__eyebrow {
  color: var(--site-accent-bright) !important;
}

.leaderboard-page__title {
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

.leaderboard-page__subtitle {
  color: var(--site-text-muted, #94a3b8);
}

/* —— Ana panel —— */
.lb-board {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.25rem;
  border-radius: 1.25rem;
  border: 1px solid var(--site-border-soft);
  background: var(--site-surface-gradient);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 56px -32px rgba(0, 0, 0, 0.55);
}

@media (min-width: 640px) {
  .lb-board {
    padding: 1.75rem 1.5rem 1.5rem;
    gap: 1.75rem;
  }
}

/* —— Podyum —— */
.lb-podium {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: 0.625rem;
  align-items: end;
  max-width: 52rem;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 640px) {
  .lb-podium {
    gap: 1rem;
  }
}

.lb-podium__slot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.lb-podium__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem 0.65rem 0.85rem;
  border-radius: 1rem 1rem 0 0;
  border: 1px solid var(--site-border-soft);
  border-bottom: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
}

.lb-podium__slot--1 .lb-podium__card {
  padding-top: 1.35rem;
  border-color: rgba(251, 191, 36, 0.28);
  background: linear-gradient(
    180deg,
    rgba(251, 191, 36, 0.1) 0%,
    rgba(22, 119, 255, 0.06) 42%,
    rgba(255, 255, 255, 0.02) 100%
  );
  box-shadow: 0 -8px 32px -12px rgba(251, 191, 36, 0.2);
}

.lb-podium__slot--2 .lb-podium__card {
  border-color: rgba(148, 163, 184, 0.22);
}

.lb-podium__slot--3 .lb-podium__card {
  border-color: rgba(234, 88, 12, 0.22);
}

.lb-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.lb-medal--1 {
  color: #1a1410;
  background: linear-gradient(145deg, #fde68a, #f59e0b);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.lb-medal--2 {
  color: #1e293b;
  background: linear-gradient(145deg, #f8fafc, #94a3b8);
  border: 1px solid rgba(255, 255, 255, 0.55);
}

.lb-medal--3 {
  color: #fff7ed;
  background: linear-gradient(145deg, #fdba74, #c2410c);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.lb-podium__avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(22, 119, 255, 0.35);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.lb-podium__slot--1 .lb-podium__avatar {
  width: 5rem;
  height: 5rem;
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow:
    0 0 0 3px rgba(251, 191, 36, 0.15),
    0 12px 28px rgba(0, 0, 0, 0.4);
}

.lb-podium__slot--2 .lb-podium__avatar {
  border-color: rgba(203, 213, 225, 0.45);
}

.lb-podium__slot--3 .lb-podium__avatar {
  border-color: rgba(234, 88, 12, 0.45);
}

.lb-podium__name {
  margin: 0.75rem 0 0;
  width: 100%;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--site-text);
}

@media (min-width: 640px) {
  .lb-podium__name {
    font-size: 0.875rem;
    max-width: 11rem;
  }
}

.lb-podium__score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0.5rem;
}

.lb-podium__coins {
  font-size: 1.125rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--site-accent-bright);
}

.lb-podium__slot--1 .lb-podium__coins {
  font-size: 1.35rem;
}

@media (min-width: 640px) {
  .lb-podium__slot--1 .lb-podium__coins {
    font-size: 1.5rem;
  }
}

.lb-podium__label {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--site-text-muted);
}

/* Podyum kaidesi */
.lb-podium__pedestal {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 0 0.65rem 0.65rem;
  border: 1px solid var(--site-border-soft);
  border-top: none;
  background: linear-gradient(180deg, rgba(22, 119, 255, 0.18) 0%, rgba(22, 119, 255, 0.08) 100%);
}

.lb-podium__slot--1 .lb-podium__pedestal {
  min-height: 4.5rem;
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.22) 0%, rgba(22, 119, 255, 0.12) 100%);
  border-color: rgba(251, 191, 36, 0.2);
}

.lb-podium__slot--2 .lb-podium__pedestal {
  min-height: 3.25rem;
}

.lb-podium__slot--3 .lb-podium__pedestal {
  min-height: 2.5rem;
}

.lb-podium__place {
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.12);
}

.lb-podium__slot--1 .lb-podium__place {
  font-size: 2.25rem;
  color: rgba(251, 191, 36, 0.25);
}

/* —— Sıralama tablosu —— */
.lb-table {
  border-radius: 0.875rem;
  border: 1px solid var(--site-border-soft);
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.lb-table__head {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--site-border-soft);
  background: rgba(22, 119, 255, 0.08);
}

.lb-table__th {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-text-muted);
}

.lb-table__th--score {
  text-align: right;
}

.lb-table__body {
  display: flex;
  flex-direction: column;
}

.lb-table__row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--site-border-soft);
  transition: background 0.15s ease;
}

.lb-table__row:last-child {
  border-bottom: none;
}

.lb-table__row:hover {
  background: rgba(22, 119, 255, 0.06);
}

.lb-table__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.35rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--site-accent-bright);
  background: rgba(22, 119, 255, 0.12);
}

.lb-table__cell--player {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.lb-table__avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(22, 119, 255, 0.25);
}

.lb-table__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--site-text);
}

.lb-table__cell--score {
  text-align: right;
}

.lb-table__coins {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--site-accent-bright);
}

.lb-table__points-label {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--site-text-muted);
}

/* —— Uyarı / hata —— */
.lb-alert {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(22, 119, 255, 0.25);
  background: rgba(22, 119, 255, 0.08);
  font-size: 0.875rem;
  line-height: 1.5;
}

.lb-alert__title {
  display: block;
  font-weight: 600;
  color: var(--site-text);
}

.lb-alert__text {
  display: block;
  margin-top: 0.25rem;
  color: var(--site-text-muted);
}

.lb-error {
  padding: 2rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(239, 68, 68, 0.28);
  background: rgba(127, 29, 29, 0.15);
  text-align: center;
}

.lb-error__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: #fecaca;
}

.lb-error__hint {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--site-text-muted);
}

.lb-error__meta {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--site-text-soft);
}

/* —— Mobil —— */
@media (max-width: 479px) {
  .lb-podium {
    grid-template-columns: 1fr;
    max-width: 18rem;
  }

  .lb-podium__slot--1 {
    order: 1;
  }

  .lb-podium__slot--2 {
    order: 2;
  }

  .lb-podium__slot--3 {
    order: 3;
  }

  .lb-podium__slot--1 .lb-podium__pedestal {
    min-height: 3rem;
  }

  .lb-podium__slot--2 .lb-podium__pedestal,
  .lb-podium__slot--3 .lb-podium__pedestal {
    min-height: 2.25rem;
  }

  .lb-table__head {
    padding: 0.55rem 0.75rem;
  }

  .lb-table__row {
    padding: 0.6rem 0.75rem;
    grid-template-columns: 2.5rem 1fr auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaderboard-page {
    animation: none;
  }
}

/* —— Açık tema —— */
[data-theme="light"] .lb-board {
  background: var(--site-surface-gradient);
  box-shadow: 0 16px 40px -24px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .leaderboard-page__header {
  border-color: rgba(22, 119, 255, 0.14) !important;
  background: var(--site-surface-gradient) !important;
  box-shadow: 0 16px 40px -24px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .leaderboard-page__title {
  color: #0f172a !important;
}

[data-theme="light"] .leaderboard-page__subtitle {
  color: #64748b !important;
}

[data-theme="light"] .leaderboard-page__eyebrow {
  color: var(--site-accent-deep) !important;
  border-color: rgba(22, 119, 255, 0.28) !important;
  background: rgba(22, 119, 255, 0.1) !important;
}

[data-theme="light"] .lb-podium__card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-color: var(--site-border-soft);
}

[data-theme="light"] .lb-podium__slot--1 .lb-podium__card {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 70%);
  border-color: rgba(234, 179, 8, 0.3);
}

[data-theme="light"] .lb-podium__name,
[data-theme="light"] .lb-table__name {
  color: #0f172a;
}

[data-theme="light"] .lb-podium__coins,
[data-theme="light"] .lb-table__coins {
  color: var(--site-accent-deep);
}

[data-theme="light"] .lb-podium__pedestal {
  background: linear-gradient(180deg, rgba(22, 119, 255, 0.12) 0%, rgba(22, 119, 255, 0.05) 100%);
}

[data-theme="light"] .lb-podium__slot--1 .lb-podium__pedestal {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.2) 0%, rgba(22, 119, 255, 0.08) 100%);
}

[data-theme="light"] .lb-podium__place {
  color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .lb-podium__slot--1 .lb-podium__place {
  color: rgba(180, 83, 9, 0.2);
}

[data-theme="light"] .lb-table {
  background: #f8fafc;
  border-color: var(--site-border-soft);
}

[data-theme="light"] .lb-table__head {
  background: rgba(22, 119, 255, 0.06);
}

[data-theme="light"] .lb-table__row:hover {
  background: rgba(22, 119, 255, 0.05);
}

[data-theme="light"] .lb-table__rank {
  color: var(--site-accent-deep);
  background: rgba(22, 119, 255, 0.1);
}

[data-theme="light"] .lb-alert {
  background: rgba(22, 119, 255, 0.06);
  border-color: rgba(22, 119, 255, 0.18);
}

[data-theme="light"] .lb-alert__title {
  color: #0f172a;
}

[data-theme="light"] .lb-error {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .lb-error__title {
  color: #b91c1c;
}
