/* RuPuck — dark theme, Russian tricolor (white / blue / red), animated */
:root {
  --bg: #0B0C10;
  --bg-2: #0F1116;
  --card: #12141B;
  --card-2: #171A23;
  --line: #222632;
  --line-2: #2E3445;
  --text: #F4F5F8;
  --text-2: #C9CEDA;
  --muted: #8E95A8;
  --white: #F4F5F8;
  --blue: #1F4FD8;
  --blue-hi: #3D6BFF;
  --blue-soft: #7FA2FF;
  --red: #D52B1E;
  --red-hi: #E8352A;
  --mono: 'Rubik Mono One', 'Arial Black', sans-serif;
  --sans: 'Golos Text', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
a { color: var(--text); }
a:hover { color: var(--blue-soft); }
img { max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue-hi); outline-offset: 2px; }

/* Animations */
@keyframes stripes { from { background-position: 0 0; } to { background-position: 240px 0; } }
@keyframes sweep { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(232, 53, 42, .7); } 60% { box-shadow: 0 0 0 10px rgba(232, 53, 42, 0); } }
@keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
@keyframes drip { 0%, 30% { transform: scaleY(0); } 70%, 100% { transform: scaleY(1); } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(-1deg); } }
@keyframes flicker { 0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .55; } }
@keyframes fill { from { width: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.stripes { height: 6px; background: repeating-linear-gradient(115deg, var(--white) 0 40px, var(--blue) 40px 80px, var(--red) 80px 120px);
  animation: stripes 6s linear infinite; }
.sweep { background: linear-gradient(90deg, var(--white), var(--blue-hi), var(--red-hi), var(--white)); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: sweep 5s linear infinite; }
.live-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red-hi); animation: pulse 1.6s ease-out infinite; }
.rise { animation: rise .7s cubic-bezier(.2, .8, .2, 1) both; }

.wrap { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.block { padding-top: 64px; padding-bottom: 64px; }
.block-tight { padding-top: 0; padding-bottom: 0; }
.block + .block { padding-top: 0; }
.mono { font-family: var(--mono); font-weight: 400; letter-spacing: -0.01em; }
.strong { font-weight: 700; }
.muted, .muted-dark { color: var(--muted); }
.small { font-size: 14px; }
.accent { color: var(--blue-hi); }
.mt { margin-top: 24px; }
.row-gap { display: flex; flex-wrap: wrap; gap: 12px; }
.h1 { font-size: clamp(40px, 6vw, 80px); line-height: 0.95; margin: 0 0 24px; }
.h2 { font-size: clamp(28px, 4vw, 40px); margin: 0; }
.h3 { font-size: 20px; margin: 0 0 16px; }
.lead { font-size: 20px; max-width: 560px; margin: 24px 0 32px; color: var(--text-2); }

/* Ticker */
.ticker { background: #111319; border-bottom: 1px solid var(--line); overflow: hidden; }
.ticker-track { display: flex; width: max-content; padding: 10px 0; font-weight: 700; font-size: 14px; white-space: nowrap; animation: marquee 32s linear infinite; }
.ticker-item { padding: 0 28px; display: inline-flex; align-items: center; gap: 10px; color: var(--text-2); }
.ticker-item b { color: var(--text); }
.ticker-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Header */
.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; padding-top: 18px; padding-bottom: 18px; }
.logo { display: inline-flex; font-family: var(--mono); font-size: 22px; text-decoration: none; transform: rotate(-2deg); }
.logo span { padding: 6px 6px; color: var(--white); }
.logo span:nth-child(1) { background: var(--white); color: var(--bg); padding-left: 12px; }
.logo span:nth-child(2) { background: var(--blue); }
.logo span:nth-child(3) { background: var(--red); padding-right: 12px; }
.logo:hover span { color: inherit; }
.logo:hover span:nth-child(1) { color: var(--bg); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; flex: 1 1 auto; font-weight: 700; }
.nav a { text-decoration: none; padding: 12px 0; border-bottom: 3px solid transparent; }
.nav a.on { border-bottom-color: var(--blue-hi); }
.search { flex: 0 1 240px; }
.search input, .search-big input {
  width: 100%; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line-2);
  background: var(--card); font: inherit; color: var(--text);
}
.search input::placeholder, .search-big input::placeholder { color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px;
  border-radius: 999px; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: transform .2s, background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-accent { background: var(--red); color: #fff; }
.btn-accent:hover { background: var(--red-hi); color: #fff; }
.btn-line { border-color: var(--blue-hi); color: var(--text); background: transparent; }
.btn-line:hover { color: var(--text); background: rgba(61, 107, 255, .12); }
.btn-dark { background: var(--white); color: var(--bg); }
.btn-dark:hover { color: var(--bg); background: #fff; }
.btn-light { background: transparent; color: var(--text); border-color: var(--line-2); min-height: 46px; }
.btn-light:hover { border-color: var(--blue-hi); color: var(--text); }
.btn-white { background: var(--white); color: var(--bg); }
.btn-white:hover { color: var(--bg); }
.btn-block { width: 100%; }

/* Hero */
.hero { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; padding-top: 48px; padding-bottom: 72px; }
.hero-text { flex: 999 1 520px; min-width: 0; }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .08em; font-size: 14px; color: var(--text-2); }
.hero-title { font-size: clamp(48px, 8.5vw, 128px); line-height: 0.92; margin: 20px 0 0; letter-spacing: -0.03em; }
.hero-title .w { color: var(--white); }
.hero-title .b { color: var(--blue-hi); }
.hero-title .r { color: var(--red-hi); }
.hero-card { flex: 1 1 360px; position: relative; min-height: 380px; }
.hero-art { position: absolute; inset: 0; border-radius: 32px; background: var(--card); border: 2px solid var(--line); overflow: hidden;
  animation: float 5s ease-in-out infinite; }
.hero-art .band { position: absolute; left: -10%; right: -10%; top: 46%; height: 64px; transform: rotate(-8deg); }
.hero-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art .draw { stroke-dasharray: 900; animation: draw 2.4s ease-out both; }
.hero-art .drip { transform-origin: top; transform-box: fill-box; animation: drip 3s ease-in-out infinite alternate; }
.hero-art .flicker { animation: flicker 4s linear infinite; }
.hero-online { position: absolute; left: 24px; bottom: 22px; }
.big { font-size: 56px; line-height: 1; }
.sticker { position: absolute; right: -8px; top: -14px; background: var(--blue); color: var(--white); font-family: var(--mono); font-size: 16px;
  padding: 12px 16px; border-radius: 14px; transform: rotate(6deg); }

/* Facts band */
.dark { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.facts > div { border-left: 4px solid var(--white); padding-left: 16px; }
.facts > div:nth-child(2) { border-left-color: var(--blue); }
.facts > div:nth-child(3) { border-left-color: var(--red); }
.fact { font-size: 28px; }
.servers-band { background: var(--bg); border: 0; }
.block-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--line-2); background: transparent;
  color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s; }
.chip:hover { border-color: var(--blue-hi); }
.chip.on { background: var(--white); color: var(--bg); border-color: var(--white); }

/* Server cards */
.grid-servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.srv { display: flex; flex-direction: column; gap: 14px; padding: 22px; background: var(--card); border: 2px solid var(--line);
  border-radius: 20px; position: relative; overflow: hidden; transition: transform .25s, border-color .25s, box-shadow .25s; }
.srv::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--white); }
.srv:nth-child(3n+2)::before { background: var(--blue); }
.srv:nth-child(3n)::before { background: var(--red); }
.srv:hover { transform: translateY(-4px); border-color: var(--blue-hi); box-shadow: 0 12px 32px rgba(31, 79, 216, .25); }
.srv[hidden] { display: none; }
.srv.rise { animation-fill-mode: backwards; } /* let :hover move the card after the entrance */
.srv-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.srv-name { font-size: 20px; }
.srv-num { color: var(--muted); }
.srv-count { color: var(--muted); margin-bottom: 8px; }
.srv-count span { color: var(--text); font-weight: 700; }
.tag { font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 999px; color: #fff; white-space: nowrap; }
.tag-open { background: var(--blue); }
.tag-full { background: var(--red); }
.tag-empty { background: var(--line-2); color: var(--text-2); }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar-fill { height: 100%; background: var(--blue-hi); border-radius: 4px; transition: width .4s; animation: fill 1.4s cubic-bezier(.2, .8, .2, 1) both; }
.srv[data-state="full"] .bar-fill { background: var(--red-hi); }

/* Cards */
.card { background: var(--card); border: 2px solid var(--line); border-radius: 22px; color: var(--text); }
.tilt-l, .tilt-r { transform: none; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 28px; }
.step { padding: 26px; display: flex; flex-direction: column; gap: 10px; border-top-width: 6px; }
.steps .step:nth-child(1) { border-top-color: var(--white); }
.steps .step:nth-child(2) { border-top-color: var(--blue); }
.steps .step:nth-child(3) { border-top-color: var(--red); }
.step b { font-size: 20px; }
.step-n { font-size: 44px; color: var(--blue-hi); }
.dark-card { background: var(--card-2); }

/* Podium + tables */
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; align-items: end; margin-bottom: 24px; }
.pod { padding: 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; border-top-width: 6px;
  transition: transform .25s, border-color .25s; }
.pod:hover { transform: translateY(-4px); color: var(--text); }
.pod-1 { min-height: 230px; border-top-color: var(--white); }
.pod-2 { min-height: 200px; border-top-color: var(--blue); }
.pod-3 { min-height: 180px; border-top-color: var(--red); }
.pod-top { display: flex; justify-content: space-between; align-items: center; }
.pod-place { font-size: 44px; }
.pod-1 .pod-place { color: var(--white); }
.pod-2 .pod-place { color: var(--blue-hi); }
.pod-3 .pod-place { color: var(--red-hi); }
.pod-name { font-size: 22px; font-weight: 800; word-break: break-word; }
.ava { width: 40px; height: 40px; border-radius: 10px; background: var(--line); border: 2px solid var(--line-2); object-fit: cover; flex: none; }
.ava-lg { width: 56px; height: 56px; border-radius: 14px; }
.ava-xl { width: 112px; height: 112px; border-radius: 26px; border: 4px solid var(--white); transform: rotate(-4deg); position: relative; }
.table-box { overflow-x: auto; background: var(--card); border: 2px solid var(--line); border-radius: 22px; }
.table-box.flat { border: none; border-radius: 0; background: transparent; }
.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }
.tbl th { text-align: left; font-size: 14px; color: var(--muted); font-weight: 700; padding: 12px 16px; }
.tbl td { padding: 12px 16px; border-top: 1px solid var(--line); }
.tbl tbody tr:hover { background: var(--card-2); }
.player-link { font-weight: 700; text-decoration: none; }
.team-blue { color: var(--blue-soft); }
.team-red { color: #FF8A82; }
.res { font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.res-win { background: var(--blue); color: #fff; }
.res-loss { background: var(--red); color: #fff; }
.res-draw { background: var(--line-2); color: var(--text); }

/* VIP */
.vip-banner { background: var(--card); border: 2px solid var(--line); border-radius: 32px; overflow: hidden; color: var(--text); }
.vip-banner::before { content: ''; display: block; height: 10px; background: repeating-linear-gradient(115deg, var(--white) 0 40px, var(--blue) 40px 80px, var(--red) 80px 120px);
  animation: stripes 6s linear infinite; }
.vip-inner { padding: 44px; display: flex; flex-wrap: wrap; gap: 24px; align-items: end; justify-content: space-between; }
.vip-tag { display: inline-flex; transform: rotate(-3deg); }
.vip-tag span { padding: 6px 4px; }
.vip-tag span:nth-child(1) { background: var(--white); color: var(--bg); padding-left: 12px; }
.vip-tag span:nth-child(2) { background: var(--blue); }
.vip-tag span:nth-child(3) { background: var(--red); padding-right: 12px; }
.vip-title { font-size: clamp(30px, 4vw, 52px); margin: 18px 0 8px; line-height: 1; }
.vip-text { margin: 0; font-size: 18px; max-width: 520px; color: var(--text-2); }

/* Players */
.search-big { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; max-width: 640px; }
.search-big input { flex: 1 1 280px; min-height: 56px; }
.list { display: grid; gap: 10px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; text-decoration: none; transition: border-color .2s; }
.list-row:hover { border-color: var(--blue-hi); color: var(--text); }
.list-name { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Player profile */
.p-hero { background: var(--card); border: 2px solid var(--line); border-radius: 32px; padding: 36px; display: flex; flex-wrap: wrap; gap: 28px;
  align-items: center; position: relative; overflow: hidden; }
.p-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px;
  background: repeating-linear-gradient(115deg, var(--white) 0 40px, var(--blue) 40px 80px, var(--red) 80px 120px); animation: stripes 6s linear infinite; }
.p-hero-bg { position: absolute; right: -20px; top: -40px; font-size: 220px; color: #181B25; transform: rotate(-8deg); line-height: 1; pointer-events: none; }
.p-hero-text { flex: 1 1 320px; position: relative; min-width: 0; }
.p-name { font-size: clamp(30px, 5vw, 56px); margin: 0; line-height: 1.05; word-break: break-word; }
.p-meta { margin-top: 12px; color: var(--text-2); }
.p-badge { position: relative; background: var(--white); color: var(--bg); border-radius: 22px; padding: 16px 24px; text-align: center; transform: rotate(3deg); }
.p-badge-n { font-size: 40px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--line-2); background: transparent; color: var(--text);
  font: inherit; font-weight: 800; cursor: pointer; }
.tab.on { background: var(--white); color: var(--bg); border-color: var(--white); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile { padding: 18px; border-radius: 20px; }
.tile-n { font-size: 28px; margin-top: 6px; }
.two { display: flex; flex-wrap: wrap; gap: 24px; }
.two > * { flex: 1 1 480px; min-width: 0; }
.panel { padding: 26px; }
.form-chart { height: 200px; display: flex; align-items: flex-end; gap: 6px; border-bottom: 2px solid var(--line-2); }
.form-bar { flex: 1; background: var(--line-2); border-radius: 6px 6px 0 0; min-height: 4px; }
.form-bar.win { background: var(--blue-hi); }
.form-legend { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
.dot-win { background: var(--blue-hi); }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 24px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 20px; }
.sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.sw-me, .cmp-bar.me { background: var(--blue-hi); }
.sw-avg, .cmp-bar.avg { background: var(--line-2); }
.cmp-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.cmp-bars { display: flex; flex-direction: column; gap: 6px; }
.cmp-line { display: flex; align-items: center; gap: 10px; }
.cmp-bar { height: 16px; border-radius: 8px; min-width: 4px; animation: fill 1.2s cubic-bezier(.2, .8, .2, 1) both; }

/* Account */
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.me-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; min-height: 44px; }
.me-link.on { color: var(--blue-soft); }
.ava-sm { width: 34px; height: 34px; border-radius: 9px; }
.alert { background: rgba(213, 43, 30, .14); border: 2px solid var(--red); color: #FFB4AE; border-radius: 16px; padding: 12px 16px; font-weight: 700; }
.ok { background: rgba(31, 79, 216, .16); border: 2px solid var(--blue-hi); color: #C7D5FF; border-radius: 16px; padding: 12px 16px; font-weight: 700; }
.btn-steam { min-height: 60px; font-size: 18px; }
.me-head { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.me-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.me-who .h2 { word-break: break-word; }
.vip-chip { display: inline-block; background: var(--white); color: var(--bg); font-weight: 800; font-size: 14px; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px; }
.prefix-box { display: flex; flex-wrap: wrap; gap: 32px; }
.prefix-form, .prefix-preview { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.prefix-form form { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.prefix-input { width: 100%; max-width: 360px; min-height: 60px; padding: 0 22px; border-radius: 999px; border: 2px solid var(--line-2);
  background: var(--bg); font-size: 22px; color: var(--text); }
.prefix-input:focus { border-color: var(--blue-hi); outline: none; }
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.swatches legend { margin-bottom: 10px; padding: 0; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 48px; height: 48px; margin: 0; cursor: pointer; }
.swatch span:not(.sr) { display: block; width: 48px; height: 48px; border-radius: 50%; border: 3px solid var(--bg); }
.swatch input:checked + span { outline: 3px solid var(--white); outline-offset: 3px; }
.swatch input:focus-visible + span { outline: 3px solid var(--blue-hi); outline-offset: 3px; }
.chat-box { background: #07080B; border: 1px solid var(--line); color: var(--text); border-radius: 18px; padding: 18px;
  font-family: Consolas, 'Courier New', monospace; font-size: 15px; display: flex; flex-direction: column; gap: 8px; word-break: break-word; }
.chat-cap { color: var(--muted); }
.red-nick { color: #FCA5A5; }
.blue-nick { color: #9EC5FF; }
.pv-sticker { align-self: flex-start; color: var(--bg); font-size: 28px; padding: 10px 20px; transform: rotate(-3deg); border-radius: 6px; }

/* Error */
.err { text-align: center; }
.err-code { font-size: clamp(80px, 18vw, 200px); line-height: 1; }
.err .lead { margin-left: auto; margin-right: auto; }

/* Footer */
.foot { border-top: 1px solid var(--line); margin-top: 32px; }
.foot .wrap { padding-top: 48px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 24px; }
.foot-mark { font-family: var(--mono); font-size: clamp(48px, 10vw, 140px); line-height: 0.9; }
.foot-mark span:nth-child(1) { color: #1A1C24; }
.foot-mark span:nth-child(2) { color: #15203F; }
.foot-mark span:nth-child(3) { color: #2A1416; }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; font-size: 15px; color: var(--muted); }
.foot-row nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding-left: 16px; padding-right: 16px; }
  .block { padding-top: 44px; padding-bottom: 44px; }
  .hero-card { min-height: 300px; }
  .vip-inner, .p-hero { padding: 28px; }
  .p-hero-bg { font-size: 150px; }
  .cmp-row { grid-template-columns: 1fr; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .sweep { color: var(--text); }
}
