:root {
  --bg: #07080d;
  --bg-soft: #0d0f18;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e9e9f2;
  --text-dim: #9a9bb0;
  --accent: #7c5cff;
  --accent-2: #38e0d8;
  --accent-3: #ff5c8a;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg: #f4f5fa;
  --bg-soft: #ffffff;
  --panel: rgba(15, 15, 30, 0.04);
  --panel-border: rgba(15, 15, 30, 0.1);
  --text: #16161f;
  --text-dim: #5c5d70;
  --shadow: 0 20px 60px rgba(20, 20, 40, 0.12);
}

[data-theme="light"] body {
  background: radial-gradient(circle at 20% -10%, rgba(124, 92, 255, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, rgba(56, 224, 216, 0.1) 0%, transparent 40%),
    var(--bg);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  background: radial-gradient(circle at 20% -10%, #1b1440 0%, transparent 45%),
    radial-gradient(circle at 90% 10%, #0d3934 0%, transparent 40%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 24px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 8, 13, 0.7);
  border-bottom: 1px solid var(--panel-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand .logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-size: 14px;
  color: #05060a;
  font-weight: 800;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 30px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.main-nav a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.main-nav a:hover, .main-nav a.active { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--panel-border);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #a685ff);
  color: #fff;
  border: none;
  box-shadow: 0 8px 24px rgba(124, 92, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(124, 92, 255, 0.5); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent-2), #1fb3ad);
  color: #04211f;
  border: none;
}
.btn-accent:hover { transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 60px;
  position: relative;
}

.search-loading { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(5,6,12,.72); backdrop-filter: blur(12px); }
.search-loader-card { width: min(360px, calc(100% - 40px)); padding: 30px; text-align: center; border: 1px solid var(--panel-border); border-radius: 20px; background: var(--bg-soft); box-shadow: var(--shadow); animation: detail-in .25s ease both; }
.loader-ring { width: 58px; height: 58px; margin: 0 auto 20px; border: 4px solid rgba(56,224,216,.16); border-top-color: var(--accent-2); border-right-color: var(--accent); border-radius: 50%; animation: loader-spin .85s linear infinite; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
.search-loader-card strong { display: block; font-size: 16px; }
.search-loader-card span { display: block; color: var(--text-dim); font-size: 12px; margin-top: 8px; }
.loader-progress { height: 5px; margin-top: 22px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.loader-progress i { display: block; width: 42%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); animation: loader-progress 1.2s ease-in-out infinite; }
@keyframes loader-progress { 0% { transform: translateX(-120%); } 100% { transform: translateX(260%); } }

.eyebrow {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 20px;
  font-weight: 800;
}

.hero h1 .grad {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 32px;
}

/* ---------- Section titles ---------- */
.section { padding: 70px 0; }

.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; font-weight: 800; }
.section-head p { color: var(--text-dim); line-height: 1.6; }

/* ---------- Tracker ---------- */
.tracker-search {
  display: flex;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 10px;
  border-radius: 16px;
  max-width: 560px;
  margin: 0 auto 50px;
}
.tracker-search > * { min-width: 0; }
.tracker-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 14px;
  padding: 8px 12px;
}
.tracker-search select {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

/* ---------- Player toolbar ---------- */
.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}
.player-toolbar-left { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 13px; }
.player-toolbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.icon-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }

/* Player profile banner */
.player-banner {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  padding: 24px 28px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background-size: cover;
  background-position: center 25%;
  isolation: isolate;
  margin-bottom: 22px;
}
.player-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(7,8,13,0.94) 20%, rgba(7,8,13,0.55) 75%);
  z-index: -1;
}
.player-banner-left { display: flex; align-items: center; gap: 18px; }

.avatar-wrap { position: relative; width: 88px; height: 88px; flex-shrink: 0; }
.avatar-wrap img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; border: 2px solid rgba(255,255,255,0.15); background: #12131c; }
.avatar-region {
  position: absolute; top: -8px; left: -8px;
  background: var(--accent-3); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 2px 6px; border-radius: 6px;
}
.avatar-level {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  background: #0d0e17; border: 2px solid var(--accent-2); color: var(--accent-2);
  font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px;
  white-space: nowrap;
}

.player-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.player-name-row h1 { margin: 0; font-size: 28px; }
.player-name-row .tag-part { color: var(--text-dim); font-weight: 600; }
.verified-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 7px; vertical-align: 3px; border-radius: 50%; background: #3195ff; color: #fff; font-size: 12px; font-weight: 900; box-shadow: 0 0 0 3px rgba(49,149,255,.14); }
.player-name-row .level-pill { font-size: 11px; background: rgba(255,255,255,0.08); padding: 4px 10px; border-radius: 999px; color: var(--text-dim); }

.puuid-row { font-size: 11px; color: var(--text-dim); font-family: "Fira Code", monospace; margin-top: 6px; }
.last-update { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.rank-pills { display: flex; gap: 12px; flex-wrap: wrap; }
.rank-pill {
  background: rgba(5, 6, 10, 0.55);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 12px 18px;
  min-width: 140px;
}
.rank-pill .pill-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.rank-pill .pill-value { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.rank-pill .pill-value img { width: 26px; height: 26px; }
.rank-pill .pill-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.rr-change.negative { color: var(--accent-3); font-weight: 800; }
.rr-change.positive { color: var(--accent-2); font-weight: 800; }

/* Stat strip */
.stat-strip { display: flex; gap: 12px; margin: 0 0 24px; flex-wrap: wrap; }
.stat-pill-box {
  flex: 1; min-width: 95px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.stat-pill-box .val { font-size: 18px; font-weight: 800; }
.stat-pill-box .lbl { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 4px; }
.stat-pill-box.bilan { flex-direction: row; display: flex; align-items: center; gap: 14px; text-align: left; flex: 1.6; min-width: 170px; }

.bilan-donut {
  width: 60px; height: 60px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}
.bilan-legend { font-size: 12px; color: var(--text-dim); line-height: 1.8; }
.bilan-legend .win-dot, .bilan-legend .loss-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.bilan-legend .win-dot { background: var(--accent-2); }
.bilan-legend .loss-dot { background: var(--accent-3); }

/* Two-column layout: matches + sidebar */
.player-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.player-main, .player-sidebar, .player-banner-left, .rank-pills { min-width: 0; }
.player-main { container: profile-main / inline-size; }
.player-sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 90px; }

.side-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 18px;
}
.side-card h3 { margin: 0 0 14px; font-size: 13px; }
.rr-chart-caption { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-dim); margin-top: 8px; }
.rr-rank-sequence { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--panel-border); }
.rr-sequence-rank { display: inline-flex; align-items: center; gap: 3px; padding: 3px 5px; border-radius: 6px; background: rgba(255,255,255,.04); color: var(--text-dim); font-size: 8px; }
.rr-sequence-rank img { width: 16px; height: 16px; object-fit: contain; }
.rr-sequence-rank small { font-size: 8px; white-space: nowrap; }
.rr-sequence-arrow { color: var(--text-dim); font-size: 14px; }

.agent-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.agent-row:last-child { margin-bottom: 0; }
.agent-row img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; background: #12131c; }
.agent-row .info { flex: 1; }
.agent-row .info .name { font-size: 13px; font-weight: 700; }
.agent-row .info .wr { font-size: 11px; color: var(--text-dim); }
.agent-row .count { font-size: 11px; color: var(--text-dim); }

.map-bar-row { margin-bottom: 12px; }
.map-bar-row:last-child { margin-bottom: 0; }
.map-bar-row .head { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.map-bar-track { height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.map-bar-fill { height: 100%; border-radius: 999px; }

.accuracy-track { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.accuracy-legend { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-dim); flex-wrap: wrap; gap: 6px; }
.accuracy-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.head-dot { background: #ff5c8a; }
.body-dot { background: #7c5cff; }
.legs-dot { background: #38e0d8; }

.accuracy-figure { position: relative; width: 150px; height: 176px; margin: 4px auto 18px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.2)); }
.figure-head, .figure-body, .figure-legs { position: absolute; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.figure-head { top: 0; left: 56px; width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff9bb8, #ff5c8a 70%); box-shadow: 0 0 0 5px rgba(255,92,138,.12), inset -4px -5px 0 rgba(120,20,65,.15); }
.figure-body { top: 47px; left: 49px; width: 52px; height: 70px; border-radius: 18px 18px 12px 12px; clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); background: linear-gradient(100deg, #a18cff, #7c5cff 55%, #5540bf); box-shadow: 0 0 0 5px rgba(124,92,255,.12); }
.figure-arms, .figure-arms::before { position: absolute; display: block; width: 9px; height: 62px; border-radius: 999px; background: linear-gradient(#a18cff, #694de4); content: ""; }
.figure-arms { top: 53px; left: 38px; transform: rotate(13deg); }
.figure-arms::before { top: 0; left: 65px; transform: rotate(-26deg); }
.figure-legs { top: 124px; left: 50px; width: 50px; height: 45px; border-radius: 0 0 16px 16px; background: linear-gradient(100deg, #70f2e8, #38e0d8); box-shadow: 0 0 0 5px rgba(56,224,216,.12); }
.figure-legs::before, .figure-legs::after { position: absolute; bottom: -18px; width: 9px; height: 38px; border-radius: 999px; background: linear-gradient(#70f2e8, #25aaa4); content: ""; }
.figure-legs::before { left: 7px; transform: rotate(5deg); }
.figure-legs::after { right: 7px; transform: rotate(-5deg); }
.figure-arms { display: none; }
.figure-legs { display: grid; }

.rr-chart-wrap { position: relative; padding-top: 32px; }
.rr-rank-markers { position: absolute; inset: 0 0 auto; height: 30px; pointer-events: none; }
.rr-rank-marker { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; }
.rr-rank-marker img { width: 20px; height: 20px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.rr-rank-marker::after { content: ""; width: 1px; height: 7px; background: rgba(255,207,92,.7); }
.rank-up-dot { stroke: #ffcf5c; stroke-width: 2; filter: drop-shadow(0 0 4px rgba(255,207,92,.8)); }
.rank-up-marker span { color: #ffcf5c; }
.rank-down-marker::after { background: rgba(255,92,138,.8); }
.rank-down-marker span { color: var(--accent-3); }

.section-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 22px;
  margin-right: 6px;
  border-radius: 6px;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(124, 92, 255, 0.35);
  color: var(--accent-2);
  font-size: 9px;
  letter-spacing: .4px;
  vertical-align: middle;
}

.theme-toggle { width: 34px; height: 32px; padding: 8px; justify-content: center; }
.theme-toggle::before {
  content: "";
  display: block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ffcf5c;
  box-shadow: 0 0 0 3px rgba(255, 207, 92, 0.16), 0 0 12px rgba(255, 207, 92, 0.55);
}
.theme-toggle.light-mode::before {
  background: transparent;
  box-shadow: inset -4px -2px 0 0 var(--text), 0 0 0 2px var(--text);
}
.act-row { min-height: 56px; }
.act-rank-icon { width: 30px; height: 30px; object-fit: contain; flex-shrink: 0; }

/* Filter bar */
.filter-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.filter-left { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pc-console-toggle { display: flex; background: var(--panel); border: 1px solid var(--panel-border); border-radius: 10px; overflow: hidden; }
.pc-console-toggle span { padding: 8px 16px; font-size: 13px; cursor: pointer; color: var(--text-dim); }
.pc-console-toggle span.active { background: var(--accent-3); color: #fff; }
.select-pill {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px 30px 8px 14px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239a9bb0'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.select-pill option { background: #10121c; color: var(--text); }

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: #14151f;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.notification-open { overflow: hidden; }
.site-notification-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 9, .78);
  backdrop-filter: blur(10px);
  animation: detail-in .2s ease both;
}
.site-notification-modal {
  width: min(440px, 100%);
  padding: 30px 28px 26px;
  text-align: center;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--bg-soft);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .55);
}
.site-notification-mark {
  width: 42px;
  height: 42px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(56, 224, 216, .14);
  color: var(--accent-2);
  font-size: 22px;
  font-weight: 800;
}
.site-notification-modal h2 { margin: 0; font-size: 20px; }
.site-notification-modal p { margin: 12px 0 22px; color: var(--text-dim); line-height: 1.6; }
.site-notification-close { min-width: 110px; justify-content: center; }

/* ---------- Discord / liaison Riot ---------- */
.auth-status {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 4, 9, .74);
  backdrop-filter: blur(10px);
}
.auth-panel {
  position: relative;
  width: min(440px, 100%);
  padding: 26px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}
.auth-close { position: absolute; top: 14px; right: 14px; }
.auth-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--panel); object-fit: cover; }
.auth-heading strong { display: block; font-size: 16px; }
.auth-heading span { display: block; color: var(--accent-2); font-size: 11px; margin-top: 3px; }
.linked-riot { display: grid; gap: 4px; padding: 14px; margin-bottom: 16px; border-radius: 12px; border: 1px solid rgba(56,224,216,.25); background: rgba(56,224,216,.08); }
.linked-riot span, .linked-riot small { color: var(--text-dim); font-size: 11px; }
.linked-riot strong { font-size: 17px; }
.auth-explanation { color: var(--text-dim); font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.auth-explanation strong { color: var(--text); display: block; font-size: 16px; margin-bottom: 6px; }
.auth-explanation p { margin: 0 0 8px; }
.auth-explanation ol { margin: 0; padding-left: 18px; }
.link-riot-form { display: grid; grid-template-columns: 1fr 100px; gap: 8px; margin-bottom: 18px; }
.link-riot-form input, .link-riot-form select { width: 100%; min-width: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--panel-border); background: var(--panel); color: var(--text); outline: none; }
.link-riot-form button { grid-column: 1 / -1; justify-content: center; }
.auth-logout { margin-top: 18px; width: 100%; justify-content: center; }

/* Match rows (detailed, with images) */
.match-list { display: flex; flex-direction: column; gap: 10px; }

.match-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
}
.match-clickable { cursor: pointer; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.match-clickable:hover, .match-clickable:focus-visible { border-color: rgba(56, 224, 216, .5); background: rgba(56, 224, 216, .06); transform: translateY(-1px); }
.match-row.win { border-left: 3px solid var(--accent-2); }
.match-row.loss { border-left: 3px solid var(--accent-3); }

.match-thumb {
  width: 66px; height: 50px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #12131c;
}
.match-mode { width: 96px; flex-shrink: 0; }
.match-mode .map-name { font-size: 13px; font-weight: 700; }
.match-mode .mode-name { font-size: 10px; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.5px; }
.match-agent {
  width: 36px; height: 36px; border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #12131c;
}
.match-score-col { width: 74px; flex-shrink: 0; text-align: center; }
.match-score-col .score { font-weight: 800; font-size: 15px; }
.match-score-col .result { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.match-row.win .result { color: var(--accent-2); }
.match-row.loss .result { color: var(--accent-3); }

.match-stat { width: 58px; text-align: center; flex-shrink: 0; }
.match-stat .v { font-weight: 700; font-size: 13px; }
.match-stat .l { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.3px; }

.match-badges { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 90px; }
.match-badge {
  font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.08); color: var(--text-dim); white-space: nowrap;
}
.match-badge.good { background: rgba(56,224,216,0.15); color: var(--accent-2); }

.match-kda { flex: 1; font-size: 13px; color: var(--text-dim); min-width: 140px; }
.match-tier { display: flex; align-items: center; gap: 8px; width: 130px; justify-content: flex-end; flex-shrink: 0; }
.match-rr { font-size: 13px; font-weight: 700; width: 55px; text-align: right; flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.match-rr img { width: 16px; height: 16px; }
.rank-placeholder { display: inline-grid; place-items: center; width: 20px; height: 16px; border-radius: 5px; background: rgba(255,255,255,.12); color: var(--text-dim); font-size: 7px; font-weight: 800; letter-spacing: .2px; }
.match-row.win .match-rr { color: var(--accent-2); }
.match-row.loss .match-rr { color: var(--accent-3); }
.match-rr.rr-positive { color: var(--accent-2) !important; }
.match-rr.rr-negative { color: var(--accent-3) !important; }
.match-meta { width: 120px; flex-shrink: 0; text-align: right; font-size: 10px; color: var(--text-dim); line-height: 1.5; }
.tier-chip {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  white-space: nowrap;
}

@container profile-main (max-width: 900px) {
  .match-row { flex-wrap: wrap; }
  .match-kda, .match-tier, .match-meta, .match-badges { width: 100%; justify-content: flex-start; text-align: left; }
}

@container profile-main (min-width: 600px) and (max-width: 900px) {
  .match-row { position: relative; flex-wrap: nowrap; min-height: 88px; padding-bottom: 27px; gap: 10px; }
  .match-mode { width: 86px; }
  .match-score-col { width: 64px; }
  .match-stat { width: 50px; }
  .match-badges { display: none; }
  .match-rr { margin-left: auto; }
  .match-meta { position: absolute; left: 106px; bottom: 7px; width: auto; text-align: left; font-size: 9px; line-height: 1.2; }
}

/* ---------- Détail d'un match ---------- */
.modal-open { overflow: hidden; }
.match-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 4, 9, .78);
  backdrop-filter: blur(10px);
}
.match-detail-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(720px, 92vh);
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: var(--bg-soft);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .55);
  animation: detail-in .22s ease both;
}
@keyframes detail-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.detail-close { position: absolute; right: 14px; top: 14px; z-index: 2; background: rgba(5, 6, 10, .65); color: #fff; }
.detail-hero { position: relative; height: 190px; overflow: hidden; }
.detail-map-image { width: 100%; height: 100%; object-fit: cover; opacity: .8; }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7,8,13,.95), transparent 70%); }
.detail-hero-overlay { position: absolute; inset: auto 22px 18px; z-index: 1; display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.detail-map-name { font-size: 24px; font-weight: 800; text-transform: uppercase; }
.detail-mode { color: var(--accent-2); font-size: 11px; text-transform: uppercase; letter-spacing: .8px; margin-top: 4px; }
.detail-result { font-size: 18px; font-weight: 800; text-align: right; }
.detail-result.win { color: var(--accent-2); }
.detail-result.loss { color: var(--accent-3); }
.detail-summary { display: grid; grid-template-columns: 1fr 1fr auto; align-items: center; gap: 18px; padding: 20px 22px; border-bottom: 1px solid var(--panel-border); }
.detail-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.detail-person img { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; background: #12131c; }
.detail-person strong, .detail-rr-block strong { display: block; font-size: 14px; margin-top: 3px; }
.detail-kicker { display: block; color: var(--text-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .5px; }
.detail-rr-block { text-align: right; }
.detail-rr { color: var(--accent-2); }
.detail-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 20px 22px; }
.detail-stats > div { padding: 13px 8px; text-align: center; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); }
.detail-stats span { display: block; color: var(--text-dim); font-size: 10px; text-transform: uppercase; }
.detail-stats strong { display: block; margin-top: 5px; font-size: 17px; }
.detail-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 0 22px 22px; flex-wrap: wrap; }
.detail-badges { display: flex; gap: 7px; flex-wrap: wrap; }
.detail-empty, .detail-date { color: var(--text-dim); font-size: 11px; }

.detail-match-meta { display: flex; justify-content: space-between; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--panel-border); color: var(--text-dim); font-size: 10px; flex-wrap: wrap; }
.detail-match-meta strong { color: var(--text); font-weight: 700; }
.detail-match-id { max-width: 250px; display: inline-block; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.detail-scoreboard { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 18px 22px 4px; }
.score-team { min-width: 120px; text-align: center; padding: 10px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--panel-border); }
.score-team span { display: block; color: var(--text-dim); font-size: 10px; letter-spacing: .7px; }
.score-team strong { display: block; margin-top: 4px; font-size: 24px; }
.score-divider { color: var(--text-dim); font-size: 22px; }
.detail-scoreboard-table-wrap { padding: 0 22px 22px; }
.detail-table-heading { display: flex; justify-content: space-between; align-items: center; margin: 10px 0; }
.detail-table-heading strong { font-size: 14px; }
.detail-table-heading span { color: var(--text-dim); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; }
.detail-scoreboard-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; font-size: 11px; }
.detail-scoreboard-table th:nth-child(1), .detail-scoreboard-table td:nth-child(1) { width: 132px; }
.detail-scoreboard-table th:nth-child(2), .detail-scoreboard-table td:nth-child(2) { width: 108px; }
.detail-scoreboard-table th:nth-child(3), .detail-scoreboard-table td:nth-child(3) { width: 100px; }
.detail-scoreboard-table th { padding: 8px 8px 10px; color: var(--text-dim); text-align: right; font-size: 9px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--panel-border); }
.detail-scoreboard-table th:first-child, .detail-scoreboard-table td:first-child, .detail-scoreboard-table th:nth-child(2), .detail-scoreboard-table td:nth-child(2) { text-align: left; }
.detail-scoreboard-table td { padding: 9px 8px; text-align: right; white-space: nowrap; background: var(--panel); border-top: 1px solid transparent; border-bottom: 1px solid transparent; }
.scoreboard-rank { text-align: left !important; color: var(--text-dim); overflow: hidden; }
.scoreboard-rank img { display: inline-block; width: 22px; height: 22px; margin-right: 5px; object-fit: contain; vertical-align: middle; }
.scoreboard-rank span { overflow: hidden; text-overflow: ellipsis; }
.detail-scoreboard-table tr:not(.team-divider):hover td { background: rgba(124, 92, 255, .1); }
.detail-scoreboard-table .player-profile-row { cursor: pointer; }
.detail-scoreboard-table .player-profile-row:focus-visible td { outline: 2px solid var(--accent-2); outline-offset: -2px; }
.detail-scoreboard-table .team-a-row td:first-child { border-left: 2px solid var(--accent-2); border-radius: 9px 0 0 9px; padding-left: 10px; }
.detail-scoreboard-table .team-b-row td:first-child { border-left: 2px solid var(--accent-3); border-radius: 9px 0 0 9px; padding-left: 10px; }
.detail-scoreboard-table .team-a-row td:last-child, .detail-scoreboard-table .team-b-row td:last-child { border-radius: 0 9px 9px 0; }
.detail-scoreboard-table td:first-child strong { display: block; font-size: 11px; }
.detail-scoreboard-table td:first-child small { color: var(--text-dim); font-size: 9px; }
.detail-scoreboard-table td:nth-child(4) { font-weight: 700; letter-spacing: .2px; }
.detail-scoreboard-table td:nth-child(5), .detail-scoreboard-table td:nth-child(6) { color: var(--accent-2); font-weight: 700; }
.table-agent { width: 24px; height: 24px; border-radius: 7px; object-fit: cover; vertical-align: middle; margin-right: 6px; background: #12131c; box-shadow: 0 0 0 1px var(--panel-border); }
.team-divider td { padding: 12px 4px 5px; background: transparent; border: 0; color: var(--text-dim); font-size: 9px; font-weight: 800; letter-spacing: .8px; text-align: center !important; }
.team-divider span { display: inline-block; width: 28px; height: 1px; margin: 0 8px 3px; background: var(--panel-border); }
.team-a-divider td { color: var(--accent-2); }
.team-b-divider td { color: var(--accent-3); }
.current-player-row td { background: rgba(56, 224, 216, .1); }
.current-player-row td:first-child strong::after { content: "VOUS"; margin-left: 7px; padding: 2px 5px; border-radius: 4px; background: rgba(56, 224, 216, .16); color: var(--accent-2); font-size: 8px; letter-spacing: .4px; vertical-align: 1px; }

@media (max-width: 560px) {
  .match-detail-overlay { padding: 10px; }
  .detail-summary { grid-template-columns: 1fr 1fr; }
  .detail-rr-block { grid-column: 1 / -1; text-align: left; }
  .detail-stats { grid-template-columns: repeat(2, 1fr); }
  .detail-result { font-size: 14px; }
  .detail-match-meta { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-scoreboard-table-wrap { overflow-x: auto; }
  .detail-scoreboard-table { min-width: 500px; table-layout: fixed; }
  .detail-scoreboard-table th:nth-child(1), .detail-scoreboard-table td:nth-child(1) { width: 112px; }
  .detail-scoreboard-table th:nth-child(2), .detail-scoreboard-table td:nth-child(2) { width: 88px; }
  .detail-scoreboard-table th:nth-child(3), .detail-scoreboard-table td:nth-child(3) { width: 82px; }
  .detail-scoreboard-table th:nth-child(4), .detail-scoreboard-table td:nth-child(4) { width: 70px; }
  .detail-scoreboard-table th:nth-child(5), .detail-scoreboard-table td:nth-child(5) { width: 55px; }
  .detail-scoreboard-table th:nth-child(6), .detail-scoreboard-table td:nth-child(6) { width: 55px; }
  .detail-scoreboard-table th:nth-child(7), .detail-scoreboard-table td:nth-child(7),
  .detail-scoreboard-table th:nth-child(8), .detail-scoreboard-table td:nth-child(8) { display: none; }
  .detail-scoreboard-table td { padding: 8px 5px; }
  .scoreboard-rank img { width: 19px; height: 19px; margin-right: 3px; }
  .table-agent { width: 21px; height: 21px; margin-right: 3px; }
}



/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 60px 0 30px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about p { color: var(--text-dim); font-size: 13px; line-height: 1.7; margin-top: 14px; max-width: 320px; }

.footer-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 16px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: var(--text-dim); }
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--panel-border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .site-header .container { height: auto; min-height: 68px; padding-top: 10px; padding-bottom: 10px; gap: 12px; }
  .main-nav { gap: 16px; }
  .header-actions { gap: 8px; }
  .header-actions .btn { padding-left: 12px; padding-right: 12px; }
  .stat-pill-box { min-width: 88px; }
  .match-row { flex-wrap: wrap; }
  .match-kda, .match-tier, .match-meta, .match-badges { width: 100%; justify-content: flex-start; text-align: left; }
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; }
  .player-layout { grid-template-columns: 1fr; }
  .player-sidebar { position: static; }
  .player-banner { flex-direction: column; align-items: flex-start; }
  .player-banner-left { width: 100%; }
  .rank-pills { width: 100%; }
  .rank-pill { flex: 1 1 190px; }
  .stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat-pill-box, .stat-pill-box.bilan { min-width: 0; }
  .match-row { flex-wrap: wrap; }
  .match-kda, .match-tier, .match-meta, .match-badges { width: 100%; justify-content: flex-start; text-align: left; }
}

@media (max-width: 560px) {
  .container { padding-left: 12px; padding-right: 12px; }
  .site-header .container { align-items: center; }
  .brand { font-size: 13px; gap: 7px; }
  .brand-logo { width: 26px; height: 26px; flex-basis: 26px; }
  .header-actions { margin-left: auto; }
  .header-actions .btn-ghost { display: none; }
  .header-actions .btn-primary { padding: 8px 10px; font-size: 11px; white-space: nowrap; }
  .theme-toggle { width: 34px; height: 34px; padding: 7px; }
  .main-nav { display: none; }
  .hero { padding: 58px 0 34px; }
  .hero h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .hero p { font-size: 14px; line-height: 1.55; }
  .tracker-search { align-items: stretch; flex-direction: column; gap: 8px; padding: 9px; margin-bottom: 30px; }
  .tracker-search input, .tracker-search select, .tracker-search button { width: 100%; min-height: 42px; }
  .tracker-search input { flex: initial; }
  .suggestion-panel { margin-top: -18px; }
  .section { padding: 42px 0; }
  .player-toolbar { align-items: stretch; }
  .player-toolbar-left, .player-toolbar-right { width: 100%; }
  .player-toolbar-right .icon-btn { flex: 1; justify-content: center; }
  .player-banner { padding: 18px 16px; gap: 18px; }
  .player-banner-left { align-items: flex-start; gap: 12px; }
  .avatar-wrap { width: 68px; height: 68px; }
  .player-name-row h1 { font-size: 21px; overflow-wrap: anywhere; }
  .puuid-row { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rank-pills { gap: 8px; }
  .rank-pill { min-width: 0; padding: 10px; }
  .rank-pill .pill-value { font-size: 13px; }
  .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-pill-box.bilan { grid-column: 1 / -1; justify-content: center; }
  .stat-pill-box { min-height: 76px; padding: 10px 6px; }
  .stat-pill-box .val { font-size: 16px; }
  .match-row { flex-wrap: wrap; }
  .match-kda, .match-tier, .match-meta, .match-badges { width: 100%; justify-content: flex-start; text-align: left; }
  .stat-strip { gap: 8px; }
  .stat-pill-box { min-width: 80px; }
  .match-row { gap: 10px; }
  .match-thumb { width: 54px; height: 42px; }
  .match-mode { width: auto; flex: 1; min-width: 90px; }
  .match-score-col { width: 64px; }
  .match-agent { width: 32px; height: 32px; }
  .match-stat { width: 52px; }
  .filter-row { align-items: stretch; }
  .filter-left { width: 100%; }
  .filter-left > * { flex: 1 1 calc(50% - 8px); }
  .filter-left .pc-console-toggle { flex-basis: 100%; }
  .pc-console-toggle span { flex: 1; text-align: center; }
  #match-count { width: 100%; }
  .player-sidebar { gap: 12px; }
  .side-card { padding: 16px; }
}

@media (max-width: 380px) {
  .header-actions .btn-primary { max-width: 116px; overflow: hidden; text-overflow: ellipsis; }
  .player-banner-left { flex-direction: column; }
  .rank-pills { flex-direction: column; }
  .rank-pill { width: 100%; }
  .match-stat { width: 48px; }
  .match-stat:nth-of-type(n + 4) { display: none; }
  .detail-scoreboard { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .score-team { min-width: 0; width: 42%; padding: 9px 8px; }
}

/* ---------- Utilitaires ---------- */
.hidden { display: none !important; }

/* Focus clavier visible partout (accessibilité) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Recherche : erreurs et historique ---------- */
.tracker-error {
  max-width: 560px;
  margin: 0 auto 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 92, 138, 0.12);
  border: 1px solid rgba(255, 92, 138, 0.35);
  color: var(--accent-3);
  font-size: 13px;
}

.recent-searches {
  max-width: 560px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.recent-label { font-size: 12px; color: var(--text-dim); }
.recent-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.recent-chip {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  color: var(--text);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.recent-chip:hover { border-color: rgba(124, 92, 255, 0.5); }
.recent-region { color: var(--text-dim); font-size: 10px; }

.suggestion-panel { position: relative; z-index: 20; width: min(560px, 100%); max-height: 430px; overflow-y: auto; margin: -38px auto 28px; padding: 10px; border: 1px solid var(--panel-border); border-radius: 14px; background: rgba(8,10,18,.97); box-shadow: var(--shadow); text-align: left; }
.suggestion-section-title { padding: 8px 7px 6px; color: var(--text-dim); font-size: 10px; font-weight: 800; letter-spacing: .7px; }
.suggestion-item { display: flex; align-items: center; width: 100%; gap: 10px; padding: 9px 8px; border: 0; border-radius: 9px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.suggestion-item:hover, .suggestion-item:focus-visible { background: rgba(124,92,255,.14); outline: 0; }
.suggestion-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; background: linear-gradient(135deg,var(--accent),var(--accent-2)); color: #07080d; font-size: 11px; font-weight: 900; }
.suggestion-copy { flex: 1; min-width: 0; }
.suggestion-copy strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion-copy em { color: var(--text-dim); font-style: normal; font-weight: 500; }
.suggestion-copy small { display: block; margin-top: 3px; color: var(--text-dim); font-size: 10px; }
.suggestion-region { color: var(--text-dim); font-size: 10px; }
.suggestion-star { color: var(--text-dim); font-size: 18px; }
.suggestion-empty { padding: 22px 10px; color: var(--text-dim); font-size: 13px; text-align: center; }

/* ---------- Skeleton de chargement ---------- */
.loading-state { display: flex; flex-direction: column; gap: 16px; }
.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, rgba(255,255,255,0.08) 37%, var(--panel) 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 14px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.skeleton-banner { height: 140px; border-radius: var(--radius); }
.skeleton-row { display: flex; gap: 16px; }
.skeleton-box { flex: 1; height: 70px; }
.skeleton-line { height: 60px; }

.not-found-state {
  text-align: center;
  padding: 60px 20px;
}
.not-found-state h1 { margin: 0 0 10px; }
.not-found-state p { color: var(--text-dim); margin: 0 0 24px; }

/* ---------- Animation d'entrée des lignes de match ---------- */
@keyframes match-row-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.match-enter { animation: match-row-in 0.35s ease both; }

/* ---------- Tooltip du graphique RR ---------- */
.rr-tooltip {
  position: absolute;
  background: #14151f;
  border: 1px solid var(--panel-border);
  color: var(--text);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  pointer-events: none;
  z-index: 998;
  transform: translateX(-50%);
}
.rr-dot { transition: r 0.15s ease; }
.rr-dot:hover { r: 5; }

/* ---------- Comparateur ---------- */
.compare-grid { max-width: 720px; margin: 0 auto; }
.compare-form { align-items: stretch; }
.compare-input-group { display: flex; flex: 1; min-width: 0; gap: 8px; padding: 4px; border: 1px solid var(--panel-border); border-radius: 12px; background: var(--panel); }
.compare-input-group input { flex: 1; min-width: 0; padding: 8px 10px; color: var(--text); background: transparent; border: 0; outline: 0; }
.compare-input-group .select-pill { border: 0; }
.compare-status { min-height: 20px; margin: 16px auto 0; text-align: center; color: var(--text-dim); font-size: 12px; }
.compare-status.error { color: var(--accent-3); }
.compare-heads { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.compare-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.compare-avatar { width: 64px; height: 64px; border-radius: 14px; margin: 0 auto 12px; object-fit: cover; }
.compare-card h3 { margin: 0 0 6px; font-size: 18px; }
.compare-region { font-size: 12px; color: var(--text-dim); }

.compare-rows { display: flex; flex-direction: column; gap: 6px; }
.compare-row {
  display: grid;
  grid-template-columns: 1fr 140px 1fr;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 12px 16px;
}
.compare-val { font-size: 15px; font-weight: 700; text-align: center; color: var(--text-dim); }
.compare-val.best { color: var(--accent-2); }
.compare-label { font-size: 12px; color: var(--text-dim); text-align: center; text-transform: uppercase; letter-spacing: 0.5px; }

@media (max-width: 560px) {
  .compare-heads { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1fr; text-align: center; gap: 4px; }
  .compare-label { order: -1; }
}
