/* Brick-Force Remastered website.
   Colours and shapes follow docs/BRICK-FORCE-UI-DESIGN-STANDARD.md (in-game UI):
   panels DialogFill rgba(5,13,26,.92), band rgba(15,26,43,.4), orange RGB 250/158/31, grey 166/176/191,
   dividers rgba(77,115,166,.6), buttons radius 6 px, bold upper case. Type A = band + orange corners,
   type B = plain rounded window (radius 10 px). */

:root {
  --bg: #050b16;
  --bg-2: #0a1424;
  --bg-3: #0f1d33;
  --panel: rgba(5, 13, 26, 0.92);
  --panel-solid: #08111f;
  --band: rgba(15, 26, 43, 0.4);
  --edge: rgba(255, 255, 255, 0.12);
  --edge-soft: rgba(255, 255, 255, 0.07);
  --line: rgba(77, 115, 166, 0.6);
  --orange: #fa9e1f;
  --orange-hover: #ffbd4d;
  --orange-pressed: #db800f;
  --orange-soft: rgba(250, 158, 31, 0.14);
  --text: #f3f6fb;
  --text-dark: #1a0f00;
  --grey: #a6b0bf;
  --grey-2: #6f7d92;
  --green: #5fd68f;
  --red: #ff8c80;
  --blue: #3d8bff;
  --radius: 10px;
  --radius-btn: 6px;
  --font: "Segoe UI", "Helvetica Neue", Roboto, Arial, system-ui, sans-serif;
  --font-head: "Segoe UI Black", "Arial Black", "Segoe UI", Roboto, system-ui, sans-serif;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 16px/1.6 var(--font);
  color: var(--text);
  background: var(--bg) radial-gradient(1200px 600px at 80% -10%, rgba(61, 139, 255, 0.10), transparent 60%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 900; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); text-transform: uppercase; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); text-transform: uppercase; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap.narrow { max-width: 860px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--orange); color: var(--text-dark); padding: 8px 14px; border-radius: 6px; font-weight: 800; }
.skip:focus { left: 8px; }
.muted { color: var(--grey-2); }
.ico { width: 20px; height: 20px; flex: none; }
.ico-sm { width: 16px; height: 16px; vertical-align: -3px; }

/* ------------------------------------------------------------ buttons (in-game look) */
.btn {
  --h: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--h); padding: 0 18px;
  border-radius: var(--radius-btn); border: 1px solid transparent;
  font: 800 .9rem/1 var(--font); text-transform: uppercase; letter-spacing: .04em;
  cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--orange); color: var(--text-dark); box-shadow: 0 6px 18px rgba(250, 158, 31, 0.25); }
.btn-primary:hover { background: var(--orange-hover); color: var(--text-dark); box-shadow: 0 8px 26px rgba(250, 158, 31, 0.38); }
.btn-primary:active { background: var(--orange-pressed); }
.btn-secondary { background: #111c30; color: var(--text); border-color: rgba(250, 158, 31, 0.42); }
.btn-secondary .ico { color: var(--orange); }
.btn-secondary:hover { background: #3a2911; border-color: rgba(250, 158, 31, 0.85); color: #fff; }
.btn-danger { background: #3a1414; color: #ffd6d1; border-color: rgba(255, 120, 100, .5); }
.btn-danger:hover { background: #5a1c1c; color: #fff; }
.btn[disabled], .btn[aria-disabled="true"] { background: #3b4250; color: #8a93a3; border-color: transparent; box-shadow: none; cursor: not-allowed; }
.btn-sm { --h: 34px; padding: 0 12px; font-size: .78rem; }
.btn-lg { --h: 50px; padding: 0 24px; font-size: 1rem; }
.btn-xl { --h: 60px; padding: 0 26px; font-size: 1.1rem; width: 100%; }
.btn-xl .ico { width: 24px; height: 24px; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------ header */
/* three zones: navigation left, logo in the middle (a little taller than the bar), account + download right */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, rgba(4, 9, 19, .96), rgba(5, 13, 26, .86));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--edge-soft);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
}
.site-header::after { /* thin orange line under the logo, like the band of the in-game windows */
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 220px; height: 2px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}
.header-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; min-height: 68px; }
.brand { justify-self: center; display: block; margin: -6px 0 -10px; transition: transform .2s; }
.brand img { width: 172px; height: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); }
.brand:hover { transform: translateY(-1px) scale(1.02); }
.main-nav { justify-self: start; display: flex; align-items: center; }
.main-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav ul a {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-radius: 6px;
  color: var(--grey); font: 900 .86rem/1 var(--font-head); text-transform: uppercase; letter-spacing: .06em;
  transition: color .15s, background-color .15s;
}
.main-nav .ico-nav { width: 17px; height: 17px; opacity: .8; }
.main-nav ul a::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 3px; border-radius: 2px;
  background: var(--orange); transform: scaleX(0); transition: transform .2s;
}
.main-nav ul a:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.main-nav ul a.active { color: #fff; }
.main-nav ul a.active .ico-nav, .main-nav ul a:hover .ico-nav { color: var(--orange); opacity: 1; }
.main-nav ul a:hover::after, .main-nav ul a.active::after { transform: scaleX(1); }
.nav-drawer-dl { display: none; }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }
.nav-actions .btn span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.nav-dl { box-shadow: 0 0 0 1px rgba(250, 158, 31, .35), 0 4px 16px rgba(250, 158, 31, .28); }
.nav-toggle { display: none; justify-self: start; width: 44px; height: 44px; border: 1px solid var(--edge); border-radius: 8px; background: transparent; cursor: pointer; padding: 11px 10px; }
.nav-toggle span:not(.sr) { display: block; height: 2px; background: var(--text); margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

/* ------------------------------------------------------------ player / clan names (src/views/ident.js) */
/* level badge of the game (34 x 17) and clan logo sit on the text line, so rows keep their height */
.pname, .cname { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; vertical-align: middle; }
.pname > a, .pname > span:last-child, .pname > strong, .cname > span, .cname > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-badge { flex: none; width: 34px; height: 17px; image-rendering: auto; }
.clan-mark { flex: none; display: inline-block; width: 22px; height: 22px; border-radius: 4px; }
.clan-mark-xs { width: 16px; height: 16px; border-radius: 3px; }
.clan-mark-none {
  display: inline-grid; place-items: center; background: rgba(255, 255, 255, .07); border: 1px solid var(--edge-soft);
  color: var(--grey); font: 900 .72rem/1 var(--font-head);
}
.clan-mark-xs.clan-mark-none { font-size: .6rem; }

/* ------------------------------------------------------------ panels */
.panel-a {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--edge);
  outline: 11px solid var(--band);
  outline-offset: 0;
  box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.04), var(--shadow);
  padding: 22px 22px 20px;
  margin: 12px;
}
.panel-a .corner { position: absolute; width: 18px; height: 18px; border: 0 solid var(--orange); pointer-events: none; }
.panel-a .corner.tl { left: -8px; top: -8px; border-left-width: 2px; border-top-width: 2px; }
.panel-a .corner.tr { right: -8px; top: -8px; border-right-width: 2px; border-top-width: 2px; }
.panel-a .corner.bl { left: -8px; bottom: -8px; border-left-width: 2px; border-bottom-width: 2px; }
.panel-a .corner.br { right: -8px; bottom: -8px; border-right-width: 2px; border-bottom-width: 2px; }
.panel-title {
  color: var(--orange); font: 900 1.15rem/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .04em;
  margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.card {
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}
.card-title { color: var(--orange); font: 900 1rem/1.25 var(--font-head); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 18px; flex-wrap: wrap; }
.section-head h2 { margin: 0; position: relative; padding-left: 16px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 5px; border-radius: 2px; background: var(--orange); }
.section-note { color: var(--grey); font-size: .9rem; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-transform: uppercase; font-size: .82rem; letter-spacing: .05em; }
.eyebrow { color: var(--orange); font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; margin: 0 0 6px; }
.notice { background: var(--orange-soft); border: 1px solid rgba(250, 158, 31, .4); border-radius: 8px; padding: 10px 14px; color: #ffe2b8; }
.notice.warn { background: rgba(255, 140, 128, .1); border-color: rgba(255, 140, 128, .5); color: #ffd3cd; }

/* ------------------------------------------------------------ hero (home) */
.hero { position: relative; overflow: hidden; min-height: min(86vh, 760px); display: flex; align-items: center; padding: 48px 0 64px; }
.hero-bg, .hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-bg img { animation: heroZoom 30s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 11, 22, .92) 0%, rgba(5, 11, 22, .55) 45%, rgba(5, 11, 22, .35) 65%, rgba(5, 11, 22, .82) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: center; }
.hero-logo { margin: 0 0 18px; }
.hero-logo img { width: min(560px, 100%); height: auto; filter: drop-shadow(0 12px 30px rgba(0, 0, 0, .55)); animation: rise .8s ease-out both; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #e2e8f2; max-width: 560px; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); animation: rise .8s .1s ease-out both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 0; animation: rise .8s .2s ease-out both; }
.hero-facts { display: flex; gap: 28px; list-style: none; padding: 0; margin: 32px 0 0; animation: rise .8s .3s ease-out both; }
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font: 900 1.7rem/1 var(--font-head); color: #fff; }
.hero-facts span { color: var(--grey); text-transform: uppercase; font-size: .75rem; letter-spacing: .12em; font-weight: 700; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* download box */
.dl-panel { margin: 12px; }
.dl-box .panel-title { font-size: 1.6rem; }
.dl-sub { color: var(--grey); margin: -4px 0 16px; }
.dl-facts { margin: 18px 0 12px; display: grid; gap: 0; }
.dl-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--edge-soft); font-size: .92rem; }
.dl-facts dt { color: var(--grey); }
.dl-facts dd { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.dl-facts .ico { color: var(--blue); }
.dl-note { color: var(--grey-2); font-size: .82rem; margin: 0 0 12px; }
.server-state { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .04); font-size: .92rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--grey-2); display: inline-block; flex: none; }
.on .dot, .online .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(95, 214, 143, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(95, 214, 143, 0); } }

/* ------------------------------------------------------------ home grid */
.home-grid { display: grid; grid-template-columns: 1fr 380px; gap: 40px; margin-top: 24px; margin-bottom: 64px; }
.home-side { display: flex; flex-direction: column; gap: 20px; }
.side-panel { margin: 12px; }
.mini-board { list-style: none; margin: 0 0 14px; padding: 0; }
.mini-board li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--edge-soft); }
.mini-board li > .pname, .mini-board li > .cname { flex: 1; }
.mini-board li a, .mini-board .name, .mini-board .cname > span { flex: 1; color: #fff; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-board li a:hover { color: var(--orange); }
.lvl { color: var(--grey); font-size: .85rem; font-weight: 700; white-space: nowrap; flex: none; }
.lvl .sep { opacity: .5; }
/* top players: name with badge, below it level and current XP */
.mini-board .tp { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mini-board .tp .lvl { font-size: .78rem; padding-left: 41px; }
.mini-board li:has(.tp) { padding: 7px 0; }
.rk { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); font-weight: 900; font-size: .85rem; color: var(--grey); }
.rk-1 { background: linear-gradient(135deg, #ffd25a, #f29a12); color: var(--text-dark); }
.rk-2 { background: linear-gradient(135deg, #e9eef5, #9aa6b6); color: #10141b; }
.rk-3 { background: linear-gradient(135deg, #e5a66b, #a4602b); color: #1b0f05; }
.discord-card {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, #3c46c4, #5865f2); color: #fff; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
  margin: 0 12px;
}
.discord-card:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 22px 50px rgba(88, 101, 242, .35); }
.discord-card > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.discord-card strong { font: 900 1.1rem/1.2 var(--font-head); text-transform: uppercase; }
.discord-card small { opacity: .85; }
.discord-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.discord-ico .ico { width: 28px; height: 28px; }
.discord-ico.big { width: 64px; height: 64px; margin-bottom: 14px; }
.discord-ico.big .ico { width: 38px; height: 38px; }

/* news */
.news-list { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.news-list.full { grid-template-columns: 1fr; }
.news-card { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); border-color: rgba(250, 158, 31, .55); box-shadow: var(--shadow); }
.news-card.big { grid-column: 1 / -1; }
.news-link { display: flex; flex-direction: column; color: var(--text); height: 100%; }
.news-card.big .news-link, .news-list.full .news-link { flex-direction: row; }
.news-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-3); }
.news-card.big .news-img, .news-list.full .news-img { width: 42%; aspect-ratio: auto; min-height: 200px; }
.news-img.placeholder { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #183052, #0a1424); }
.news-img.placeholder img { width: 72px; opacity: .8; }
.news-body { padding: 18px 20px; display: flex; flex-direction: column; flex: 1; }
.news-body h3 { color: #fff; font-size: 1.15rem; }
.news-body p { color: var(--grey); font-size: .95rem; }
.news-meta { display: flex; align-items: center; gap: 10px; color: var(--grey); font-size: .82rem; margin-bottom: 8px; flex-wrap: wrap; }
.tag { background: var(--orange-soft); color: var(--orange); border: 1px solid rgba(250, 158, 31, .35); border-radius: 4px; padding: 2px 8px; font-weight: 800; text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; }
.more { margin-top: auto; color: var(--orange); font-weight: 800; text-transform: uppercase; font-size: .78rem; letter-spacing: .06em; display: inline-flex; gap: 6px; align-items: center; }
.empty {
  text-align: center; padding: 44px 24px; border: 1px dashed rgba(166, 176, 191, .3); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 29, 51, .55), rgba(5, 13, 26, .55));
}
.empty.small { padding: 30px 20px; }
.empty-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--orange-soft); color: var(--orange); margin-bottom: 14px; }
.empty-icon .ico { width: 32px; height: 32px; }
.empty p { color: var(--grey); max-width: 460px; margin-inline: auto; }

/* modes */
.modes-section { padding: 56px 0 64px; background: linear-gradient(180deg, transparent, rgba(15, 29, 51, .5) 20%, rgba(15, 29, 51, .5) 80%, transparent); }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .mode-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mode-grid { grid-template-columns: 1fr; } }
.mode-card { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--edge); aspect-ratio: 16 / 8; background: var(--bg-3); color: #fff; }
.mode-art { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.mode-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(5, 11, 22, .95) 5%, rgba(5, 11, 22, .2) 60%); }
.mode-card:hover { color: #fff; border-color: var(--orange); }
.mode-card:hover .mode-art { transform: scale(1.07); }
.mode-info { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; display: flex; gap: 12px; align-items: center; }
.mode-info strong { display: block; font: 900 1.02rem/1.15 var(--font-head); text-transform: uppercase; }
.mode-info small { color: #cdd5e1; font-size: .8rem; line-height: 1.3; display: block; }
.mode-ico { flex: none; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }

/* feature strip */
.feature-strip { padding: 24px 0 72px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.feature-art img { border-radius: 16px; box-shadow: var(--shadow); }
.feature-copy p { color: var(--grey); font-size: 1.05rem; }

/* ------------------------------------------------------------ page hero (sub pages) */
.page-hero { position: relative; overflow: hidden; padding: 64px 0 40px; border-bottom: 1px solid var(--edge-soft); }
.page-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .38; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(5, 11, 22, .96), rgba(5, 11, 22, .6)), linear-gradient(0deg, var(--bg), transparent 60%); }
.page-hero > .wrap { position: relative; z-index: 2; }
.page-hero h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-lead { color: #d3dae5; max-width: 720px; font-size: 1.08rem; }
.updated { display: block; color: var(--grey-2); font-size: .85rem; margin-top: 4px; }
.error-hero { min-height: 60vh; display: flex; align-items: center; }

/* ------------------------------------------------------------ stats */
.stats-page { padding: 24px 0 72px; }
.board-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 14px; scrollbar-width: thin; }
.tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: var(--radius-btn); white-space: nowrap;
  background: #111c30; border: 1px solid rgba(250, 158, 31, .25); color: var(--grey); font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .03em;
}
.tab:hover { color: #fff; border-color: rgba(250, 158, 31, .7); background: #2a2012; }
.tab.active { background: var(--orange); color: var(--text-dark); border-color: var(--orange); }
.tab .ico { color: currentColor; }
.sort-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip-label { color: var(--grey); font-size: .85rem; font-weight: 700; margin-right: 4px; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--edge); color: var(--grey); font-size: .85rem; font-weight: 700; }
.chip:hover { color: #fff; border-color: var(--orange); }
.chip.active { background: var(--orange-soft); color: var(--orange); border-color: var(--orange); }
.board-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-form { position: relative; flex: 1 1 280px; max-width: 420px; }
.field-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--grey); display: flex; }
input, select, textarea {
  font: inherit; color: var(--text); background: #0b1526; border: 1px solid rgba(166, 176, 191, .25); border-radius: 8px; padding: 10px 12px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(250, 158, 31, .18); }
input:disabled { opacity: .5; }
.search-form input { padding-left: 38px; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; background: var(--panel-solid); border: 1px solid var(--edge);
  border-radius: 10px; box-shadow: var(--shadow); overflow: hidden;
}
.search-results a { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; color: #fff; border-bottom: 1px solid var(--edge-soft); }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover, .search-results a.sel { background: var(--orange-soft); }
.search-results small, .result-list span { color: var(--grey); font-size: .85rem; }
.search-results .none { padding: 12px 14px; color: var(--grey); }
.jump-form { display: flex; align-items: center; gap: 8px; }
.jump-form label { color: var(--grey); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.jump-form input { width: 120px; padding: 7px 10px; }
.own-rank { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; background: var(--orange-soft); border: 1px solid rgba(250, 158, 31, .45); color: #ffd9a3; font-size: .9rem; }
.search-page { margin-bottom: 20px; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.result-list a { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 8px; background: rgba(255, 255, 255, .04); color: #fff; }
.result-list a:hover { background: var(--orange-soft); }
.board-meta { display: flex; justify-content: space-between; color: var(--grey); font-size: .85rem; margin-bottom: 8px; flex-wrap: wrap; gap: 8px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--edge); background: var(--panel); }
table.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th, .board td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--edge-soft); white-space: nowrap; }
.board th { color: var(--grey); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; background: rgba(15, 29, 51, .8); position: sticky; top: 0; }
.board th.sorted { color: var(--orange); }
.board td.sorted { color: #fff; font-weight: 800; }
.board .num { text-align: right; }
.board tbody tr { transition: background-color .12s; }
.board tbody tr:hover { background: rgba(255, 255, 255, .035); }
.board tr.mine { background: rgba(61, 139, 255, .12); box-shadow: inset 3px 0 0 var(--blue); }
.board tr.target { background: var(--orange-soft); box-shadow: inset 3px 0 0 var(--orange); animation: flash 1.6s ease-out; }
@keyframes flash { from { background: rgba(250, 158, 31, .45); } }
.c-rank { width: 70px; }
.c-name a { color: #fff; font-weight: 700; }
.c-name a:hover { color: var(--orange); }
.clan { margin-left: 8px; color: var(--grey-2); font-size: .8rem; }
.pagination { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.pg { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--edge); color: var(--grey); font-weight: 800; font-size: .9rem; }
a.pg:hover { color: #fff; border-color: var(--orange); }
.pg.current { background: var(--orange); color: var(--text-dark); border-color: var(--orange); }
.gap { color: var(--grey-2); padding: 0 4px; }
.pg-size { margin-left: auto; color: var(--grey-2); font-size: .85rem; display: flex; gap: 8px; align-items: center; }
.pg-size .current { color: var(--orange); font-weight: 800; }

/* ------------------------------------------------------------ profile */
.profile-hero { position: relative; overflow: hidden; padding: 56px 0 36px; border-bottom: 1px solid var(--edge-soft); }
.profile-hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(5, 11, 22, .97), rgba(5, 11, 22, .7)), linear-gradient(0deg, var(--bg), transparent 70%); }
.profile-head { position: relative; z-index: 2; display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.avatar { width: 136px; height: 136px; border-radius: 18px; overflow: hidden; border: 2px solid var(--orange); background: radial-gradient(circle at 40% 30%, #22406a, #0a1424); box-shadow: 0 0 0 6px rgba(250, 158, 31, .12), var(--shadow); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 20% 30%; transform: scale(1.35); transform-origin: 30% 30%; }
.profile-id h1 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; text-transform: none; word-break: break-word; }
.verified-badge { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: var(--text-dark); }
.verified-badge .ico { width: 18px; height: 18px; stroke-width: 3; }
.profile-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.profile-tags li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); color: #d7deea; font-size: .88rem; font-weight: 600; }
.profile-tags .lvl-tag { background: var(--orange); color: var(--text-dark); font-weight: 900; }
.claim-state { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--edge); max-width: 380px; flex-wrap: wrap; }
.claim-state > .ico { width: 30px; height: 30px; color: var(--orange); }
.claim-state > span { flex: 1; display: flex; flex-direction: column; min-width: 180px; }
.claim-state small { color: var(--grey); font-size: .82rem; }
.claim-state.verified { border-color: rgba(250, 158, 31, .6); background: linear-gradient(135deg, rgba(250, 158, 31, .16), var(--panel)); }
.claim-state.muted-state > .ico { color: var(--grey-2); }
.claim-state .form-msg { flex-basis: 100%; margin: 0; }
.profile-page { padding: 28px 0 72px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 36px; }
.stat { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; transition: border-color .2s, transform .2s; }
.stat:hover { border-color: rgba(250, 158, 31, .45); transform: translateY(-2px); }
.stat.accent { background: linear-gradient(135deg, rgba(250, 158, 31, .18), var(--panel) 70%); border-color: rgba(250, 158, 31, .5); }
.stat-label { color: var(--grey); font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; }
.stat-value { font: 900 1.6rem/1.2 var(--font-head); color: #fff; font-variant-numeric: tabular-nums; }
.stat-value a { color: var(--orange); }
.stat-sub { color: var(--grey-2); font-size: .82rem; }
.profile-cols { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.profile-side { display: flex; flex-direction: column; gap: 20px; }
.mode-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mode-stat { padding: 16px 18px; }
.ms-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.ms-head h3 { margin: 0; flex: 1; font-size: 1rem; text-transform: uppercase; }
.ms-rank { display: flex; flex-direction: column; align-items: flex-end; font-weight: 900; line-height: 1.1; }
.ms-rank small { color: var(--grey-2); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.ms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 12px; margin: 0; }
.ms-grid dt { color: var(--grey); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.ms-grid dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--edge-soft); }
.rank-list li > span { flex: 1; }
.rank-list a { font-weight: 900; }
.bests { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bests li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; }
.bests span { color: var(--grey); font-size: .88rem; }
.bests strong { grid-row: span 2; align-self: center; font: 900 1.25rem/1 var(--font-head); color: var(--orange); }
.bests small { color: var(--grey-2); font-size: .78rem; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 110px 1fr 60px; gap: 10px; align-items: center; font-size: .88rem; }
.bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--orange-pressed), var(--orange-hover)); border-radius: 4px; transition: width .8s ease-out; }
.bar-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ community */
.discord-hero { position: relative; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 16px; margin: 32px 0; background: linear-gradient(135deg, #2c349c, #5865f2); box-shadow: var(--shadow); }
.discord-hero > img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; mask-image: linear-gradient(90deg, #000 60%, transparent); }
.discord-copy { padding: 36px 40px; color: #fff; }
.discord-copy p { color: #e4e7ff; }
.discord-copy .btn-primary { background: #fff; color: #2c349c; box-shadow: none; }
.discord-copy .btn-primary:hover { background: #ffe3b8; }
.community-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 20px; align-items: start; margin-bottom: 64px; }
.community-grid .card p { color: var(--grey); font-size: .95rem; }
.links-row { margin-bottom: 64px; }
.link-chips { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------ forms, auth, me, admin */
.auth-page { position: relative; min-height: calc(100vh - 70px); display: flex; align-items: center; padding: 48px 0; overflow: hidden; }
.auth-page::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at 50% 50%, rgba(5, 11, 22, .55), rgba(5, 11, 22, .92)); }
.auth-page .page-hero-bg { opacity: .7; }
.auth-wrap { position: relative; z-index: 2; display: flex; justify-content: center; }
.auth-panel { width: min(100%, 460px); }
.auth-lead { color: #d3dae5; }
.form { display: grid; gap: 6px; }
.form label { color: var(--grey); font-size: .85rem; font-weight: 700; margin-top: 8px; }
.form .btn { margin-top: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-msg { min-height: 1.2em; margin: 6px 0 0; font-size: .9rem; color: var(--red); }
.form-msg.ok { color: var(--green); }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fine { color: var(--grey-2); font-size: .8rem; margin: 16px 0 0; }
.me-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.me-grid .card form { margin: 0 0 14px; }
.ok-line { color: var(--green); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.me-actions { display: flex; gap: 10px; margin-bottom: 64px; }
.gm-bar { margin: 20px 0; }
.admin-list { list-style: none; margin: 0; padding: 0; }
.admin-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--edge-soft); }
.admin-list li > span { flex: 1; display: flex; flex-direction: column; }
.admin-list small { color: var(--grey); }
.wrap.narrow > .card { margin: 28px 0; }
.article { margin: 28px 0 16px; }
.article-lead { font-size: 1.15rem; color: #e2e8f2; }
.prose { color: #d7deea; }
.prose h2 { font-size: 1.3rem; margin-top: 1.4em; color: #fff; }
.prose h3 { margin-top: 1.2em; color: #fff; }
.prose ul { padding-left: 1.2em; }
.prose code { background: rgba(255, 255, 255, .08); padding: 1px 6px; border-radius: 4px; }

/* ------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--edge-soft); background: #040912; padding: 36px 0 20px; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 24px; align-items: start; }
.footer-brand p { color: var(--grey-2); font-size: .88rem; margin-top: 10px; }
.footer-brand img { width: 150px; height: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-nav a { color: var(--grey); font-weight: 700; text-transform: uppercase; font-size: .82rem; letter-spacing: .06em; }
.footer-nav a:hover { color: var(--orange); }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; }
.footer-bottom { display: flex; justify-content: space-between; color: var(--grey-2); font-size: .8rem; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--edge-soft); }
.footer-bottom a { color: var(--grey-2); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1180px) and (min-width: 901px) {
  .main-nav .ico-nav { display: none; }
  .main-nav ul a { padding: 10px 9px; }
  .brand img { width: 150px; }
}
@media (max-width: 1100px) {
  .hero-grid, .home-grid, .profile-cols { grid-template-columns: 1fr; }
  .hero-side { max-width: 460px; }
  .community-grid { grid-template-columns: 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-head { grid-template-columns: auto 1fr; }
  .profile-claim { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-inner { grid-template-columns: 44px 1fr auto; gap: 12px; min-height: 62px; }
  .brand { margin: -4px 0 -6px; }
  .brand img { width: 140px; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%; justify-self: stretch; flex-direction: column; align-items: stretch; gap: 12px;
    background: rgba(5, 11, 22, .98); border-bottom: 1px solid var(--edge); padding: 12px 16px 18px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; }
  .main-nav ul a { padding: 13px 8px; font-size: 1rem; }
  .main-nav ul a::after { left: 8px; right: auto; width: 40px; }
  .nav-drawer-dl { display: inline-flex; }
  .nav-dl { display: none; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .feature-grid, .discord-hero, .me-grid { grid-template-columns: 1fr; }
  .discord-hero > img { min-height: 180px; max-height: 220px; mask-image: linear-gradient(180deg, #000 60%, transparent); }
  .mode-stats { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .board .opt { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .nav-actions .btn span { max-width: 84px; }
  .hero { min-height: auto; padding: 28px 0 40px; }
  .hero-facts { gap: 18px; }
  .news-list { grid-template-columns: 1fr; }
  .news-card.big .news-link, .news-list.full .news-link { flex-direction: column; }
  .news-card.big .news-img, .news-list.full .news-img { width: 100%; min-height: 0; aspect-ratio: 16 / 9; }
  .community-grid, .stat-grid { grid-template-columns: 1fr 1fr; }
  .community-grid > * { grid-column: 1 / -1; }
  .stat-value { font-size: 1.3rem; }
  .profile-head { grid-template-columns: 1fr; text-align: left; }
  .avatar { width: 96px; height: 96px; }
  .ms-grid { grid-template-columns: repeat(2, 1fr); }
  .board th, .board td { padding: 9px 10px; }
  .own-rank { margin-left: 0; }
  .jump-form { width: 100%; }
  .jump-form input { flex: 1; }
  .pg-size { margin-left: 0; width: 100%; }
  .form-row { grid-template-columns: 1fr; }
  .panel-a { padding: 18px 16px; }
  .discord-copy { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
