:root {
  --bg: #f5f7fc;
  --card: #ffffff;
  --card-soft: #f6f8fd;
  --border: #e7eaf3;
  --border-soft: #eef1f8;
  --text: #161b2e;
  --text-dim: #69718a;
  --text-faint: #9aa2b8;
  --accent: #4361ee;
  --accent-2: #7c4dff;
  --accent-3: #00b8d4;
  --accent-soft: #eaeefe;
  --green: #12b76a;
  --amber: #f5a623;
  --orange: #fb7a3c;
  --red: #ef4444;
  --grad: linear-gradient(120deg, var(--accent), var(--accent-2));
  --shadow: 0 4px 18px rgba(22, 27, 46, .05);
  --shadow-lg: 0 18px 50px rgba(22, 27, 46, .12);
  --radius: 18px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ---------- Анимированный фон ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; filter: blur(70px); opacity: .5; }
.bg-orbs span { position: absolute; border-radius: 50%; }
.bg-orbs span:nth-child(1) { width: 520px; height: 520px; background: #6d8bff; top: -180px; left: -120px; animation: float1 18s ease-in-out infinite; }
.bg-orbs span:nth-child(2) { width: 460px; height: 460px; background: #b388ff; top: 10%; right: -160px; animation: float2 22s ease-in-out infinite; }
.bg-orbs span:nth-child(3) { width: 400px; height: 400px; background: #80deea; bottom: -160px; left: 30%; animation: float3 20s ease-in-out infinite; }
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(60px,40px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-50px,60px)} }
@keyframes float3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,-50px)} }

#app { max-width: 1060px; margin: 0 auto; padding: 24px 20px 90px; }

/* ---------- Hero / поиск ---------- */
.hero { min-height: 82vh; display: flex; align-items: center; justify-content: center; transition: min-height .5s cubic-bezier(.4,0,.2,1); }
.hero.compact { min-height: auto; padding: 4px 0 22px; }
.hero-inner { width: 100%; max-width: 660px; text-align: center; animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }

.logo { display: inline-flex; align-items: center; gap: 11px; margin-bottom: 30px; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); position: relative; box-shadow: 0 6px 16px rgba(67,97,238,.4); }
.logo-mark::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; border: 2.5px solid #fff; }
.logo-text { font-weight: 800; font-size: 21px; letter-spacing: -.5px; }
.logo-text b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.hero h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 900; letter-spacing: -1.2px; line-height: 1.1; margin-bottom: 12px; }
.hero.compact h1 { font-size: 22px; }
.subtitle { color: var(--text-dim); font-size: 16px; margin-bottom: 30px; }
.hero.compact .subtitle, .hero.compact .examples, .hero.compact .logo { display: none; }

.search { display: flex; gap: 9px; background: var(--card); padding: 9px; border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); transition: box-shadow .25s, transform .25s; }
.search:focus-within { box-shadow: 0 22px 60px rgba(67,97,238,.22); transform: translateY(-1px); }
.search input { flex: 1; border: none; outline: none; background: transparent; font-size: 15px; padding: 12px 14px; color: var(--text); font-family: inherit; }
.search input::placeholder { color: var(--text-faint); }
.search button { border: none; cursor: pointer; background: var(--grad); color: #fff; font-weight: 700; font-size: 15px; padding: 0 28px; border-radius: 11px; font-family: inherit; position: relative; overflow: hidden; transition: transform .12s, filter .2s; }
.search button:hover { filter: brightness(1.08); }
.search button:active { transform: scale(.97); }
.search button span { position: relative; z-index: 1; }

.examples { margin-top: 20px; font-size: 13px; color: var(--text-faint); }
.examples .ex { background: var(--card); color: var(--accent); border: 1px solid var(--border); cursor: pointer; font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 20px; margin-left: 6px; font-family: inherit; transition: all .18s; }
.examples .ex:hover { background: var(--accent-soft); transform: translateY(-1px); }

/* ---------- Шапка профиля ---------- */
.phead { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; position: relative; overflow: hidden; animation: rise .5s cubic-bezier(.2,.7,.2,1) both; }
.phead::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.phead .avatar-wrap { position: relative; }
.phead .avatar { width: 88px; height: 88px; border-radius: 18px; border: 1px solid var(--border); object-fit: cover; }
.phead .status-dot { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--card); background: var(--text-faint); }
.phead .status-dot.online { background: var(--green); box-shadow: 0 0 0 0 rgba(18,183,106,.5); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(18,183,106,.5)} 70%{box-shadow:0 0 0 8px rgba(18,183,106,0)} 100%{box-shadow:0 0 0 0 rgba(18,183,106,0)} }
.phead .pinfo { flex: 1; min-width: 210px; }
.phead .pname { font-size: 25px; font-weight: 800; letter-spacing: -.5px; }
.phead .pmeta { color: var(--text-dim); font-size: 13.5px; margin-top: 3px; }
.phead .chips { margin-top: 11px; display: flex; gap: 7px; flex-wrap: wrap; }

.mini-trust { text-align: center; cursor: pointer; transition: transform .2s; }
.mini-trust:hover { transform: scale(1.05); }
.mini-ring { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(closest-side, var(--card) 76%, transparent 77%), conic-gradient(var(--mc, var(--accent)) calc(var(--mp,0)*1%), var(--border) 0); transition: background 1s ease; margin: 0 auto; }
.mini-ring b { font-size: 22px; font-weight: 800; }
.mini-trust .ml { font-size: 11px; color: var(--text-faint); margin-top: 5px; font-weight: 600; }

.chip { font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 8px; background: var(--card-soft); border: 1px solid var(--border); color: var(--text-dim); }
.chip.green { background: #e6f9f0; color: var(--green); border-color: #c5f0db; }
.chip.red { background: #fdeaea; color: var(--red); border-color: #f8cfcf; }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: #d8def9; }

/* ---------- Таб-бар ---------- */
.tabbar { position: relative; display: flex; gap: 4px; margin: 18px 0; padding: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow-x: auto; scrollbar-width: none; }
.tabbar::-webkit-scrollbar { display: none; }
.tab-indicator { position: absolute; top: 6px; height: calc(100% - 12px); border-radius: 10px; background: var(--grad); box-shadow: 0 6px 16px rgba(67,97,238,.35); transition: left .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1); z-index: 0; }
.tab { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border: none; background: transparent; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-dim); border-radius: 10px; white-space: nowrap; transition: color .3s; }
.tab svg { width: 17px; height: 17px; }
.tab.active { color: #fff; }
.tab:not(.active):hover { color: var(--text); }

/* ---------- Панели ---------- */
.panel { display: grid; gap: 16px; }
.panel-anim { animation: panelIn .45s cubic-bezier(.2,.7,.2,1) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; transition: transform .25s, box-shadow .25s; }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-title { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--text-dim); font-weight: 700; margin-bottom: 16px; }
.col-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .7px; color: var(--text-faint); font-weight: 700; margin-bottom: 10px; }
.col-title.mt { margin-top: 20px; }

/* Сетка статов */
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.stat { background: var(--card-soft); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px 16px; transition: transform .2s, border-color .2s, background .2s; }
.stat:hover { transform: translateY(-2px); border-color: #dde3f5; background: #fff; }
.stat .label { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.stat .value { font-size: 23px; font-weight: 800; margin-top: 5px; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.stat .value.sm { font-size: 16px; word-break: break-all; }
.stat .sub { font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.stat.hl { background: linear-gradient(135deg, var(--accent-soft), #fff); border-color: #d8def9; }

/* Карта матча (последний матч — выделенный блок) */
.matchbox { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; background: linear-gradient(135deg, rgba(67,97,238,.05), rgba(124,77,255,.05)); }
.matchbox .mb-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 6px; }
.mb-result { font-weight: 800; font-size: 15px; }
.mb-result.win { color: var(--green); } .mb-result.loss { color: var(--red); }
.mb-score { font-weight: 800; font-size: 18px; letter-spacing: 1px; }

/* Таблица карт */
table.maps { width: 100%; border-collapse: collapse; font-size: 14px; }
table.maps th, table.maps td { text-align: left; padding: 11px 12px; }
table.maps thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-faint); border-bottom: 1px solid var(--border); font-weight: 700; }
table.maps tbody tr { border-bottom: 1px solid var(--border-soft); transition: background .15s; }
table.maps tbody tr:hover { background: var(--card-soft); }
table.maps tbody tr:last-child { border-bottom: none; }
table.maps td.num { font-variant-numeric: tabular-nums; }

.bar { height: 7px; border-radius: 5px; background: var(--border); position: relative; overflow: hidden; min-width: 70px; }
.bar > i { position: absolute; inset: 0; width: 0; background: var(--grad); border-radius: 5px; transition: width 1s cubic-bezier(.2,.7,.2,1); }

/* Списки игр / оружия */
.game-list { list-style: none; display: grid; gap: 9px; }
.game-list li { display: flex; align-items: center; gap: 11px; font-size: 14px; }
.game-list .g-ico { width: 30px; height: 30px; border-radius: 7px; background: var(--card-soft); border: 1px solid var(--border); object-fit: cover; flex: none; }
.game-list .g-name { font-weight: 600; }
.game-list .g-right { margin-left: auto; color: var(--text-dim); font-variant-numeric: tabular-nums; font-weight: 700; }
.game-list.weapons li { gap: 0; }

/* Faceit */
.faceit-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.faceit-lvl { width: 58px; height: 58px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 24px; color: #fff; background: linear-gradient(135deg, #ff7a18, #ff3d00); box-shadow: 0 8px 20px rgba(255,61,0,.3); }
.form { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.form-dot { width: 21px; height: 21px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; animation: pop .35s cubic-bezier(.2,.7,.2,1) both; }
.form-dot.win { background: var(--green); } .form-dot.loss { background: var(--red); }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Недоступные блоки */
.unavailable { background: var(--card-soft); border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 13px 15px; color: var(--text-dim); font-size: 13px; display: flex; gap: 9px; align-items: flex-start; }
.unavailable .ic { color: var(--amber); font-weight: 800; flex: none; }

/* Итоговый отчёт */
.report-head { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.gauge { --p: 0; --c: var(--accent); width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(closest-side, var(--card) 79%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p)*1%), var(--border) 0); display: grid; place-items: center; transition: background 1.1s cubic-bezier(.2,.7,.2,1); }
.gauge .score { font-size: 40px; font-weight: 900; letter-spacing: -1.5px; line-height: 1; }
.gauge .of { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.report-meta { flex: 1; min-width: 230px; }
.report-meta .trust { font-size: 22px; font-weight: 800; }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 20px; }
@media (max-width: 640px){ .report-cols { grid-template-columns: 1fr; } }
.report-list { list-style: none; display: grid; gap: 8px; }
.report-list li { font-size: 13.5px; display: flex; gap: 9px; align-items: flex-start; line-height: 1.45; animation: slideIn .4s ease both; }
.report-list .pos::before { content: "✓"; color: var(--green); font-weight: 800; }
.report-list .neg::before { content: "✕"; color: var(--red); font-weight: 800; }
.report-list .note::before { content: "•"; color: var(--text-faint); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

/* Флаги */
.flags { display: grid; gap: 9px; }
.flag { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; line-height: 1.45; padding: 11px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--card-soft); animation: slideIn .4s ease both; }
.flag .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: none; }
.flag-danger { background: #fdeaea; border-color: #f8cfcf; color: #a3201b; }
.flag-danger .dot { background: var(--red); }
.flag-warn { background: #fff7e8; border-color: #f5e4bd; color: #8a5d00; }
.flag-warn .dot { background: var(--amber); }
.flag-info .dot { background: var(--text-faint); }

.error-box { background: #fdeaea; border: 1px solid #f8cfcf; color: var(--red); border-radius: var(--radius); padding: 18px 20px; font-size: 14px; font-weight: 500; animation: rise .4s ease both; }

.c-green { color: var(--green) !important; } .c-amber { color: var(--amber) !important; }
.c-orange { color: var(--orange) !important; } .c-red { color: var(--red) !important; }
.muted { color: var(--text-faint); }
.foot { text-align: center; color: var(--text-faint); font-size: 12px; margin-top: 6px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Loader ---------- */
.loader { position: fixed; inset: 0; background: rgba(245,247,252,.82); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; animation: rise .3s ease; }
.loader p { margin-top: 18px; color: var(--text-dim); font-weight: 600; }
.spinner { display: flex; gap: 8px; justify-content: center; }
.spinner span { width: 13px; height: 13px; border-radius: 50%; background: var(--grad); animation: bounce 1s ease-in-out infinite; }
.spinner span:nth-child(2){ animation-delay: .15s; } .spinner span:nth-child(3){ animation-delay: .3s; }
@keyframes bounce { 0%,80%,100%{ transform: scale(.4); opacity: .5; } 40%{ transform: scale(1); opacity: 1; } }

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