/* ══════════════════════════════════════════════════════
   CS2 TRACKER — profile.css  (v3 refactored)
══════════════════════════════════════════════════════ */

/* ══ PROFILE PAGE ══ */
.profile-page { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* HEADER */
.profile-header { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; margin-bottom: 1rem; }
.profile-banner { height: 120px; position: relative; overflow: hidden; background: linear-gradient(135deg, #0d1117 0%, #1a2030 60%, #0d1117 100%); }
.profile-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.profile-banner-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,12,15,0.2) 0%, rgba(10,12,15,0.75) 100%); }
.profile-banner-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(232,196,74,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(232,196,74,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* REP BADGE ON BANNER */
.rep-banner-badge {
  position: absolute; bottom: 10px; left: 14px; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  background: rgba(10,12,15,0.75); border: 1px solid var(--border2);
  backdrop-filter: blur(8px); border-radius: 3px; padding: 4px 10px;
}
.rep-banner-score { font-family: var(--display); font-size: 15px; font-weight: 700; }
.rep-banner-label { font-family: var(--mono); font-size: 9px; color: var(--text3); letter-spacing: 1px; }
.rep-banner-btns { display: flex; gap: 4px; }
.rep-mini-btn {
  background: none; border: 1px solid var(--border2); border-radius: 2px;
  padding: 2px 6px; cursor: pointer; font-family: var(--mono); font-size: 9px;
  color: var(--text3); transition: all .15s;
}
.rep-mini-btn:hover { border-color: var(--accent); color: var(--accent); }

/* GROUP CARDS ON BANNER */
.group-cards-banner { position: absolute; bottom: 10px; right: 14px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.group-card-tag {
  display: flex; align-items: center; gap: 6px;
  background: rgba(10,12,15,0.8); border: 1px solid; border-radius: 3px;
  padding: 4px 8px; backdrop-filter: blur(8px);
}
.group-card-tag img { width: 16px; height: 16px; border-radius: 50%; }
.group-card-tag-name { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; font-weight: 600; }
.group-card-group { font-family: var(--mono); font-size: 8px; color: var(--text3); }

.profile-main { padding: 0 1.5rem 1rem; position: relative; }
.profile-top-row { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: .75rem; margin-top: -38px; }
.profile-avatar-area { display: flex; align-items: flex-end; gap: 1rem; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 4px;
  border: 2px solid var(--bg2); background: var(--bg3);
  overflow: hidden; position: relative; z-index: 1; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--accent);
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name-block { padding-bottom: 2px; }
.profile-name { font-family: var(--display); font-size: 24px; font-weight: 700; letter-spacing: .5px; line-height: 1; margin-bottom: 3px; }
.profile-steamid { font-family: var(--mono); font-size: 10px; color: var(--text3); }
.profile-badges-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.profile-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* RANK ROW */
.rank-row { display: flex; gap: 8px; flex-wrap: wrap; padding: .875rem 1.5rem; border-top: 1px solid var(--border); background: rgba(0,0,0,0.2); }
.rank-item { display: flex; align-items: center; gap: 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; padding: 8px 12px; flex: 1; min-width: 150px; }
.rank-icon { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
.rank-premier-icon { background: linear-gradient(135deg, rgba(232,196,74,0.15), rgba(232,196,74,0.05)); border: 1px solid rgba(232,196,74,0.2); }
.rank-faceit-icon { background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(255,107,53,0.05)); border: 1px solid rgba(255,107,53,0.2); }
.rank-item-label { font-family: var(--mono); font-size: 8px; letter-spacing: 1.5px; color: var(--text3); text-transform: uppercase; margin-bottom: 2px; }
.rank-item-val { font-family: var(--display); font-size: 17px; font-weight: 700; line-height: 1; }
.rank-item-sub { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-top: 1px; }
.trust-bar-wrap { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.trust-bar-track { flex: 1; height: 5px; background: var(--bg4); border-radius: 3px; overflow: hidden; min-width: 80px; }
.trust-bar-fill { height: 100%; border-radius: 3px; transition: width .8s ease; background: var(--green); }
.trust-score-val { font-family: var(--display); font-size: 17px; font-weight: 700; }

/* VAC ALERT */
.vac-alert { background: var(--red-bg); border: 1px solid var(--red-border); border-radius: 4px; padding: .875rem 1.25rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 12px; }
.vac-alert-icon { color: var(--red); font-size: 20px; flex-shrink: 0; }
.vac-alert-title { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--red); letter-spacing: 1px; }
.vac-alert-sub { font-size: 11px; color: rgba(224,82,82,.7); margin-top: 2px; }

/* PROFILE TABS */
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.ptab { flex: 1; padding: 10px 1rem; text-align: center; cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); border-bottom: 2px solid transparent; transition: all .15s; background: none; border-top: none; border-left: none; border-right: 1px solid var(--border); }
.ptab:last-child { border-right: none; }
.ptab:hover { color: var(--text2); background: rgba(255,255,255,0.02); }
.ptab.active { color: var(--accent); background: rgba(232,196,74,0.05); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* PROFILE GRID */
.profile-grid { display: grid; grid-template-columns: 280px 1fr; gap: 1rem; }
.col-left { display: flex; flex-direction: column; gap: 1rem; }
.col-right { display: flex; flex-direction: column; gap: 1rem; }

/* INFO TABLE */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 8px 0; vertical-align: middle; }
.info-table .lbl { color: var(--text3); font-size: 11px; width: 50%; }
.info-table .val { color: var(--text); font-family: var(--mono); font-size: 11px; text-align: right; }
.val-green  { color: var(--green)  !important; }
.val-red    { color: var(--red)    !important; }
.val-amber  { color: var(--amber)  !important; }
.val-blue   { color: var(--blue)   !important; }
.val-accent { color: var(--accent) !important; }
.val-purple { color: var(--purple) !important; }

/* STATS GRIDS */
.stats-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }
.stats-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); }
.stat-block { background: var(--bg2); padding: .875rem; text-align: center; }
.stat-val { font-family: var(--display); font-size: 22px; font-weight: 700; line-height: 1; }
.stat-lbl { font-family: var(--mono); font-size: 9px; color: var(--text3); letter-spacing: 1px; margin-top: 3px; }

/* EXTERNAL LINKS */
.ext-links { display: flex; gap: 6px; flex-wrap: wrap; }
.ext-link { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 3px; font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; cursor: pointer; transition: all .15s; border: 1px solid; text-decoration: none; }
.ext-steam   { background: rgba(27,40,56,0.8); color: #c7d5e0; border-color: rgba(102,192,244,0.25); }
.ext-steam:hover { border-color: rgba(102,192,244,0.5); }
.ext-faceit  { background: rgba(255,86,33,0.1); color: #ff5621; border-color: rgba(255,86,33,0.3); }
.ext-faceit:hover { border-color: rgba(255,86,33,0.6); }
.ext-leetify { background: rgba(74,158,255,0.1); color: var(--blue); border-color: rgba(74,158,255,0.25); }
.ext-leetify:hover { border-color: var(--blue); }
.ext-csstats { background: var(--bg4); color: var(--text2); border-color: var(--border2); }
.ext-csstats:hover { border-color: var(--border2); color: var(--text); }

/* MARK BUTTON */
.mark-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 3px; cursor: pointer;
  font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px;
  background: var(--bg4); border: 1px solid var(--border2); color: var(--text2);
  transition: all .15s;
}
.mark-btn:hover { border-color: var(--accent); color: var(--accent); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.7); z-index: 500; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg2); border: 1px solid var(--border2); border-radius: 6px; width: 100%; max-width: 420px; overflow: hidden; animation: fadeUp .2s ease; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-title { font-family: var(--display); font-size: 14px; font-weight: 600; letter-spacing: 1px; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text3); padding: 4px; transition: color .15s; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem; display: flex; flex-direction: column; gap: .875rem; }
.modal-footer { padding: .875rem 1.25rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* GROUP TAGS */
.group-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.gtag { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 3px; cursor: pointer; font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; transition: all .15s; border: 1px solid; user-select: none; }
.gtag:hover { filter: brightness(1.2); }
.gtag.active { filter: brightness(1.3); outline: 1px solid currentColor; }
.gtag-cheater  { background: rgba(224,82,82,0.12); color: var(--red); border-color: var(--red-border); }
.gtag-suspeito { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }
.gtag-wallhack { background: var(--purple-bg); color: var(--purple); border-color: rgba(167,139,250,0.25); }
.gtag-aimbot   { background: var(--orange-bg); color: var(--orange); border-color: var(--orange-border); }
.gtag-legit    { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.gtag-picker .gtag { cursor: pointer; }
.group-note-input { width: 100%; background: var(--bg3); border: 1px solid var(--border2); border-radius: 3px; padding: 8px 10px; color: var(--text); font-family: var(--sans); font-size: 12px; resize: none; outline: none; transition: border-color .15s; min-height: 80px; }
.group-note-input:focus { border-color: var(--accent); }

/* WEAPONS / MAPS */
.weapon-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.weapon-row:last-child { border-bottom: none; }
.weapon-name { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .5px; flex: 1; }
.weapon-kills { font-family: var(--mono); font-size: 11px; color: var(--accent); }
.weapon-bar { flex: 2; height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.weapon-bar-fill { height: 100%; background: var(--accent); opacity: .5; border-radius: 2px; }

/* ALIAS HISTORY */
.alias-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.alias-row:last-child { border-bottom: none; }
.alias-name { color: var(--text); }
.alias-date { font-family: var(--mono); font-size: 9px; color: var(--text3); }

/* MATCH HISTORY */
.match-tabs { display: flex; border-bottom: 1px solid var(--border); padding: 0 1rem; gap: 0; overflow-x: auto; }
.match-tab { font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; padding: 9px 14px; cursor: pointer; color: var(--text3); border-bottom: 2px solid transparent; white-space: nowrap; transition: all .15s; background: none; border-top: none; border-left: none; border-right: none; margin-bottom: -1px; }
.match-tab:hover { color: var(--text2); }
.match-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.match-list { display: flex; flex-direction: column; }
.match-row {
  display: grid; grid-template-columns: 4px 90px 70px 100px 60px 55px auto;
  align-items: center; gap: 10px;
  padding: 9px 1rem; border-bottom: 1px solid var(--border); transition: background .1s;
}
.match-row:last-child { border-bottom: none; }
.match-row:hover { background: rgba(255,255,255,0.018); }
.match-result-bar { width: 4px; height: 30px; border-radius: 2px; flex-shrink: 0; }
.result-win  { background: var(--green); }
.result-loss { background: var(--red); }
.result-draw { background: var(--amber); }
.match-map     { font-family: var(--display); font-size: 13px; font-weight: 600; letter-spacing: .5px; }
.match-map-sub { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-top: 1px; }
.match-score   { font-family: var(--display); font-size: 14px; font-weight: 700; text-align: center; }
.match-kda     { font-family: var(--mono); font-size: 11px; color: var(--text2); text-align: center; }
.match-kda strong { color: var(--text); font-weight: 500; }
.match-rating  { font-family: var(--display); font-size: 13px; font-weight: 700; text-align: center; }
.match-hs      { font-family: var(--mono); font-size: 10px; color: var(--text3); text-align: center; }
.match-date    { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-left: auto; text-align: right; }
.match-empty   { padding: 2rem; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--text3); }

/* PROGRESS BARS */
.prog-row { margin-bottom: 9px; }
.prog-label { display: flex; justify-content: space-between; font-size: 11px; color: var(--text2); margin-bottom: 4px; }
.prog-val { font-family: var(--mono); color: var(--text); }
.prog-track { height: 3px; background: var(--bg4); border-radius: 2px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 2px; transition: width .6s ease; }
.fill-green  { background: var(--green); }
.fill-amber  { background: var(--amber); }
.fill-red    { background: var(--red); }
.fill-blue   { background: var(--blue); }
.fill-accent { background: var(--accent); }

/* INVENTORY */
.inventory-highlight { background: linear-gradient(135deg, rgba(232,196,74,0.08), rgba(232,196,74,0.03)); border: 1px solid var(--border3); border-radius: 5px; padding: 1.25rem; display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.inv-icon  { width: 48px; height: 48px; border-radius: 4px; flex-shrink: 0; background: rgba(232,196,74,0.12); display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 24px; }
.inv-val   { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--accent); line-height: 1; }
.inv-label { font-family: var(--mono); font-size: 9px; color: var(--text3); letter-spacing: 1.5px; margin-top: 2px; }
.inv-items { font-family: var(--mono); font-size: 11px; color: var(--text2); margin-top: 4px; }
.inv-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; padding: 1rem; }
.inv-item  { background: var(--bg3); border: 1px solid var(--border); border-radius: 3px; padding: .625rem; text-align: center; transition: border-color .15s; }
.inv-item:hover { border-color: var(--border2); }
.inv-item-name  { font-size: 10px; color: var(--text2); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-item-price { font-family: var(--mono); font-size: 9px; color: var(--accent); }

/* FACEIT HEX */
.faceit-hex { clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; color: #fff; }
/* PREMIER SHIELD */
.premier-shield { width: 28px; height: 28px; }

/* NO-KEY BAR */
.no-key-bar { background: var(--amber-bg); border-bottom: 1px solid var(--amber-border); padding: .5rem 1.5rem; font-size: 11px; color: var(--amber); text-align: center; }

/* REPUTATION */
.rep-counter { display: flex; align-items: center; gap: 10px; padding: .875rem 1rem; }
.rep-btn { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 3px; cursor: pointer; font-family: var(--mono); font-size: 10px; letter-spacing: 1px; font-weight: 500; transition: all .15s; border: 1px solid; background: none; }
.rep-pos { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.rep-pos:hover { background: rgba(76,175,125,0.2); }
.rep-neg { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.rep-neg:hover { background: rgba(224,82,82,0.2); }
.rep-score { font-family: var(--display); font-size: 20px; font-weight: 700; color: var(--accent); }
.rep-label { font-family: var(--mono); font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; margin-top: 1px; }

/* TAGS */
.tags-wrap { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; padding: 3px 8px; border-radius: 2px; border: 1px solid; }
.tag-positive { background: var(--green-bg); color: var(--green); border-color: var(--green-border); }
.tag-negative { background: var(--red-bg); color: var(--red); border-color: var(--red-border); }
.tag-neutral  { background: var(--bg4); color: var(--text2); border-color: var(--border2); }
.tag-amber    { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-border); }

/* STATUS BADGES */
.status-badge { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 9px; letter-spacing: 1.5px; padding: 3px 8px; border-radius: 2px; font-weight: 500; }
.badge-ban     { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.badge-clean   { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge-watch   { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.badge-private { background: var(--bg4); color: var(--text2); border: 1px solid var(--border2); }
.badge-online  { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }

/* LEETIFY ATTRIBUTION */
.leetify-attribution { display: none; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9px; color: var(--text3); padding: .5rem 1rem; border-top: 1px solid var(--border); }
.leetify-attribution a { color: var(--blue); }

/* COLLAPSIBLES */
.collapsible-body { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.collapsible-body.open { max-height: 3000px; }
.card-toggle { font-family: var(--mono); font-size: 9px; color: var(--accent); cursor: pointer; letter-spacing: 1px; background: none; border: none; padding: 0; transition: color .15s; }
.card-toggle:hover { color: var(--accent2); }

/* RESPONSIVE */
@media(max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .rank-row { flex-direction: column; }
}
@media(max-width: 640px) {
  .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .match-row { grid-template-columns: 4px 1fr auto auto; }
  .match-rating, .match-hs, .match-date { display: none; }
}

/* ── RANK ICONS CUSTOM ── */
#premier-rank-icon {
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

#faceit-rank-icon {
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

#r-premier, #r-premier-sub { display: none; }
