/* RecruitX Rankings — Fintech Minimal (Robinhood-inspired, blue-dominant) */
:root {
  --primary:        #2B7FFF;
  --primary-light:  #5C9FFF;
  --primary-dark:   #1A5FE5;
  --bg:             #FAFAFA;
  --surface:        #FFFFFF;
  --text-primary:   #0A0A0A;
  --text-secondary: #1A1A1A;
  --text-muted:     #9CA3AF;
  --border:         #E5E7EB;
  --success:        #14B8A6;
  --warning:        #F59E0B;
  --error:          #EF4444;
  --gold:           #F5B342;
  --silver:         #9CA3AF;
  --bronze:         #B45309;
  --hero-start:     #0F172A;
  --hero-end:       #1E293B;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
}
a { color: inherit; text-decoration: none; }
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 80px; }

h1, h2, h3 { color: var(--text-primary); }
h2 { font-weight: 900; font-size: 22px; letter-spacing: -0.6px; margin: 40px 0 16px; }
h2 small { color: var(--text-muted); font-weight: 700; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; }

.micro {
  font-size: 10px; font-weight: 900; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--text-muted);
}
.num, .t, .time { font-variant-numeric: tabular-nums; }

/* ---------- topbar ---------- */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand {
  font-weight: 900; font-size: 18px; letter-spacing: -0.6px;
  color: var(--text-primary);
  display: flex; align-items: baseline; gap: 6px;
}
.brand .rx { color: var(--primary); }
.brand .sub-brand {
  font-size: 10px; font-weight: 900; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--text-muted);
}
.tag { display: none; }
@media (min-width: 640px) {
  .tag {
    display: block; margin-left: auto;
    font-size: 10px; font-weight: 900; letter-spacing: 1.4px;
    text-transform: uppercase; color: var(--text-muted);
  }
}

/* ---------- dark hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 16px rgba(43,127,255,0.35);
  border-radius: 18px;
  color: #fff;
  padding: 40px 24px;
  text-align: center;
}
.hero h1 {
  color: #fff; font-weight: 900; letter-spacing: -0.8px;
  font-size: clamp(28px, 5vw, 40px); margin: 0 0 8px;
}
.hero .stats {
  color: rgba(255,255,255,.75); font-weight: 700; font-size: 14px;
  margin: 0 0 24px; font-variant-numeric: tabular-nums;
}
.hero .stats b { color: #fff; font-weight: 900; }

.searchbox { max-width: 620px; margin: 0 auto; }
#q {
  width: 100%; padding: 16px 20px; font-size: 16px; font-weight: 600;
  border-radius: 14px; border: none; outline: none;
  background: #fff; color: var(--text-primary);
  font-family: inherit;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
#q::placeholder { color: var(--text-muted); font-weight: 600; }
#q:focus { box-shadow: 0 6px 24px rgba(43,127,255,.35); }

.filters { display: flex; gap: 8px; margin-top: 14px; justify-content: center; flex-wrap: wrap; }

/* chips */
.chips { display: flex; gap: 8px; }
.chip {
  border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px;
  font-weight: 700; font-size: 13px; color: var(--text-secondary);
  background: var(--surface); cursor: pointer; font-family: inherit;
  transition: transform 100ms ease, background 150ms ease-out, color 150ms ease-out;
  user-select: none;
}
.chip:active { transform: scale(0.95); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.hero .chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.9); }
.hero .chip.active { background: #fff; border-color: #fff; color: var(--primary); }

/* custom select */
select {
  appearance: none; -webkit-appearance: none;
  padding: 6px 32px 6px 14px;
  border: 1px solid var(--border); border-radius: 20px;
  font-weight: 700; font-size: 13px; color: var(--text-secondary);
  background: var(--surface) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-family: inherit; cursor: pointer; outline: none;
}
select:focus { border-color: var(--primary); }
.hero select { background-color: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.9); }
.hero select option { color: var(--text-primary); background: #fff; }

/* ---------- result cards ---------- */
.cards { max-width: 620px; margin: 16px auto 0; text-align: left; }
.card {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 14px 20px; margin: 0 0 10px;
  transition: transform 100ms ease, background 150ms ease-out;
  cursor: pointer;
}
.card:hover { background: #F8FAFF; }
.card:active { transform: scale(0.98); }
.card .name { font-weight: 700; font-size: 15px; color: var(--text-primary); }
.card .sub { color: var(--text-muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.card .n {
  color: var(--primary); font-size: 11px; font-weight: 700; white-space: nowrap;
  background: rgba(43,127,255,.1); border: 1px solid rgba(43,127,255,.3);
  border-radius: 20px; padding: 4px 10px;
  font-variant-numeric: tabular-nums;
}

/* shimmer skeletons */
.skel {
  border-radius: 16px; height: 64px; margin: 0 0 10px;
  background: linear-gradient(90deg, #E5E7EB 25%, #F9FAFB 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* fade-in on list swap */
.fade-in { animation: fadein 200ms ease-out; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- athlete profile ---------- */
.profile-hero {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 6px 16px rgba(43,127,255,0.35);
  border-radius: 18px; color: #fff; padding: 32px 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.profile-hero h1 {
  color: #fff; font-weight: 900; letter-spacing: -0.8px;
  font-size: clamp(24px, 4vw, 34px); margin: 4px 0 10px;
}
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.pill {
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3);
  color: #fff; border-radius: 20px;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
}
.pill.club { background: #fff; border-color: #fff; color: var(--primary); }
.variants { color: rgba(255,255,255,.65); font-size: 12px; font-weight: 600; margin: 10px 0 0; }

.head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.medals { display: flex; gap: 8px; }
.medal {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 900; color: #fff;
  font-variant-numeric: tabular-nums;
}
.medal.g { background: linear-gradient(135deg, #F5B342, #E09A2A); box-shadow: 0 4px 12px rgba(245,179,66,.4); }
.medal.s { background: rgba(156,163,175,.25); border: 1px solid rgba(156,163,175,.5); }
.medal.b { background: rgba(180,83,9,.3); border: 1px solid rgba(180,83,9,.6); }

/* buttons */
.btn {
  padding: 8px 16px; border-radius: 14px; cursor: pointer;
  background: var(--surface); color: var(--text-secondary);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 700; font-family: inherit;
  transition: transform 100ms ease, background 150ms ease-out;
}
.btn:hover { background: #F8FAFF; border-color: var(--primary); color: var(--primary); }
.btn:active { transform: scale(0.95); }
.btn.small { padding: 5px 12px; font-size: 12px; white-space: nowrap; }
.profile-hero .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.3); color: #fff; }
.profile-hero .btn:hover { background: #fff; color: var(--primary); }
.cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none; border-radius: 14px; color: #fff; font-weight: 800;
  padding: 12px 24px; font-size: 14px; cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 16px rgba(43,127,255,0.35);
  transition: transform 100ms ease;
}
.cta:active { transform: scale(0.95); }

/* ---------- PB grid ---------- */
.pb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.pb {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 14px 16px;
  transition: transform 100ms ease, background 150ms ease-out;
}
.pb:hover { background: #F8FAFF; }
.pb .ev {
  font-size: 10px; font-weight: 900; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--text-muted);
}
.pb .t {
  font-size: 24px; font-weight: 900; letter-spacing: -0.4px;
  color: var(--text-primary); font-variant-numeric: tabular-nums;
  margin-top: 4px;
}
.pb .w { color: var(--text-muted); font-size: 11px; font-weight: 600; margin-top: 4px; }

/* ---------- chart ---------- */
.chart-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 20px; height: 340px;
}
.chart-controls { margin: 0 0 12px; }

/* ---------- strengths bars ---------- */
.strengths { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.sbar { display: grid; grid-template-columns: 64px 1fr 48px; align-items: center; gap: 12px; }
.sbar > span:first-child { font-weight: 700; font-size: 13px; color: var(--text-primary); }
.sbar .bar { background: var(--border); border-radius: 6px; height: 10px; overflow: hidden; }
.sbar .fill {
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  height: 100%; border-radius: 6px;
  transition: width 400ms ease-out;
}
.sbar .pct {
  font-size: 12px; font-weight: 800; color: var(--text-secondary);
  text-align: right; font-variant-numeric: tabular-nums;
}

/* ---------- tables ---------- */
.table-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow-x: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
th {
  font-size: 10px; font-weight: 900; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--text-muted);
  cursor: pointer; user-select: none; white-space: nowrap;
}
td { font-weight: 600; color: var(--text-secondary); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num b, td b { font-weight: 800; color: var(--text-primary); }
tbody tr { transition: background 150ms ease-out; }
tbody tr:hover { background: #F8FAFF; }
tr.meet-row td {
  background: var(--bg); font-weight: 900; color: var(--text-primary);
  font-size: 12px; letter-spacing: -0.2px;
}
td.place-1 { color: var(--gold); font-weight: 900; }
td.place-2 { color: var(--silver); font-weight: 900; }
td.place-3 { color: var(--bronze); font-weight: 900; }
td:first-child.place-1 { border-left: 3px solid var(--gold); color: var(--text-primary); }
td:first-child.place-2 { border-left: 3px solid var(--silver); color: var(--text-primary); }
td:first-child.place-3 { border-left: 3px solid var(--bronze); color: var(--text-primary); }
.exh { color: var(--text-muted); font-style: italic; }
.empty { color: var(--text-muted); padding: 14px 0; font-weight: 600; }

/* ---------- merge panel ---------- */
#merge-panel {
  margin: 16px 0; padding: 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.merge-hint { color: var(--text-muted); font-size: 13px; font-weight: 600; margin: 0 0 10px; }
#merge-q {
  width: 100%; padding: 12px 16px; border-radius: 14px; font-size: 16px;
  border: 1px solid var(--border); background: var(--bg);
  color: var(--text-primary); outline: none; font-family: inherit; font-weight: 600;
}
#merge-q:focus { border-color: var(--primary); }
#merge-results .mrow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
#merge-results .mrow:last-child { border-bottom: none; }
#merge-results .mrow a { font-weight: 700; color: var(--primary); }
#merge-results .mrow .sub { color: var(--text-muted); font-size: 12px; flex: 1; }

/* ---------- Claim / App Store CTA ---------- */
.claim-banner {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 20px auto; max-width: 1100px;
  padding: 16px 20px; border-radius: 16px;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: #fff;
  box-shadow: 0 6px 16px rgba(15,23,42,.3);
}
.claim-banner > div { flex: 1; min-width: 220px; }
.claim-banner b { display: block; font-weight: 800; font-size: 15px; letter-spacing: -0.3px; }
.claim-banner span { color: rgba(255,255,255,.75); font-size: 13px; font-weight: 500; }
.claim-banner .cta { text-decoration: none; white-space: nowrap; }
a.cta { text-decoration: none; display: inline-block; }
.profile-hero .claim-cta { box-shadow: 0 6px 16px rgba(43,127,255,.5); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
