@charset "UTF-8";

:root {
  --bg: #131521;
  --bg-soft: #181b2a;
  --panel: #1b1e2b;
  --panel-soft: #202435;
  --panel-border: #2b3147;
  --text-main: #f3f4fa;
  --text-soft: #8d92ab;
  --text-dim: #6d718a;
  --accent: #ffc92c;
  --accent-strong: #ffbf00;
  --accent-faint: rgba(255, 201, 44, 0.12);
  --shadow: 0 26px 70px rgba(4, 7, 18, 0.55);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top center, rgba(255, 201, 44, 0.05), transparent 26%),
    linear-gradient(180deg, #0f111b 0%, #121523 35%, #141827 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 201, 44, 0.08), transparent 22%),
    radial-gradient(circle at 20% 0%, rgba(69, 86, 146, 0.16), transparent 25%);
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 34px 0 28px;
}

.hero-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

.brand-icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.brand-icon svg,
.summary-icon svg,
.panel-action svg,
.hero-period-icon svg,
.leader-score-icon svg,
.leader-icon svg {
  width: 100%;
  height: 100%;
}

.brand-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.brand-title .brand-accent {
  color: var(--accent);
}

.hero-period-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #191d2d 0%, #171a27 100%);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.hero-period-icon {
  width: 22px;
  height: 22px;
}

.hero-subtitle {
  margin: 20px 0 0;
  color: var(--text-soft);
  font-size: 16px;
}

.period-tabs {
  display: flex;
  justify-content: center;
  margin: 18px auto 0;
  padding: 4px;
  width: fit-content;
  border-radius: 18px;
  border: 1px solid rgba(43, 49, 71, 0.95);
  background: rgba(24, 27, 40, 0.92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.period-tab {
  min-width: 96px;
  height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.period-tab.is-active {
  background: var(--accent);
  color: #1c1400;
}

.summary-pills {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(28, 31, 46, 0.92);
  color: var(--text-main);
}

.summary-icon {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.summary-pill strong {
  font-size: 14px;
  font-weight: 700;
}

.leaderboard-panel {
  margin-top: 22px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(27, 30, 43, 0.98), rgba(24, 27, 39, 0.96));
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-kicker {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  text-decoration: none;
}

.panel-action:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.03);
}

.leaderboard-scroll {
  margin-top: 18px;
  max-height: 332px;
  overflow-y: auto;
  padding-right: 6px;
}

.leaderboard-scroll::-webkit-scrollbar {
  width: 10px;
}

.leaderboard-scroll::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
  border-radius: 999px;
}

.leaderboard-scroll::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.35);
  border-radius: 999px;
  border: 2px solid rgba(24,27,39,1);
}

.leaderboard-list {
  display: grid;
  gap: 12px;
}

.leaderboard-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 76px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(50, 56, 81, 0.95);
  background: rgba(31, 35, 51, 0.98);
}

.leader-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.leader-copy {
  min-width: 0;
}

.leader-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.leader-name {
  color: var(--text-main);
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-card.is-clickable {
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.leaderboard-card.is-clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 201, 44, 0.42);
  background: rgba(34, 39, 56, 0.98);
}

.leaderboard-card.is-disabled {
  opacity: 0.86;
}

.leader-name.is-disabled {
  cursor: default;
}

.leader-username {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-card.is-clickable .leader-username {
  cursor: pointer;
}

.leader-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 800;
  font-size: 16px;
}

.leader-score-icon {
  width: 18px;
  height: 18px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 150px;
  border-radius: 18px;
  border: 1px solid rgba(50, 56, 81, 0.95);
  background: rgba(31, 35, 51, 0.98);
  color: var(--text-soft);
  text-align: center;
  padding: 20px;
}

.page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

.footer-meta,
.footer-brand {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}

.footer-brand .brand-accent {
  color: var(--accent);
}

.footer-brand.is-warning {
  color: #f3a53f;
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100vw - 16px, 560px);
    padding-top: 24px;
  }

  .leaderboard-panel {
    padding: 18px;
  }

  .period-tab {
    min-width: 84px;
    padding: 0 12px;
  }

  .leaderboard-card {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    padding: 14px;
  }

  .leader-name {
    font-size: 14px;
  }
}
