/* =====================================================================
   Mix EnixServer - platforma web
   O singură foaie de stil. Temă întunecată, esports.
   ===================================================================== */

:root {
  --bg: #0a0d13;
  --bg-2: #0d1118;
  --surface: #131924;
  --surface-2: #192130;
  --surface-3: #1f293b;
  --border: #222c3d;
  --border-2: #2c384d;
  --text: #e8edf5;
  --text-2: #b9c3d3;
  --muted: #8592a8;
  --dim: #5b6780;

  --accent: #ff5a1f;
  --accent-2: #ff8743;
  --accent-soft: rgba(255, 90, 31, .14);

  --team-a: #4da3ff;
  --team-a-soft: rgba(77, 163, 255, .16);
  --team-b: #ff4d6d;
  --team-b-soft: rgba(255, 77, 109, .16);

  --win: #27c46b;
  --loss: #ff4757;
  --draw: #9aa4b5;

  --t-silver-1: #dfe6ee; --t-silver-2: #7f8c9d;
  --t-gold-1: #ffe08a;   --t-gold-2: #c8901a;
  --t-mg-1: #8cc8ff;     --t-mg-2: #2563c9;
  --t-eagle-1: #d0a6ff;  --t-eagle-2: #7136d6;
  --t-elite-1: #ffd36b;  --t-elite-2: #e0283c;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Rajdhani", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 90, 31, .08), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(77, 163, 255, .06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: .01em; line-height: 1.15; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }
.strong { font-weight: 700; color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.main { flex: 1 0 auto; padding-bottom: 48px; }
.section { margin-top: 28px; }

/* ---------- butoane ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 10px;
  font: 600 14px/1 var(--font); color: #fff; cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--accent { background: linear-gradient(180deg, var(--accent-2), var(--accent)); box-shadow: 0 6px 18px rgba(255, 90, 31, .28); }
.btn--accent:hover { box-shadow: 0 8px 24px rgba(255, 90, 31, .42); }
.btn--ghost { background: var(--surface-2); border-color: var(--border-2); color: var(--text-2); }
.btn--ghost:hover { border-color: var(--muted); color: #fff; }
.btn--sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.js .js-hide { display: none; }

/* ---------- bara de sus ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 13, 19, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar__in { display: flex; align-items: center; gap: 22px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; flex-shrink: 0; }
.brand__logo { color: var(--accent); }
.brand__name { font: 700 21px/1 var(--font-display); letter-spacing: .03em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav__link {
  position: relative; padding: 8px 14px; border-radius: 8px;
  font-weight: 600; font-size: 14px; color: var(--muted);
  transition: color .15s, background .15s;
}
.nav__link:hover { color: #fff; background: var(--surface); }
.nav__link.is-active { color: #fff; }
.nav__link.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: -13px; height: 2px;
  background: var(--accent); border-radius: 2px; box-shadow: 0 0 12px var(--accent);
}
.topbar__server { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ipchip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px;
  color: var(--text-2); font: 500 13px/1 var(--mono); cursor: pointer;
}
.ipchip:hover { color: #fff; border-color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 3px rgba(39, 196, 107, .18); }
.dot--live { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(39, 196, 107, .18); } 50% { box-shadow: 0 0 0 6px rgba(39, 196, 107, .05); } }

/* ---------- hero (acasă) ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(180deg, rgba(10, 13, 19, 0) 0%, var(--bg) 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 64px),
    radial-gradient(700px 360px at 20% 0%, rgba(255, 90, 31, .16), transparent 70%);
}
.hero__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 52px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px; border: 1px solid var(--border-2); border-radius: 999px;
  background: rgba(19, 25, 36, .7); color: var(--text-2);
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
}
.hero__title {
  margin-top: 18px;
  font-size: clamp(38px, 6vw, 68px); text-transform: uppercase; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff 30%, #b9c3d3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__tagline { margin-top: 10px; font-size: 17px; color: var(--text-2); max-width: 560px; }
.hero__note { margin-top: 14px; color: var(--muted); font-size: 13px; }
.connect { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin-top: 28px; }
.connect__box {
  display: flex; flex-direction: column; justify-content: center;
  padding: 6px 16px; min-height: 42px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
}
.connect__label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.connect__ip { font-size: 16px; color: #fff; }

.counters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.counter {
  display: flex; flex-direction: column; gap: 4px; padding: 20px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.counter__val { font: 700 34px/1 var(--font-display); color: #fff; }
.counter__label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- carduri / grile ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; min-width: 0;
}
.card--flush { padding: 0; overflow: hidden; }
.card__pad { padding: 20px 20px 0; }
.card__pad:last-child { padding-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.grid-teams { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }

.sechead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sechead__title { font-size: 21px; text-transform: uppercase; letter-spacing: .04em; }
.sechead__sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.sechead__link { font-size: 13px; font-weight: 600; color: var(--accent-2); white-space: nowrap; }
.sechead__link:hover { color: var(--accent); }

.pagehead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pagehead__title { font-size: 36px; text-transform: uppercase; letter-spacing: .03em; }
.pagehead__sub { color: var(--muted); margin-top: 4px; }

/* ---------- formulare ---------- */
.search {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 12px; min-width: min(380px, 100%);
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 10px;
  color: var(--muted);
}
.search:focus-within { border-color: var(--accent); }
.search input, .filter select {
  flex: 1; min-width: 0; height: 34px; border: 0; outline: 0; background: transparent;
  color: var(--text); font: 14px var(--font);
}
.search input::placeholder { color: var(--dim); }
.filter { display: flex; align-items: center; gap: 10px; }
.filter__label { color: var(--muted); font-size: 13px; font-weight: 600; }
.filter select {
  flex: none; padding: 0 12px; min-width: 190px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 8px; cursor: pointer;
}
.filter select option { background: var(--surface); }

.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 16px; }
.tabs--scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tabs--scroll::-webkit-scrollbar { display: none; }
.tabs__label { color: var(--dim); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-right: 6px; }
.tabs__item {
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px; font-weight: 600;
}
.tabs__item:hover { border-color: var(--border-2); color: #fff; }
.tabs__item.is-active { background: var(--accent-soft); border-color: rgba(255, 90, 31, .5); color: #fff; }

/* ---------- tabele ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  padding: 12px 14px; text-align: left; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--border); background: var(--bg-2);
}
.table th.is-sorted { color: var(--accent-2); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.table tfoot td { padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; background: var(--bg-2); }
.table .c { text-align: center; }
.table .r { text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--compact td { padding: 9px 10px; }
.table--compact th { padding: 10px; background: transparent; }
.card:not(.card--flush) .table th { background: transparent; }
.card:not(.card--flush) .table-wrap { margin: 0 -8px; }
.td-player { min-width: 170px; }
.td-player .rank, .td-player .tag { margin-left: 8px; vertical-align: middle; }

.player { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; vertical-align: middle; font-weight: 600; color: var(--text); }
.player:hover .player__name { color: var(--accent-2); }
.player__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }

.avatar {
  --h: 200;
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, hsl(var(--h) 70% 52%), hsl(calc(var(--h) + 40) 65% 32%));
  color: #fff; font: 700 14px/1 var(--font-display);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.avatar--xl { width: 84px; height: 84px; border-radius: 20px; font-size: 40px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), var(--shadow); }

.pos { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; font: 700 15px/1 var(--font-display); color: var(--muted); }
.pos--1 { color: #1a1300; background: linear-gradient(135deg, #ffe08a, #e0a419); }
.pos--2 { color: #10151d; background: linear-gradient(135deg, #f1f5f9, #94a3b8); }
.pos--3 { color: #1c0d02; background: linear-gradient(135deg, #f6b88a, #b8642a); }

.wl { color: var(--dim); }
.wl--w { color: var(--win); }
.wl--d { color: var(--draw); }
.wl--l { color: var(--loss); }

/* ---------- insigne de rang ---------- */
.rank { display: inline-flex; align-items: center; gap: 9px; vertical-align: middle; }
.rank__icon {
  --c1: var(--t-silver-1); --c2: var(--t-silver-2);
  display: inline-grid; place-items: center; flex-shrink: 0;
  min-width: 44px; height: 24px; padding: 0 8px;
  clip-path: polygon(10% 0, 90% 0, 100% 50%, 90% 100%, 10% 100%, 0 50%);
  background: linear-gradient(135deg, var(--c1), var(--c2));
  color: #0b0e14; font: 700 13px/1 var(--font-display); letter-spacing: .04em;
}
.rank__name { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.rank--silver .rank__icon { --c1: var(--t-silver-1); --c2: var(--t-silver-2); }
.rank--gold   .rank__icon { --c1: var(--t-gold-1);   --c2: var(--t-gold-2); }
.rank--mg     .rank__icon { --c1: var(--t-mg-1);     --c2: var(--t-mg-2); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.rank--eagle  .rank__icon { --c1: var(--t-eagle-1);  --c2: var(--t-eagle-2); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.rank--elite  .rank__icon { --c1: var(--t-elite-1);  --c2: var(--t-elite-2); color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.rank--gold .rank__name { color: #f3d27a; }
.rank--mg .rank__name { color: #8cc8ff; }
.rank--eagle .rank__name { color: #c9a2ff; }
.rank--elite .rank__name { color: #ffb36b; }
.rank--xs .rank__icon { min-width: 34px; height: 18px; font-size: 11px; padding: 0 6px; }
.rank--lg .rank__icon { min-width: 86px; height: 46px; font-size: 22px; padding: 0 14px; }

/* ---------- liste de meciuri ---------- */
.mlist { display: flex; flex-direction: column; gap: 8px; }
.mrow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px 14px 10px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s, background .15s, transform .15s;
}
.mrow:hover { border-color: var(--border-2); background: var(--surface-3); }
.section > .mlist .mrow { grid-template-columns: auto minmax(0, 1fr) auto 170px 54px; background: var(--surface); }
.section > .mlist .mrow:hover { background: var(--surface-2); }
.mrow__info { display: flex; flex-direction: column; min-width: 0; }
.mrow__map { font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__score { display: inline-flex; align-items: center; gap: 6px; font: 700 24px/1 var(--font-display); }
.sc { min-width: 26px; text-align: center; color: var(--dim); }
.sc--a.is-win { color: var(--team-a); }
.sc--b.is-win { color: var(--team-b); }
.mrow__score .sc:not(.is-win) { color: var(--text-2); }
.sc__sep { color: var(--dim); font-size: 18px; }
.mrow__res { font-size: 13px; font-weight: 600; text-align: right; }
.mrow__res--a { color: var(--team-a); }
.mrow__res--b { color: var(--team-b); }
.mrow__res--draw { color: var(--draw); }
.mrow__id { font: 600 13px var(--mono); color: var(--dim); text-align: right; }

.maptile {
  --h: 200;
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 10px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .06) 0 6px, transparent 6px 12px),
    linear-gradient(135deg, hsl(var(--h) 45% 34%), hsl(calc(var(--h) + 30) 50% 16%));
  color: rgba(255, 255, 255, .92); font: 700 16px/1 var(--font-display); letter-spacing: .04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.maptile--sm { width: 30px; height: 30px; border-radius: 8px; font-size: 12px; }
.maptile--lg { width: 64px; height: 64px; border-radius: 16px; font-size: 24px; }

.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px;
  background: var(--surface-3); color: var(--text-2);
  font: 700 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; vertical-align: middle;
}
.tag--ot { background: rgba(255, 179, 64, .14); color: #ffbf5e; }
.tag--mvp { background: linear-gradient(135deg, #ffe08a, #e0a419); color: #241900; }
.tag--win { background: rgba(39, 196, 107, .15); color: var(--win); }
.tag--perm { background: rgba(255, 71, 87, .15); color: var(--loss); }

/* ---------- rezultate / delte ---------- */
.res { display: inline-grid; place-items: center; min-width: 26px; height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.res--win { background: rgba(39, 196, 107, .15); color: var(--win); }
.res--loss { background: rgba(255, 71, 87, .15); color: var(--loss); }
.res--draw { background: rgba(154, 164, 181, .15); color: var(--draw); }
.delta { font-weight: 700; }
.delta--pos { color: var(--win); }
.delta--neg { color: var(--loss); }
.delta--zero { color: var(--muted); }
.form { display: flex; flex-wrap: wrap; gap: 5px; margin: -4px 0 16px; }
.form .res { min-width: 24px; padding: 0; }
.score-mini { font-weight: 700; }
.maplink { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; white-space: nowrap; }
.maplink:hover span { color: var(--accent-2); }
.maplink .tag { margin-left: 2px; }

/* ---------- paginare ---------- */
.pg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 22px; }
.pg__item {
  display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 10px;
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-weight: 600; font-size: 14px;
}
a.pg__item:hover { border-color: var(--border-2); color: #fff; }
.pg__item.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg__item.is-disabled { opacity: .35; }
.pg__nav { font-size: 20px; }
.pg__gap { display: inline-grid; place-items: center; min-width: 20px; color: var(--dim); }

/* ---------- stări goale / erori ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 20px; color: var(--muted); }
.empty__icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--dim); margin-bottom: 12px; }
.empty__title { color: var(--text); font-weight: 700; }
.empty__text { font-size: 14px; margin-top: 4px; max-width: 380px; }

.errcard {
  max-width: 560px; margin: 60px auto 0; padding: 40px 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.errcard__icon { display: grid; place-items: center; color: var(--accent); margin-bottom: 14px; }
.errcard__code { font: 700 64px/1 var(--font-display); background: linear-gradient(180deg, var(--accent-2), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.errcard__title { font-size: 28px; }
.errcard__text { color: var(--muted); margin: 10px 0 22px; }
.errcard__debug { text-align: left; white-space: pre-wrap; word-break: break-word; font-size: 12px; color: #ffb3b3; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-top: 20px; max-height: 300px; overflow: auto; }

/* ---------- profil ---------- */
.profile-hero {
  --g1: var(--t-silver-1); --g2: var(--t-silver-2);
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(800px 300px at 80% 0%, color-mix(in srgb, var(--g2) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.rank-bg--gold  { --g1: var(--t-gold-1);  --g2: var(--t-gold-2); }
.rank-bg--mg    { --g1: var(--t-mg-1);    --g2: var(--t-mg-2); }
.rank-bg--eagle { --g1: var(--t-eagle-1); --g2: var(--t-eagle-2); }
.rank-bg--elite { --g1: var(--t-elite-1); --g2: var(--t-elite-2); }
.profile-hero__in { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 30px; align-items: center; padding-top: 40px; padding-bottom: 36px; }
.profile-id { display: flex; align-items: center; gap: 20px; min-width: 0; }
.profile-id__text { min-width: 0; }
.profile-id__name { font-size: clamp(28px, 4vw, 44px); overflow-wrap: anywhere; }
.profile-id__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; color: var(--text-2); font-size: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border-2);
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
.chip:hover { color: #fff; border-color: var(--muted); }
.rankcard { padding: 20px; background: rgba(19, 25, 36, .85); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.rankcard__top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.rankcard__name { font: 700 24px/1.1 var(--font-display); color: #fff; }
.rankcard__pts { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rankcard__pts strong { color: var(--text); }
.rankcard__next { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.rankcard__next strong { color: var(--text); }
.progress { height: 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); overflow: hidden; }
.progress__bar { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--t-silver-2), var(--t-silver-1)); }
.tier--gold  { background: linear-gradient(90deg, var(--t-gold-2), var(--t-gold-1)); }
.tier--mg    { background: linear-gradient(90deg, var(--t-mg-2), var(--t-mg-1)); }
.tier--eagle { background: linear-gradient(90deg, var(--t-eagle-2), var(--t-eagle-1)); }
.tier--elite { background: linear-gradient(90deg, var(--t-elite-2), var(--t-elite-1)); }

.statgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.stat__label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.stat__value { font: 700 28px/1.1 var(--font-display); color: #fff; margin-top: 6px; }
.stat__sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.maplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.maplist__item { display: flex; align-items: center; gap: 12px; }
.maplist__info { flex: 1; min-width: 0; }
.maplist__name { font-weight: 700; color: #fff; }
.maplist__meta { font-size: 12px; color: var(--muted); }
.maplist__wr { text-align: right; font: 700 20px/1 var(--font-display); color: #fff; }
.maplist__wr small { display: block; font: 500 11px var(--font); color: var(--dim); margin-top: 2px; }
.minibar { height: 4px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.minibar span { display: block; height: 100%; background: var(--win); border-radius: 4px; }

/* ---------- meci ---------- */
.match-hero {
  --h: 200;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(600px 260px at 50% 0%, hsl(var(--h) 60% 40% / .18), transparent 70%),
    linear-gradient(90deg, var(--team-a-soft), transparent 35%, transparent 65%, var(--team-b-soft)),
    var(--bg-2);
  padding: 22px 0 26px;
}
.backlink { display: inline-block; color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.backlink:hover { color: #fff; }
.match-hero__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 10px 0 18px; }
.mteam { display: flex; align-items: center; gap: 20px; }
.mteam--a { justify-content: flex-end; }
.mteam--b { justify-content: flex-start; }
.mteam__name { font: 700 22px/1 var(--font-display); text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.mteam__score { font: 700 clamp(48px, 9vw, 84px)/1 var(--font-display); color: var(--dim); }
.mteam--a.is-win .mteam__score { color: var(--team-a); text-shadow: 0 0 30px rgba(77, 163, 255, .35); }
.mteam--b.is-win .mteam__score { color: var(--team-b); text-shadow: 0 0 30px rgba(255, 77, 109, .35); }
.mteam--a .mteam__name { color: var(--team-a); }
.mteam--b .mteam__name { color: var(--team-b); }
.match-hero__mid { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.match-hero__map { font: 700 22px/1 var(--font-display); color: #fff; }
.match-hero__res { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border-2); }
.res-a { color: var(--team-a); }
.res-b { color: var(--team-b); }
.res-draw { color: var(--draw); }
.match-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; }
.match-info > div { padding: 8px 14px; background: rgba(19, 25, 36, .8); border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.match-info dt { font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.match-info dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.match-info dd a { color: var(--accent-2); }

.legend { display: flex; gap: 16px; margin: -6px 0 14px; font-size: 12px; color: var(--muted); }
.legend__item { display: inline-flex; align-items: center; gap: 6px; }
.legend .rd { width: 12px; height: 12px; font-size: 0; }
.hist { display: flex; flex-wrap: wrap; gap: 18px 26px; }
.hist__block { min-width: 0; max-width: 100%; }
.hist__block--ot { padding-left: 18px; border-left: 1px dashed var(--border-2); }
.hist__label { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hist__block--ot .hist__label { color: #ffbf5e; }
.hist__halfscores { font-family: var(--font-display); font-size: 14px; letter-spacing: 0; color: var(--text-2); }
.t-a { color: var(--team-a); }
.t-b { color: var(--team-b); }
.hist__rounds { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hist__half { display: flex; flex-wrap: wrap; gap: 3px; }
.hist__ht { color: var(--dim); font-weight: 700; padding: 0 2px; }
.rd {
  display: inline-grid; place-items: center; width: 22px; height: 26px; border-radius: 5px;
  font: 600 10px/1 var(--font); color: rgba(255, 255, 255, .85); cursor: default;
}
.rd--A { background: linear-gradient(180deg, #5eb0ff, #2f7fd6); }
.rd--B { background: linear-gradient(180deg, #ff6a85, #d23453); }

.team__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.team--a .team__head { background: linear-gradient(90deg, var(--team-a-soft), transparent 70%); }
.team--b .team__head { background: linear-gradient(90deg, var(--team-b-soft), transparent 70%); }
.team__title { display: flex; align-items: center; gap: 10px; }
.team__title h2 { font-size: 22px; text-transform: uppercase; letter-spacing: .04em; }
.team__bar { width: 4px; height: 24px; border-radius: 4px; }
.team--a .team__bar { background: var(--team-a); }
.team--b .team__bar { background: var(--team-b); }
.team--a h2 { color: var(--team-a); }
.team--b h2 { color: var(--team-b); }
.team__score { font: 700 34px/1 var(--font-display); color: #fff; }
/* tabelele de scor stau câte două pe rând: celule mai strânse ca să încapă în card */
.table--score th, .table--score td { padding-left: 8px; padding-right: 8px; }
.table--score th:first-child, .table--score td:first-child { padding-left: 14px; }
.table--score th:last-child, .table--score td:last-child { padding-right: 14px; }
.table--score .td-player { min-width: 0; }
.table--score .player__name { max-width: 140px; }
.table--score tbody tr.is-mvp { background: linear-gradient(90deg, rgba(255, 210, 90, .10), rgba(255, 210, 90, 0) 70%); }
.table--score tr.is-mvp td:first-child { box-shadow: inset 3px 0 0 #f5c542; }

/* ---------- banuri ---------- */
.ban-name { font-weight: 700; color: #fff; overflow-wrap: anywhere; }
.ban-id { font-size: 12px; color: var(--dim); margin-top: 2px; overflow-wrap: anywhere; }
.ban-reason { color: var(--text-2); max-width: 320px; overflow-wrap: anywhere; }

/* ---------- subsol / toast ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); color: var(--dim); font-size: 13px; }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 22px; padding-bottom: 22px; }
.footer__links { display: flex; gap: 18px; }
.footer__links a:hover { color: var(--text); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px);
  padding: 10px 18px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--border-2);
  color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- vizibilitate responsive ---------- */
.show-sm-inline, .show-xs-inline { display: none; }

@media (max-width: 1100px) {
  .statgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hide-md { display: none; }
  .player__name { max-width: 160px; }
  .table .rank__name { display: none; } /* în tabele rămâne doar insigna (numele e în title) */
  .table td, .table th { padding-left: 10px; padding-right: 10px; }
  .table--score td, .table--score th { padding-left: 8px; padding-right: 8px; }
  .table--compact .td-player { min-width: 0; }
  .table--compact .player__name { max-width: 110px; }
  .profile-hero__in { grid-template-columns: minmax(0, 1fr) 360px; }
}

/* două tabele de scor alăturate pe ecrane medii: ascundem coloanele secundare */
@media (min-width: 961px) and (max-width: 1279px) {
  .hide-2col { display: none; }
  .table--score .player__name { max-width: 110px; }
  .table--recent td, .table--recent th { padding-left: 8px; padding-right: 8px; }
}

@media (max-width: 960px) {
  .ipchip { display: none; } /* altfel antetul depășește ecranul între 761 și ~830px */
  .hero__in { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .counters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-2, .grid-main, .grid-teams { grid-template-columns: minmax(0, 1fr); }
  .profile-hero__in { grid-template-columns: minmax(0, 1fr); }
  .section > .mlist .mrow { grid-template-columns: auto minmax(0, 1fr) auto 130px; }
  .section > .mlist .mrow__id { display: none; }
}

@media (max-width: 760px) {
  .topbar__in { flex-wrap: wrap; gap: 0 12px; padding-top: 10px; }
  .brand { flex: 1; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; margin: 6px -8px 0; padding-bottom: 4px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav__link { padding: 8px 10px; white-space: nowrap; }
  .nav__link.is-active::after { bottom: -4px; left: 10px; right: 10px; }
  .ipchip { display: none; }
  .hide-sm { display: none; }
  .show-sm-inline { display: inline; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .counters { grid-template-columns: 1fr 1fr; }
  .pagehead__title { font-size: 30px; }
  .search { min-width: 100%; }
  .filter { width: 100%; }
  .filter select { flex: 1; min-width: 0; }
  .section > .mlist .mrow { grid-template-columns: auto minmax(0, 1fr) auto; }
  .section > .mlist .mrow__res { display: none; }
  .match-hero__in { grid-template-columns: 1fr auto 1fr; gap: 10px; }
  .mteam { flex-direction: column; gap: 6px; }
  .mteam--a { flex-direction: column-reverse; }
  .mteam__name { font-size: 15px; }
  .match-hero__mid .maptile { display: none; }
  .match-hero__map { font-size: 18px; }
  .rankcard__next { flex-direction: column; }
  .hist__rounds { flex-direction: column; align-items: flex-start; }
  .hist__ht { display: none; }
}

@media (max-width: 480px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hide-xs { display: none; }
  .show-xs-inline { display: inline; }
  .card { padding: 16px; }
  .card--flush { padding: 0; }
  .card__pad { padding: 16px 16px 0; }
  .table td, .table th { padding-left: 8px; padding-right: 8px; }
  .table th:first-child, .table td:first-child { padding-left: 12px; }
  .table th:last-child, .table td:last-child { padding-right: 12px; }
  .td-player { min-width: 0; }
  .player__name, .table--score .player__name { max-width: 104px; }
  .table--recent .maptile, .table--recent .tag--mvp { display: none; }
  .ban-reason { min-width: 110px; }
  .connect { flex-direction: column; }
  .connect .btn { width: 100%; }
  .counter { padding: 16px; }
  .counter__val { font-size: 28px; }
  .profile-id { gap: 14px; }
  .avatar--xl { width: 64px; height: 64px; font-size: 30px; border-radius: 16px; }
  .stat__value { font-size: 24px; }
  .mrow { gap: 10px; padding: 8px 10px 8px 8px; }
  .mrow__score { font-size: 20px; }
  .rd { width: 20px; height: 24px; }
}
