@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #061923;
  --bg-deep: #04131b;
  --surface: #0b2531;
  --surface-2: #102f3c;
  --surface-3: #173b48;
  --line: rgba(137, 188, 199, .2);
  --line-strong: rgba(137, 188, 199, .38);
  --text: #f3f7f5;
  --muted: #93aeb5;
  --teal: #42d2bc;
  --teal-deep: #1b9f91;
  --gold: #f4b942;
  --silver: #c8d3d8;
  --bronze: #d78752;
  --danger: #ff5f63;
  --display: 'Barlow Condensed', sans-serif;
  --body: 'Manrope', sans-serif;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 70px rgba(0, 8, 12, .26);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 9%, rgba(24, 109, 119, .23), transparent 27rem),
    linear-gradient(180deg, #061923 0%, #071c27 65%, #04131b 100%);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.site-shell { min-height: 100vh; overflow: hidden; }

.topbar {
  width: min(1420px, calc(100% - 64px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 13px; color: var(--text); text-decoration: none; }
.brand-mark {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid rgba(66, 210, 188, .62); border-radius: 14px;
  background: rgba(66, 210, 188, .08); transform: rotate(-3deg);
}
.brand-mark svg { width: 34px; fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font: 800 24px/1 var(--display); text-transform: uppercase; letter-spacing: .045em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.topbar-status { display: flex; align-items: center; gap: 20px; }
.live-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 5px rgba(255, 95, 99, .1); animation: pulse 1.8s ease-in-out infinite; }
.updated-at { color: var(--muted); font-size: 11px; }
@keyframes pulse { 50% { opacity: .55; transform: scale(.8); } }

.hero {
  width: min(1420px, calc(100% - 64px));
  min-height: 200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  position: relative;
  isolation: isolate;
}
.hero-contours, .hero-contours::before, .hero-contours::after {
  position: absolute; inset: 0; content: ''; pointer-events: none; z-index: -1; opacity: .26;
  background: repeating-radial-gradient(ellipse at 76% 45%, transparent 0 26px, rgba(79, 171, 177, .22) 27px 28px, transparent 29px 48px);
  mask-image: linear-gradient(90deg, transparent 4%, #000 46%, #000 95%, transparent);
}
.hero-contours::before { transform: translate(-28%, 36%) scale(.62); opacity: .6; }
.hero-contours::after { transform: translate(20%, -22%) scale(.72); opacity: .42; }
.hero-copy { padding: 38px 0 34px; max-width: 950px; }
.hero-context, .toolbar-label { margin: 0 0 8px; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { margin: 0; font: 800 clamp(42px, 4.4vw, 70px)/.97 var(--display); letter-spacing: .015em; text-transform: uppercase; }
.hero-copy > p:last-child { margin: 17px 0 0; color: var(--muted); font-size: 14px; }
.hero-fish { position: absolute; right: 0; width: min(43vw, 560px); max-height: 220px; fill: rgba(60, 133, 144, .05); stroke: rgba(111, 179, 188, .17); stroke-width: 1.2; z-index: -1; }

.ranking-workspace { width: min(1420px, calc(100% - 64px)); margin: 0 auto 64px; }
.ranking-tabs-wrap { border: 1px solid var(--line-strong); border-radius: 13px; background: rgba(8, 34, 45, .86); box-shadow: var(--shadow); overflow: hidden; }
.ranking-tabs { display: grid; grid-template-columns: repeat(8, minmax(max-content, 1fr)); overflow-x: auto; scrollbar-width: none; }
.ranking-tabs::-webkit-scrollbar { display: none; }
.ranking-tab {
  min-height: 61px; padding: 0 17px; border: 0; border-right: 1px solid var(--line); border-bottom: 3px solid transparent;
  background: transparent; color: #c6d2d5; cursor: pointer; white-space: nowrap; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: .2s ease;
}
.ranking-tab:last-child { border-right: 0; }
.ranking-tab:hover { color: #fff; background: rgba(66, 210, 188, .05); }
.ranking-tab:focus-visible, .search-box:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.ranking-tab.is-active { color: var(--teal); border-bottom-color: var(--teal); background: linear-gradient(180deg, rgba(66,210,188,.08), transparent); }
.tab-icon { font-size: 17px; }

.toolbar { padding: 24px 0 14px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.toolbar h2, .standings-head h3 { margin: 0; font: 700 28px/1 var(--display); letter-spacing: .035em; text-transform: uppercase; }
.search-box { width: min(390px, 100%); height: 50px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(10, 36, 47, .88); display: flex; align-items: center; gap: 11px; padding: 0 13px; transition: .2s; }
.search-box svg { width: 20px; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 13px; }
.search-box input::placeholder { color: #6f8c94; }
.search-shortcut { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; color: #6f8c94; font-size: 9px; }

.loader-container { min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; color: var(--muted); font-size: 12px; }
.spinner { width: 34px; height: 34px; border: 2px solid rgba(66,210,188,.18); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.podium-section { min-height: 250px; display: flex; align-items: flex-end; padding: 6px 5.5% 0; position: relative; }
.podium-section::before { content: ''; position: absolute; inset: 15% 10% 0; background: radial-gradient(ellipse at 50% 60%, rgba(26, 109, 118, .18), transparent 68%); pointer-events: none; }
.podium-container { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 5vw, 78px); align-items: end; position: relative; }
.podium-card { min-width: 0; color: var(--text); text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center; position: relative; }
.podium-card.rank-1 { order: 2; }
.podium-card.rank-2 { order: 1; }
.podium-card.rank-3 { order: 3; }
.podium-rank { font: 700 78px/.8 var(--display); color: var(--silver); text-shadow: 0 5px 30px rgba(200,211,216,.2); }
.rank-1 .podium-rank { font-size: 108px; color: var(--gold); text-shadow: 0 5px 35px rgba(244,185,66,.28); }
.rank-3 .podium-rank { color: var(--bronze); }
.podium-laurel { margin: -1px 0 8px; color: var(--silver); font-size: 20px; letter-spacing: .18em; }
.rank-1 .podium-laurel { color: var(--gold); }
.rank-3 .podium-laurel { color: var(--bronze); }
.podium-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 clamp(19px, 2vw, 27px)/1 var(--display); letter-spacing: .035em; text-transform: uppercase; }
.podium-club { max-width: 100%; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.podium-stats { margin: 13px 0 12px; display: flex; gap: 12px; align-items: baseline; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.podium-stats strong { color: var(--text); font: 700 22px/1 var(--display); }
.rank-1 .podium-stats strong { color: var(--gold); }
.podium-base { width: 100%; min-height: 24px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, #2b4754, #112b37); box-shadow: 0 13px 25px rgba(0,0,0,.28); clip-path: polygon(7% 0, 93% 0, 100% 38%, 100% 100%, 0 100%, 0 38%); }
.rank-1 .podium-base { min-height: 38px; border-color: #c78f28; background: linear-gradient(180deg, #b27a1e, #5e3d0a); }
.rank-3 .podium-base { border-color: rgba(215,135,82,.65); background: linear-gradient(180deg, #704429, #352317); }

.standings { margin-top: 28px; }
.standings-head { margin-bottom: 13px; display: flex; align-items: end; justify-content: space-between; }
.standings-head h3 { font-size: 22px; }
.results-count { color: var(--muted); font-size: 11px; }
.rank-table { border: 1px solid var(--line-strong); border-radius: 13px; overflow: hidden; background: rgba(7, 30, 41, .72); box-shadow: var(--shadow); }
.rank-table-head, .list-row { display: grid; grid-template-columns: 74px minmax(190px, 1.25fr) minmax(170px, 1.35fr) 120px 140px; align-items: center; }
.rank-table-head { min-height: 46px; padding: 0 22px; background: rgba(25, 61, 75, .75); color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rank-table-head span:nth-last-child(-n+2) { text-align: right; }
.list-row { min-height: 67px; padding: 0 22px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; transition: .18s ease; }
.list-row:hover { background: rgba(66, 210, 188, .045); }
.rank-position { font: 700 21px/1 var(--display); color: #cbd6d9; }
.rank-identity { min-width: 0; }
.rank-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 17px/1.1 var(--display); letter-spacing: .035em; text-transform: uppercase; }
.rank-mobile-meta { display: none; }
.rank-club { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c3d0d3; font-size: 11px; }
.rank-captures { text-align: right; color: #d5dfe1; font: 700 18px/1 var(--display); }
.rank-score { text-align: right; color: var(--teal); font: 700 22px/1 var(--display); letter-spacing: .025em; }
.rank-score small, .rank-captures small { margin-left: 3px; color: var(--muted); font: 700 8px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.empty-state { padding: 64px 24px; text-align: center; color: var(--muted); }
.empty-icon { width: 54px; height: 54px; margin: 0 auto 15px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--teal); font-size: 24px; }
.empty-title { color: var(--text); font: 700 22px/1 var(--display); text-transform: uppercase; }
.empty-subtitle { margin-top: 8px; font-size: 12px; }
.error-state .empty-icon { color: var(--danger); }
.retry-button { min-height: 44px; margin-top: 18px; padding: 0 18px; border: 1px solid var(--teal); border-radius: 8px; background: transparent; color: var(--teal); font: 700 11px var(--display); text-transform: uppercase; letter-spacing: .06em; }
.retry-button:hover { background: var(--teal); color: #06202a; }

footer { width: min(1420px, calc(100% - 64px)); min-height: 78px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: #68868e; font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }

/* Team detail */
.detail-shell { width: min(940px, calc(100% - 40px)); margin: 36px auto 70px; }
.detail-hero { padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(18, 58, 72, .94), rgba(7, 29, 40, .95)); box-shadow: var(--shadow); }
.detail-title-row { display: flex; align-items: center; gap: 16px; }
.back-btn { width: 40px; height: 40px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--text); text-decoration: none; }
.detail-hero h1 { margin: 0; font: 800 clamp(34px, 6vw, 58px)/.95 var(--display); text-transform: uppercase; }
.detail-eyebrow { margin: 6px 0 0 57px; color: var(--teal); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.team-stats { margin-top: 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-item { padding: 18px; border-top: 1px solid var(--line-strong); background: rgba(255,255,255,.018); }
.stat-label { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.stat-value { font: 700 32px/1 var(--display); }
.stat-unit { color: var(--teal); font-size: 9px; font-weight: 800; }
.section-title { margin: 38px 0 12px; font: 700 23px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.members-list, .captures-list { border: 1px solid var(--line-strong); border-radius: var(--radius-md); overflow: hidden; }
.member-row, .capture-card { min-height: 63px; padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); background: rgba(9, 35, 46, .72); }
.member-row:first-child, .capture-card:first-child { border-top: 0; }
.member-name, .capture-title { font: 700 16px/1.1 var(--display); text-transform: uppercase; }
.member-score, .capture-length { color: var(--teal); font: 700 20px/1 var(--display); }
.capture-left, .capture-right { display: flex; flex-direction: column; gap: 5px; }
.capture-right { align-items: end; }
.capture-meta, .capture-points { color: var(--muted); font-size: 9px; text-transform: uppercase; }

@media (max-width: 1050px) {
  .ranking-tabs { display: flex; }
  .ranking-tab { flex: 0 0 auto; }
  .rank-table-head, .list-row { grid-template-columns: 64px minmax(170px, 1.4fr) minmax(150px, 1fr) 100px 120px; }
}

@media (max-width: 720px) {
  .topbar, .hero, .ranking-workspace, footer { width: min(100% - 32px, 560px); }
  .topbar { height: 70px; }
  .brand-mark { width: 39px; height: 39px; border-radius: 12px; }
  .brand-mark svg { width: 29px; }
  .brand-copy strong { font-size: 20px; }
  .brand-copy small, .updated-at { display: none; }
  .topbar-status { gap: 0; }
  .hero { min-height: 190px; align-items: flex-start; }
  .hero-copy { padding: 43px 0 26px; }
  .hero h1 { font-size: clamp(36px, 8.8vw, 48px); white-space: normal; }
  .hero-copy > p:last-child { max-width: 290px; margin-top: 13px; font-size: 12px; line-height: 1.55; }
  .hero-fish { right: -130px; top: 10px; width: 390px; opacity: .68; }
  .ranking-workspace { margin-bottom: 40px; }
  .ranking-tabs-wrap { margin-right: -16px; border-right: 0; border-radius: 12px 0 0 12px; }
  .ranking-tab { min-height: 49px; padding: 0 15px; font-size: 11px; }
  .toolbar { padding: 25px 0 18px; align-items: stretch; flex-direction: column; gap: 17px; }
  .toolbar h2 { font-size: 24px; }
  .search-box { width: 100%; }
  .search-shortcut { display: none; }
  .podium-section { min-height: 250px; padding: 6px 0 0; }
  .podium-container { gap: 6px; }
  .podium-rank { font-size: 56px; }
  .rank-1 .podium-rank { font-size: 76px; }
  .podium-name { max-width: 100%; min-height: 2.2em; font-size: clamp(14px, 4.4vw, 19px); white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; text-overflow: clip; }
  .podium-club { font-size: 8px; }
  .podium-stats { margin: 10px 0 9px; flex-direction: column; gap: 4px; font-size: 8px; }
  .podium-stats strong { font-size: 17px; }
  .podium-base { min-height: 17px; }
  .rank-1 .podium-base { min-height: 27px; }
  .standings { margin-top: 22px; }
  .rank-table { border: 0; overflow: visible; background: none; box-shadow: none; }
  .rank-table-head { display: none; }
  .rank-list { display: flex; flex-direction: column; gap: 8px; }
  .list-row { min-height: 76px; padding: 11px 13px; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(11, 38, 49, .83); }
  .rank-position { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 16px; }
  .rank-name { font-size: 16px; }
  .rank-mobile-meta { display: block; margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 9px; }
  .rank-club, .rank-captures { display: none; }
  .rank-score { font-size: 20px; }
  .rank-score small { display: block; margin: 4px 0 0; }
  .standings-head { margin-bottom: 11px; }
  footer { min-height: 72px; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; }
  .detail-shell { width: calc(100% - 32px); margin-top: 20px; }
  .detail-hero { padding: 21px 18px; }
  .detail-eyebrow { margin-left: 55px; }
  .team-stats { grid-template-columns: 1fr 1fr; }
  .capture-card { align-items: flex-start; }
}

@media (max-width: 390px) {
  .brand-copy strong { font-size: 18px; }
  .live-status { font-size: 9px; }
  .podium-section { min-height: 228px; }
  .podium-rank { font-size: 48px; }
  .rank-1 .podium-rank { font-size: 66px; }
  .podium-laurel { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
