/* Matches the Ben K Hub mock-up: bright arcade daylight, gradient accents. */
:root {
  --bg: #f2f0fb;
  --panel: #ffffff;
  --panel2: #f3f0fd;
  --line: #e2dcf6;
  --track: #e9e4fa;
  --ink: #1b1640;
  --mute: #6d6890;
  --blue: #0aaee9;
  --indigo: #3a6fdc;
  --violet: #7d2fc9;
  --magenta: #9d12b7;
  --gold: #ffc94d;
  --goldInk: #b67800;
  --good: #14a866;
  --hot: #e0307d;
  --heroGrad: linear-gradient(135deg, #0aaee9 0%, #3a6fdc 38%, #7d2fc9 75%, #9d12b7 100%);
  --display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --body: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  background-image:
    radial-gradient(circle at 10% -5%, rgba(10, 174, 233, 0.18), transparent 40%),
    radial-gradient(circle at 105% 15%, rgba(157, 18, 183, 0.14), transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
}

[hidden] {
  display: none !important;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
}

.app {
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.top {
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--heroGrad);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
  flex: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--violet);
}

.who {
  min-width: 0;
  flex: 1;
}

.who b {
  display: block;
  font-size: 16px;
}

.who span {
  font-size: 12.5px;
  color: var(--mute);
}

.lvl {
  font-family: var(--display);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 9px;
  border-radius: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--violet);
  white-space: nowrap;
}

/* Main scrolling area */
main {
  flex: 1;
  padding: 4px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

h2 {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 6px 0 -4px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(58, 40, 140, 0.06);
}

.num {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.muted {
  color: var(--mute);
  font-size: 13px;
}

.period {
  margin: 0 0 4px;
}

/* Hero card (gradient) */
.hero {
  background: var(--heroGrad);
  border: 0;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(125, 47, 201, 0.28);
}

.hero::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -70px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 77, 0.45), transparent 65%);
}

.hero .muted {
  color: rgba(255, 255, 255, 0.88);
}

.cyc {
  font-size: 12.5px;
  opacity: 0.88;
}

.big {
  font-size: 40px;
  line-height: 1;
  margin: 8px 0 2px;
}

.big small {
  font-size: 16px;
  opacity: 0.8;
}

/* Progress bar with shine */
.bar {
  height: 14px;
  border-radius: 99px;
  background: var(--track);
  overflow: hidden;
  margin-top: 10px;
  position: relative;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue), var(--indigo), var(--violet), var(--magenta));
  position: relative;
}

.bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  background-size: 60px 100%;
  animation: shine 2.4s linear infinite;
}

.hero .bar {
  background: rgba(255, 255, 255, 0.25);
}

.hero .bar i {
  background: linear-gradient(90deg, #ffe08a, var(--gold));
}

@keyframes shine {
  from { background-position: -60px 0; }
  to { background-position: 400px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bar i::after {
    animation: none;
  }
}

/* Small stat tiles */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  min-width: 0;
  box-shadow: 0 4px 14px rgba(58, 40, 140, 0.06);
}

.tile .num {
  font-size: 22px;
  display: block;
  color: var(--violet);
}

.tile span {
  font-size: 11.5px;
  color: var(--mute);
}

/* List rows: cards that are also buttons */
button.card {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

button.card:hover {
  background: var(--panel2);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tag {
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--panel2);
  color: var(--indigo);
  white-space: nowrap;
}

.points-tag {
  color: var(--goldInk);
  background: #fff6d6;
}

.notice {
  color: var(--mute);
  text-align: center;
  padding: 24px 8px;
}

.back {
  border: none;
  background: none;
  color: var(--indigo);
  font-weight: 800;
  padding: 4px 0 8px;
}

/* Bottom tab bar */
nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0 auto;
  max-width: 440px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

nav button {
  border: 0;
  background: none;
  padding: 6px 0;
  border-radius: 12px;
  font-size: 11.5px;
  color: var(--mute);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

nav button[aria-current="page"] {
  color: var(--violet);
  background: var(--panel2);
  font-weight: 800;
}

nav svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Person detail */
.person-head b {
  font-size: 17px;
}

.person-points {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  color: var(--goldInk);
}

.togo {
  margin-top: 8px;
  font-weight: 800;
  position: relative;
  z-index: 1;
  font-size: 13.5px;
}

.stamp {
  font-size: 11.5px;
  color: var(--mute);
  margin-top: 8px;
}

.note {
  font-size: 12.5px;
  color: var(--mute);
  line-height: 1.45;
  margin: 0;
}

/* B-Bank card (not connected yet) */
.vault {
  background: linear-gradient(135deg, #fff4cc, #ffe0b8 55%, #f6d9ff);
  border: 1px solid #f0d58a;
  text-align: center;
}

.vault .cyc {
  color: #7a5300;
  opacity: 1;
}

.vault .big {
  color: #8a5a00;
}

.vault .bar {
  background: var(--track);
}

/* Career ladder */
.ladder {
  display: flex;
  flex-direction: column-reverse;
  gap: 6px;
}

.rung {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13.5px;
}

.rung .code {
  font-family: var(--display);
  font-weight: 700;
  width: 34px;
  color: var(--violet);
}

.rung.done {
  opacity: 0.55;
}

.rung.now {
  background: var(--heroGrad);
  color: #fff;
  border: 0;
  box-shadow: 0 6px 18px rgba(125, 47, 201, 0.3);
}

.rung.now .code {
  color: #fff;
}

.rung.next {
  border: 1.5px dashed var(--gold);
}

.rung .tag {
  margin-left: auto;
  font-size: 11px;
}

.rung.now .tag {
  background: rgba(255, 255, 255, 0.2);
  color: #ffe08a;
}

/* Podium for the top three */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  align-items: end;
  gap: 8px;
  text-align: center;
  margin-bottom: 12px;
}

.pod {
  border-radius: 14px 14px 6px 6px;
  padding: 10px 4px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.pod .av {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: #fff;
  background: var(--heroGrad);
}

.pod b {
  display: block;
  font-size: 13px;
}

.pod .num {
  font-size: 13px;
  color: var(--goldInk);
}

.pod.p1 {
  padding-top: 18px;
  border: 2px solid var(--gold);
  box-shadow: 0 8px 22px rgba(255, 180, 40, 0.3);
}

.pod.p1 .av {
  background: linear-gradient(135deg, #ffe08a, #ffb347);
  color: #3a2600;
  width: 52px;
  height: 52px;
}

/* Telegram's own sample notice */
.sample {
  margin: 0 16px 6px;
  font-size: 11.5px;
  text-align: center;
  color: var(--mute);
  border: 1px dashed #cfc6ef;
  border-radius: 8px;
  padding: 3px 6px;
}
