:root {
  color-scheme: dark;
  --bg: #080a0e;
  --panel: #11151b;
  --line: #272d36;
  --text: #f4f6f8;
  --muted: #8994a2;
  --accent: #a9ff72;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(ellipse at 50% -24%, #263a37 0, transparent 50%), var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
header {
  height: 66px;
  padding: 0 max(5vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #080a0edb;
  border-bottom: 1px solid #222831;
  backdrop-filter: blur(12px);
}
header b { font-size: 19px; letter-spacing: -.4px; }
header small { margin-left: 4px; padding: 4px 6px; border-radius: 5px; background: #262d35; color: #c6ced7; font-size: 10px; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions > span { color: #aab4bf; font-size: 12px; }
.header-home { color: #c2ccd4; font-size: 12px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.header-home:hover { color: var(--accent); }
.header-home:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 3px; }
.header-lookup { display: inline-flex; min-height: 40px; align-items: center; gap: 9px; padding: 0 16px; border: 1px solid #c5ff8a70; border-radius: 10px; color: #12170f; background: var(--accent); font-size: 13px; font-weight: 850; text-decoration: none; box-shadow: 0 5px 22px #a9ff7220; transition: transform .16s ease, box-shadow .16s ease; }
.header-lookup:hover { transform: translateY(-1px); box-shadow: 0 8px 28px #a9ff7235; }
.header-lookup:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
main { max-width: 1120px; margin: 38px auto 72px; padding: 0 22px; }
.ranking-hero {
  position: relative;
  overflow: hidden;
  padding: 34px 38px 24px;
  border: 1px solid #303a41;
  border-radius: 24px;
  background: linear-gradient(135deg, #17221f 0%, #14191f 46%, #151722 100%);
  box-shadow: 0 24px 90px #0008;
}
.ranking-hero::before {
  content: "";
  position: absolute;
  top: -220px;
  right: -100px;
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: #8bff721c;
  filter: blur(10px);
  pointer-events: none;
}
.rank-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 2px; }
h1 { margin: 8px 0 5px; font-size: clamp(30px, 5vw, 48px); letter-spacing: -1.6px; line-height: 1.1; }
.rank-heading p, .lookup p { margin: 0; color: #a8b1bb; }
.rank-total { min-width: 140px; padding: 14px 18px; border: 1px solid #ffffff17; border-radius: 16px; background: #080b0b66; text-align: center; }
.rank-total strong { display: block; font-size: 30px; line-height: 1.1; }
.rank-total span { display: block; margin-top: 6px; color: #a8b1bb; font-size: 11px; }
.rank-controls { display: flex; align-items: center; gap: 10px; margin: 28px 0 15px; padding-top: 20px; border-top: 1px solid #ffffff19; }
.rank-controls label { color: #c1c9d0; font-size: 12px; }
.rank-controls select { appearance: none; padding: 9px 34px 9px 12px; border: 1px solid #ffffff1b; border-radius: 9px; color: #fff; background: #252d32; font-weight: 700; background-image: linear-gradient(45deg, transparent 50%, #b5c0ca 50%), linear-gradient(135deg, #b5c0ca 50%, transparent 50%); background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat; }
.live-dot { margin-left: auto; color: #b5c0ca; font-size: 11px; }
.live-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px #a9ff72; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.podium-1 .podium-card { grid-column: 2; width: 100%; max-width: 360px; justify-self: center; }
.podium-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.podium-card { position: relative; display: flex; min-height: 190px; flex-direction: column; overflow: hidden; padding: 18px 20px; border: 1px solid #ffffff17; border-radius: 17px; background: linear-gradient(145deg, #ffffff0c, #00000024); }
.podium-card::after { content: ""; position: absolute; top: -65px; right: -60px; width: 130px; height: 130px; border-radius: 50%; background: #ffffff09; }
.podium-card.place-1 { min-height: 210px; border-color: #c7ff777a; background: linear-gradient(145deg, #9dff721c, #171c20 78%); }
.place-label { display: flex; align-items: center; justify-content: space-between; color: #e3e9ef; }
.place-label span { font-size: 24px; }
.place-label b { font-size: 22px; }
.place-label small { margin-left: 2px; color: #aeb7c0; font-size: 11px; }
.thumb-link, .row-thumb-link { display: flex; justify-content: center; overflow: hidden; border-radius: 10px; background: #080a0d; }
.thumb-link { margin-top: 12px; }
.rank-thumb { display: block; width: 100%; height: auto; max-height: 240px; object-fit: contain; background: #171c22; }
.thumb-placeholder { min-height: 100px; aspect-ratio: 16 / 9; align-items: center; color: #7f8994; font-size: 28px; }
.podium-name { overflow: hidden; margin-top: 19px; font-size: 16px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.podium-count { margin-top: 3px; font-size: 30px; font-weight: 850; letter-spacing: -1px; }
.podium-count small { margin-left: 5px; color: #9da8b3; font-size: 11px; letter-spacing: 0; }
.podium-card a.post-link { margin-top: auto; padding-top: 12px; color: #c5d2d9; font-size: 11px; text-decoration: none; }
.podium-card a:hover, .rank-details a:hover { color: var(--accent); }
.empty-rank { grid-column: 1 / -1; display: flex; min-height: 150px; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #ffffff25; border-radius: 16px; color: #e2e8ed; font-size: 18px; font-weight: 700; }
.empty-rank span { margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 400; }
.rank-list { overflow: hidden; margin-top: 13px; border: 1px solid #ffffff14; border-radius: 15px; background: #080a0b54; }
.rank-row { display: flex; min-height: 65px; align-items: center; gap: 18px; padding: 11px 18px; border-bottom: 1px solid #ffffff10; }
.rank-row:last-child { border-bottom: 0; }
.rank-number { width: 26px; color: #aeb8c2; font-size: 17px; font-weight: 800; text-align: center; }
.row-thumb-link { flex: 0 0 116px; }
.row-thumb-link .rank-thumb { width: auto; max-width: 116px; max-height: 78px; }
.rank-details { display: flex; min-width: 0; flex: 1; align-items: center; justify-content: space-between; gap: 18px; }
.rank-details b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-details a { color: #8996a3; font-size: 11px; text-decoration: none; white-space: nowrap; }
.rank-row > strong { min-width: 90px; font-size: 16px; text-align: right; }
.rank-row > strong small { color: #8996a3; font-size: 11px; font-weight: 500; }
.lookup, .box { margin-top: 18px; padding: 23px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.lookup { scroll-margin-top: 24px; }
.lookup h2 { margin: 5px 0 6px; font-size: 20px; }
.lookup .eyebrow { font-size: 10px; }
.form { display: flex; gap: 10px; margin-top: 17px; }
.form input { min-width: 0; flex: 1; padding: 13px; border: 1px solid #353c45; border-radius: 9px; color: white; background: #080a0d; }
.form button { padding: 0 20px; border: 0; border-radius: 9px; color: #12170f; background: var(--accent); font-weight: 850; cursor: pointer; }
.form button:disabled { opacity: .6; }
.status { margin-top: 12px; color: #a9b2bd; font-size: 13px; }
.ok { color: #8ce3a5; }
.err { color: #ff9a9a; }
.hidden { display: none; }
.site-guide { margin-top: 22px; color: #c4ccd4; line-height: 1.8; }
.site-faq { margin-top: 22px; color: #c4ccd4; line-height: 1.8; }
.site-faq h2 { margin: 7px 0 13px; color: var(--text); font-size: 22px; }
.faq-item { padding: 13px 0; border-top: 1px solid #ffffff12; }
.faq-item h3 { margin: 0 0 5px; color: #e7edf2; font-size: 15px; }
.faq-item p { margin: 0; color: #aeb8c2; font-size: 14px; }
.site-guide h2 { margin: 7px 0 13px; color: var(--text); font-size: 22px; }
.site-guide h3 { margin: 24px 0 6px; color: #e7edf2; font-size: 16px; }
.site-guide p { margin: 7px 0; }
.guide-contact { padding: 11px 13px; border-left: 3px solid #d5a852; background: #d5a85212; color: #f3d796; }
.site-footer { display: flex; max-width: 1120px; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 auto 30px; padding: 18px 22px; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: #b6c0cb; font-size: 12px; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer small { font-size: 12px; }
.post { overflow: auto; margin-top: 15px; padding: 12px; border-radius: 10px; background: #080a0d; }
.muted { color: #87919d; font-size: 12px; }
.video-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 16px 0; padding: 14px; border-radius: 10px; background: #080a0d; }
.video-links a.action, button.action { display: inline-block; margin: 0; padding: 10px 13px; border: 0; border-radius: 8px; color: #111; background: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.video-links .muted { flex-basis: 100%; }
@media (max-width: 700px) {
  header { height: 60px; padding: 0 12px; }
  header b { font-size: 16px; }
  header small { font-size: 9px; }
  .header-actions { gap: 10px; }
  .header-actions > span { display: none; }
  .header-home { font-size: 11px; }
  .header-lookup { min-height: 38px; gap: 6px; padding: 0 11px; border-radius: 9px; font-size: 12px; }
  main { margin: 18px auto 50px; padding: 0 12px; }
  .ranking-hero { padding: 25px 17px 17px; border-radius: 18px; }
  .rank-total { min-width: 94px; padding: 11px 10px; }
  .rank-total strong { font-size: 24px; }
  .rank-total span { font-size: 9px; }
  .rank-heading p { max-width: 230px; font-size: 13px; }
  .rank-controls { margin-top: 22px; }
  .podium, .podium-2 { grid-template-columns: 1fr; gap: 8px; }
  .podium-1 .podium-card { grid-column: 1; max-width: none; }
  .podium-card, .podium-card.place-1 { min-height: 145px; padding: 14px 16px; }
  .podium-name { margin-top: 9px; }
  .rank-row { gap: 10px; padding: 11px 10px; }
  .row-thumb-link { flex: 0 0 78px; }
  .row-thumb-link .rank-thumb { max-width: 78px; max-height: 70px; }
  .rank-details { align-items: flex-start; flex-direction: column; gap: 3px; }
  .rank-row > strong { min-width: 72px; }
  .podium-name { margin-top: 9px; }
  .form { flex-direction: column; }
  .form button { min-height: 44px; }
  .lookup, .box { padding: 18px; }
  .site-footer { align-items: flex-start; flex-direction: column; padding: 16px 14px; }
  .site-footer nav { gap: 10px 15px; }
}
