/* Guardian Games — тёмная игровая тема */
:root {
  --bg: #0b0d14; --bg2: #11141f; --panel: #151927; --panel2: #1b2032; --line: #262c42;
  --text: #e8eaf3; --muted: #8b91a8; --accent: #7c5cff; --accent2: #22d3ee;
  --ok: #22c55e; --bad: #ef4444; --warn: #f59e0b; --radius: 14px;
  --grad: linear-gradient(135deg, var(--accent), var(--accent2));
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(124, 92, 255, .14), transparent 60%),
              radial-gradient(900px 500px at -10% 10%, rgba(34, 211, 238, .08), transparent 60%), var(--bg);
  color: var(--text); font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
main { flex: 1; padding-bottom: 48px; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Russo One", Inter, sans-serif; font-weight: 400; letter-spacing: .3px; margin: 0 0 .5em; line-height: 1.2; }
h1 { font-size: 30px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
code { background: var(--panel2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ok { color: var(--ok); } .warn { color: var(--warn); }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }
.empty { color: var(--muted); margin: 8px 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row form { margin: 0; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
  border-radius: 10px; border: 1px solid transparent; font: 600 14px Inter, sans-serif; color: #fff;
  cursor: pointer; transition: transform .12s, filter .12s, background .12s; white-space: nowrap;
}
.btn:hover { text-decoration: none; filter: brightness(1.12); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary { background: var(--grad); box-shadow: 0 6px 22px rgba(124, 92, 255, .35); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line); color: var(--text); }
.btn-discord { background: #5865f2; }
.btn-steam { background: linear-gradient(135deg, #1b2838, #2a475e); border-color: #3d6c8d; }
.btn-danger { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .45); color: #fca5a5; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { display: flex; width: 100%; margin-bottom: 12px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--text); font-size: 16px; cursor: pointer;
}
.icon-btn:hover { background: var(--panel2); text-decoration: none; }

/* шапка */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(11, 13, 20, .82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: "Russo One", sans-serif; font-size: 18px; letter-spacing: .5px; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 400; margin-left: 5px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav > a, .nav-soon { padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.nav > a:hover, .nav > a.on { color: var(--text); background: var(--panel2); text-decoration: none; }
.nav-soon { opacity: .45; cursor: default; }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-user form { margin: 0; }
.me { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; padding: 3px 10px 3px 3px; border-radius: 99px; background: var(--panel2); }
.me:hover { text-decoration: none; background: var(--line); }
.me img { border-radius: 50%; }
.me span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-toggle, .burger { display: none; }

/* уведомления */
.flash { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; padding: 12px 16px; border-radius: 10px; border: 1px solid; }
.flash button { background: none; border: 0; color: inherit; font-size: 20px; cursor: pointer; line-height: 1; }
.flash-ok { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .4); color: #86efac; }
.flash-bad { background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .4); color: #fca5a5; }
.flash-warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .4); color: #fcd34d; }
.flash-info { background: rgba(34, 211, 238, .08); border-color: rgba(34, 211, 238, .35); color: #a5f3fc; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
  background: var(--panel2); border: 1px solid var(--line); padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .5); transition: .25s; z-index: 100; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { border-color: rgba(239, 68, 68, .5); }

/* панели */
.panel { background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 20px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 32px 0 4px; }
.page-head h1 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.section-title { margin: 40px 0 0; }

/* главная */
.hero { padding: 64px 0 24px; }
.hero-in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 46px; }
.eyebrow { display: inline-block; padding: 4px 12px; border-radius: 99px; background: rgba(124, 92, 255, .14); color: #c4b5fd; font-weight: 600; font-size: 13px; margin-bottom: 16px; }
.lead { font-size: 17px; color: #b8bdd0; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { display: block; font-family: "Russo One", sans-serif; font-weight: 400; font-size: 28px; }
.stat span { color: var(--muted); font-size: 13px; }
.mini-top { list-style: none; margin: 0; padding: 0; }
.mini-top li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.mini-top li:first-child { border-top: 0; }
.mini-top .plink { flex: 1; min-width: 0; }
.pos { display: inline-grid; place-items: center; min-width: 28px; height: 28px; border-radius: 8px; background: var(--panel2); color: var(--muted); font-weight: 700; font-size: 13px; }
.pos-1 { background: linear-gradient(135deg, #fbbf24, #b45309); color: #fff; }
.pos-2 { background: linear-gradient(135deg, #cbd5e1, #64748b); color: #fff; }
.pos-3 { background: linear-gradient(135deg, #f59e0b, #7c2d12); color: #fff; }
.score { font-weight: 700; color: var(--ok); }
.score.neg { color: var(--bad); }
.plink { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; min-width: 0; }
.plink span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava { border-radius: 50%; background: var(--panel2); flex: none; object-fit: cover; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 16px; }
.feature { position: relative; display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); transition: .15s; }
a.feature:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.feature b { display: block; margin: 8px 0 4px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }
.f-ico { font-size: 26px; }
.feature.soon { opacity: .6; }
.feature em { position: absolute; top: 14px; right: 14px; font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #c4b5fd; background: rgba(124, 92, 255, .15); padding: 2px 8px; border-radius: 99px; }

/* бейджи */
.premier { display: inline-block; padding: 3px 12px 3px 10px; font-weight: 800; font-style: italic; color: #fff; clip-path: polygon(8% 0, 100% 0, 92% 100%, 0 100%); background: #64748b; font-size: 14px; }
.premier-grey { background: linear-gradient(90deg, #475569, #94a3b8); }
.premier-lightblue { background: linear-gradient(90deg, #0369a1, #7dd3fc); }
.premier-blue { background: linear-gradient(90deg, #1e3a8a, #3b82f6); }
.premier-purple { background: linear-gradient(90deg, #581c87, #a855f7); }
.premier-pink { background: linear-gradient(90deg, #9d174d, #ec4899); }
.premier-red { background: linear-gradient(90deg, #7f1d1d, #ef4444); }
.premier-gold { background: linear-gradient(90deg, #92400e, #fbbf24); }
.big .premier { font-size: 28px; padding: 4px 22px 4px 18px; }
.faceit { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.faceit i { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-size: 12px; border: 2px solid; color: #fff; }
.faceit-1 i { border-color: #eee; } .faceit-2 i, .faceit-3 i { border-color: #1ce400; }
.faceit-4 i, .faceit-5 i, .faceit-6 i, .faceit-7 i { border-color: #ffc800; }
.faceit-8 i, .faceit-9 i { border-color: #ff6309; } .faceit-10 i { border-color: #fe1f00; background: rgba(254, 31, 0, .2); }
.big .faceit { font-size: 26px; } .big .faceit i { width: 44px; height: 44px; font-size: 20px; border-width: 3px; }
.rep { display: inline-flex; gap: 10px; font-size: 13px; color: var(--muted); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--panel2); font-size: 12px; font-weight: 600; }
.chip.ok { background: rgba(34, 197, 94, .12); }

/* профиль */
.profile { padding-top: 28px; }
.pcard { --role: var(--accent); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.pcard-banner { height: 120px; background: linear-gradient(120deg, color-mix(in srgb, var(--role) 70%, #000), var(--accent) 55%, var(--accent2)); opacity: .85; }
.pcard-main { display: flex; align-items: flex-end; gap: 20px; padding: 0 24px 20px; margin-top: -54px; flex-wrap: wrap; }
.pcard-ava { width: 120px; height: 120px; border-radius: 50%; border: 5px solid var(--panel); background: var(--panel2); object-fit: cover; box-shadow: 0 0 0 2px var(--role); }
.pcard-id { flex: 1; min-width: 220px; padding-bottom: 4px; }
.pcard-id h1 { margin: 0 0 2px; font-size: 28px; word-break: break-word; }
.pcard-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-bottom: 6px; }
.pcard-actions form { margin: 0; }
.clans { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.clan-tag { --c: var(--accent); display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-weight: 600; font-size: 13px; background: color-mix(in srgb, var(--c) 18%, transparent); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); }
.clan-tag i { font-style: normal; color: var(--muted); }
.clan-tag small { color: var(--muted); font-weight: 500; }
.vote { display: flex; gap: 8px; margin: 0; }
.vote-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); font: 700 15px Inter, sans-serif; cursor: pointer; transition: .12s; }
.vote-btn:hover { background: var(--panel2); }
.vote-btn.up.on { background: rgba(34, 197, 94, .16); border-color: var(--ok); }
.vote-btn.down.on { background: rgba(239, 68, 68, .16); border-color: var(--bad); }
.vote-btn:disabled { opacity: .6; cursor: wait; }
.about { padding: 16px 24px 22px; border-top: 1px solid var(--line); white-space: pre-line; word-break: break-word; }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile { display: flex; flex-direction: column; }
.tile h3 { color: var(--muted); font-family: Inter, sans-serif; font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: .5px; }
.big { font-family: "Russo One", sans-serif; font-size: 34px; margin: 4px 0 12px; color: var(--ok); }
.big.neg { color: var(--bad); } .big.muted { color: var(--muted); }
.tile .big:has(.premier), .tile .big:has(.faceit) { color: var(--text); font-family: Inter, sans-serif; }
.bar { height: 8px; background: rgba(239, 68, 68, .35); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.bar span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv span { color: var(--muted); }
.src { margin-top: auto; padding-top: 10px; font-size: 12px; color: var(--muted); }
.steam-acc { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; background: var(--panel2); color: var(--text); margin-bottom: 12px; }
.steam-acc:hover { text-decoration: none; }
.steam-acc img { border-radius: 8px; }
.steam-acc span { display: flex; flex-direction: column; min-width: 0; }
.steam-acc b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.steam-acc small { color: var(--muted); }
.games { list-style: none; margin: 0; padding: 0; }
.games li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.games li:first-child { border-top: 0; }
.games span { color: var(--muted); }
.games b { text-align: right; word-break: break-all; }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.ach { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 16px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.ach span { font-size: 30px; }
.ach small { color: var(--muted); font-size: 12px; }
.ach.done { border-color: rgba(124, 92, 255, .6); background: linear-gradient(180deg, rgba(124, 92, 255, .16), var(--panel2)); }
.ach.locked { opacity: .45; } .ach.locked span { filter: grayscale(1); }
.roles { display: flex; flex-wrap: wrap; gap: 6px; }
.role { --c: #99aab5; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; background: var(--panel2); font-size: 13px; }
.role::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); }

/* формы */
.form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 14px; }
.form label small { float: right; color: var(--muted); font-weight: 500; }
.form small.over { color: var(--bad); }
input, textarea, select {
  width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: 14px Inter, sans-serif; outline: none; transition: border-color .12s;
}
textarea { resize: vertical; min-height: 90px; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
select { cursor: pointer; }
.cols-2, .cols-3 { display: grid; gap: 14px; }
.cols-2 { grid-template-columns: 1fr 1fr; } .cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.filters { display: grid; grid-template-columns: 1fr 200px 220px auto; gap: 10px; margin-top: 16px; align-items: end; }
.filters input, .filters select { margin: 0; }

/* таблицы, вкладки */
.tabs { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 16px; border-radius: 10px; color: var(--muted); font-weight: 600; background: var(--panel); border: 1px solid var(--line); }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { color: #fff; background: var(--grad); border-color: transparent; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; padding: 8px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.mine td { background: rgba(124, 92, 255, .08); }
.table .r { text-align: right; }
.src-cell { font-size: 13px; }

/* игроки */
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 20px; }
.player { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); transition: .15s; min-width: 0; }
.player:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.player-body { min-width: 0; flex: 1; }
.player-body > b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0; font-size: 13px; }
.player-badges .premier { font-size: 12px; }
.player-badges .faceit i { width: 22px; height: 22px; font-size: 11px; }
.player-games { display: flex; flex-wrap: wrap; gap: 4px; }
.player-games span { font-size: 12px; color: var(--muted); background: var(--panel2); padding: 1px 8px; border-radius: 6px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 24px; }
.pager a { padding: 8px 16px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }

/* ошибки, подвал */
.error-page { text-align: center; padding-top: 80px; }
.error-page .code { font-family: "Russo One", sans-serif; font-size: 110px; line-height: 1; }
.footer { border-top: 1px solid var(--line); padding: 22px 0; font-size: 13px; }
.footer-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* адаптив */
@media (max-width: 1020px) {
  .pgrid { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: 1fr 1fr; }
  .hero-in { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; margin-left: auto; cursor: pointer; }
  .burger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: .2s; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch; padding: 12px 20px 20px; background: var(--bg2); border-bottom: 1px solid var(--line); }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-toggle:checked + .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked + .burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked + .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-user { margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  h1, .hero h1 { font-size: 30px; }
  .hero { padding-top: 36px; }
  .grid-2, .pgrid, .features, .cols-2, .cols-3 { grid-template-columns: 1fr; }
  .pcard-main { flex-direction: column; align-items: flex-start; }
  .pcard-actions { width: 100%; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .panel { padding: 16px; }
  .filters { grid-template-columns: 1fr; }
}
