:root {
  color-scheme: dark;
  --bg: #0a0c10;
  --surface: rgba(18, 21, 28, 0.82);
  --surface-strong: #12151c;
  --surface-soft: #161a22;
  --text: #f7f8fa;
  --muted: #9299a8;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #ff4655;
  --accent-2: #ff6b75;
  --good: #44d18c;
  --bad: #ff5f6d;
  --radius: 20px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,70,85,.08), transparent 26rem),
    linear-gradient(180deg, #090b0f 0%, #0b0d12 100%);
  color: var(--text);
  min-height: 100vh;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.ambient {
  position: fixed;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(90px);
  opacity: .12;
  z-index: -1;
}
.ambient-a { width: 320px; height: 320px; background: var(--accent); top: 12%; left: -150px; }
.ambient-b { width: 420px; height: 420px; background: #4b6cff; right: -260px; top: 40%; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.brand { display: inline-flex; gap: 11px; align-items: center; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--accent); border-radius: 11px; font-weight: 900;
  clip-path: polygon(0 0, 100% 0, 78% 100%, 22% 100%);
}
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font-size: 13px; letter-spacing: .08em; }
.brand small { font-size: 10px; letter-spacing: .22em; color: var(--muted); margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 28px; font-size: 13px; color: var(--muted); }
.nav a:hover { color: var(--text); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 116px 0 92px;
  text-align: center;
}
.eyebrow, .data-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: #c9ced8; letter-spacing: .12em;
  text-transform: uppercase;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 0 5px rgba(68,209,140,.08);
}
.hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: .98;
  letter-spacing: -.055em;
}
.hero-copy {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.search-card {
  margin: 40px auto 0;
  text-align: left;
  padding: 18px;
  border: 1px solid var(--border);
  background: rgba(15,18,24,.76);
  border-radius: 24px;
  backdrop-filter: blur(20px);
}
.search-card label {
  display: block;
  margin: 0 0 10px 4px;
  color: #c8cdd6;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
.search-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.input-wrap { position: relative; min-width: 0; }
.input-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  color: #6f7684; font-weight: 800;
}
input {
  width: 100%; height: 56px; border-radius: 15px;
  border: 1px solid var(--border); outline: none;
  padding: 0 18px 0 44px; color: var(--text);
  background: #0d1015;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: rgba(255,70,85,.65); box-shadow: 0 0 0 4px rgba(255,70,85,.08); }
.primary-button {
  height: 56px; min-width: 150px;
  border: 0; border-radius: 15px;
  background: var(--accent); color: white;
  padding: 0 20px; cursor: pointer; font-weight: 800;
  display: inline-flex; gap: 20px; align-items: center; justify-content: center;
}
.primary-button:hover { background: var(--accent-2); }
.primary-button:disabled { opacity: .6; cursor: wait; }

.search-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 4px 0; color: #6f7684; font-size: 12px; }
.text-button { border: 0; background: transparent; color: #cdd2dc; cursor: pointer; padding: 5px 0; }
.form-message { min-height: 18px; margin: 10px 4px 0; color: var(--muted); font-size: 12px; }
.form-message.error { color: #ff929b; }

.quick-points { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.quick-points span {
  border: 1px solid var(--border); color: #8e95a3;
  padding: 8px 11px; border-radius: 999px; font-size: 11px;
  background: rgba(255,255,255,.015);
}

.result-section { padding: 54px 0 80px; }
.result-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.back-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px 0; }

.profile-card, .panel, .metric-card {
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
}
.profile-card {
  min-height: 160px; border-radius: var(--radius); padding: 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.profile-main { display: flex; gap: 18px; align-items: center; min-width: 0; }
.avatar {
  width: 72px; height: 72px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 20px; background: linear-gradient(145deg, #ff4655, #9b2630);
  font-size: 26px; font-weight: 900;
}
.identity { min-width: 0; }
.identity-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.identity h2 { margin: 0; font-size: clamp(24px, 5vw, 38px); letter-spacing: -.04em; word-break: break-word; }
.identity-line span { color: var(--muted); font-size: 16px; }
.identity p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.rank-box { text-align: right; min-width: 130px; }
.rank-box span { display: block; color: var(--muted); font-size: 12px; }
.rank-box strong { display: block; margin: 5px 0; font-size: 22px; }
.rank-label { text-transform: uppercase; letter-spacing: .08em; }

.metric-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 12px 0;
}
.metric-card { border-radius: 17px; padding: 20px; }
.metric-card > span { color: var(--muted); font-size: 12px; }
.metric-card strong { display: block; margin: 9px 0 5px; font-size: 28px; letter-spacing: -.03em; }
.metric-card small { color: #707785; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .65fr); gap: 12px; }
.panel { border-radius: var(--radius); padding: 24px; min-width: 0; }
.panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h3 { margin: 5px 0 0; font-size: 20px; }
.section-kicker { color: var(--accent-2); font-size: 10px; letter-spacing: .18em; font-weight: 800; }
.muted { color: var(--muted); font-size: 12px; }

.match-list { display: grid; gap: 8px; }
.match {
  display: grid;
  grid-template-columns: 5px minmax(110px, .9fr) minmax(120px, 1fr) minmax(130px, .9fr);
  gap: 14px; align-items: center;
  min-height: 76px;
  padding: 10px 14px 10px 0;
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.018);
  border-radius: 14px;
  overflow: hidden;
}
.match-accent { width: 5px; height: 100%; border-radius: 99px; background: var(--muted); }
.match.win .match-accent { background: var(--good); }
.match.loss .match-accent { background: var(--bad); }
.match-result strong, .match-score strong, .match-agent strong, .match-stats strong { display: block; }
.match-result small, .match-score small, .match-agent small, .match-stats small { color: var(--muted); font-size: 11px; margin-top: 5px; display: block; }
.match.win .match-result strong { color: var(--good); }
.match.loss .match-result strong { color: #ff7e89; }
.match-stats { text-align: right; }

.side-stat {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 15px 0; border-bottom: 1px solid var(--border);
}
.side-stat span { color: var(--muted); font-size: 12px; }
.side-stat strong { font-size: 14px; text-align: right; }
.side-note { color: #757c89; font-size: 12px; line-height: 1.7; margin: 18px 0 0; }

.features { padding: 90px 0 110px; border-top: 1px solid var(--border); }
.features > div:first-child { max-width: 600px; }
.features h2 { font-size: clamp(30px, 5vw, 48px); margin: 10px 0 34px; letter-spacing: -.04em; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feature-grid article {
  min-height: 220px; padding: 26px; border: 1px solid var(--border);
  border-radius: var(--radius); background: rgba(255,255,255,.015);
}
.feature-grid article > span { color: var(--accent); font-size: 12px; font-weight: 800; }
.feature-grid h3 { margin: 52px 0 9px; }
.feature-grid p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }

footer {
  width: min(1180px, calc(100% - 40px)); margin: 0 auto;
  padding: 26px 0 40px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  color: #666d79; font-size: 11px;
}

@media (max-width: 800px) {
  .nav a:not(:last-child) { display: none; }
  .site-header, main, footer { width: min(100% - 26px, 1180px); }
  .hero { padding: 82px 0 64px; }
  .search-row { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .profile-card { align-items: flex-start; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header { height: 70px; }
  .hero h1 { font-size: 46px; }
  .hero-copy { font-size: 14px; }
  .search-card { padding: 13px; border-radius: 19px; }
  .profile-card { flex-direction: column; padding: 20px; }
  .rank-box { text-align: left; }
  .avatar { width: 58px; height: 58px; border-radius: 16px; }
  .metric-card { padding: 16px; }
  .metric-card strong { font-size: 24px; }
  .panel { padding: 18px; }
  .match {
    grid-template-columns: 5px 1fr 1fr;
    gap: 10px;
    padding-right: 10px;
  }
  .match-agent { grid-column: 2; }
  .match-stats { grid-column: 3; grid-row: 2; }
  .match-score { text-align: right; }
  .features { padding-top: 70px; }
}
