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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  background: var(--top-trim-gradient);
  flex-shrink: 0;
  position: relative;
  z-index: 30;
}

.brand-rep-accent {
  background: var(--brand-rep-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

a {
  color: var(--text-link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.main-grow {
  flex: 1 0 auto;
}

/* ---------- Animated Shield Logo ---------- */
.brand-logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: var(--text-bright);
}

.brand-shield {
  width: 34px;
  height: 38px;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.45));
  transition: transform 0.25s ease;
}

.brand-shield.lg {
  width: 58px;
  height: 64px;
}

.brand-shield .plus-group {
  transform-origin: 24px 25px;
  animation: shieldIdle 6s ease-in-out infinite;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo-wrap:hover .brand-shield,
.hero-logo-box:hover .brand-shield {
  transform: translateY(-2px) scale(1.04);
}

.brand-logo-wrap:hover .brand-shield .plus-group,
.hero-logo-box:hover .brand-shield .plus-group {
  animation: none;
  transform: rotate(90deg) scale(1.08);
}

@keyframes shieldIdle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.06) rotate(4deg); }
}

/* ---------- Top Header Bar (Profile / Info / Admin) ---------- */
.site-header {
  background: linear-gradient(180deg, var(--bg-header-top) 0%, var(--bg-header) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  position: relative;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Theme Toggle Button ---------- */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.theme-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-accent);
  color: var(--text-bright);
}
.theme-toggle-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.header-search-form {
  flex: 1;
  max-width: 460px;
  display: flex;
  gap: 6px;
}

.header-search-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  color: var(--text-bright);
  font-size: 13px;
  outline: none;
}
.header-search-input:focus {
  border-color: var(--text-accent);
}

/* ---------- Steam Login Button & User Menu ---------- */
.steam-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #689f32 0%, var(--steam-green) 100%);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #75b13b;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  text-decoration: none !important;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease;
}
.steam-login-btn:hover { filter: brightness(1.1); }

.user-auth-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px 4px 5px;
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-size: 13px;
  font-weight: 500;
}
.user-pill img {
  width: 24px;
  height: 24px;
  border-radius: 3px;
  object-fit: cover;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--btn-bg);
  color: var(--text-bright);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(180deg, #438bb8 0%, #317098 100%);
  border-color: #539cc8;
  color: #fff;
}
.btn-primary:hover { background: linear-gradient(180deg, #4d98c7 0%, #3a7ea8 100%); }

.btn-green {
  background: var(--rep-pos-bg);
  border-color: #6ea836;
  color: #fff;
}
.btn-green:hover { background: #66a02e; }

.btn-red {
  background: var(--rep-neg-bg);
  border-color: #b53d3d;
  color: #fff;
}
.btn-red:hover { background: #b23838; }

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

/* ---------- HOMEPAGE: 2-Half Split ---------- */
.home-hero-half {
  position: relative;
  overflow: hidden;
  min-height: 44vh;
  background: var(--hero-gradient);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 20px 44px;
}

.home-hero-half::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/img/hero-cs-bg.jpg");
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  opacity: var(--hero-img-opacity);
  filter: var(--hero-img-filter);
  mix-blend-mode: var(--hero-img-blend);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.82) 70%, transparent 100%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.82) 70%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.home-hero-half::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-sheen);
  pointer-events: none;
  z-index: 0;
}

.home-topbar {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-hero-center {
  position: relative;
  z-index: 1;
  max-width: 680px;
  width: 100%;
  margin: 34px auto 0;
  text-align: center;
}

.hero-logo-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-bright);
}
.hero-title .plus-accent {
  background: var(--brand-rep-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  margin: 6px 0 24px;
  color: var(--text-muted);
  font-size: 14px;
}

.hero-search-form {
  display: flex;
  gap: 8px;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-search);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.hero-search-form:focus-within {
  border-color: var(--text-accent);
  box-shadow: var(--shadow-search), 0 0 0 3px rgba(95, 168, 211, 0.22);
}

.hero-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
}

.hero-search-btn {
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
}

.hero-format-pills {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.format-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.01em;
}

.search-error {
  margin-top: 10px;
  color: var(--rep-neg-text);
  font-size: 13px;
  min-height: 20px;
}

/* Bottom Half: 15 Random Profiles from DB */
.home-directory-half {
  padding: 32px 0 48px;
}

.directory-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.directory-header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 500;
  color: var(--text-accent);
}

.directory-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  color: var(--text-main);
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.profile-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.profile-card.card-elite:hover {
  border-color: #4fc3f7;
  box-shadow: 0 6px 20px rgba(79, 195, 247, 0.24);
}

.profile-card-rep {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.profile-card-ratio {
  display: flex;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-subtle);
  margin-top: auto;
}
.profile-card-ratio-pos {
  background: linear-gradient(90deg, var(--rep-pos-bg) 0%, var(--rep-pos-text) 100%);
}
.profile-card-ratio-neg {
  background: linear-gradient(90deg, var(--rep-neg-bg) 0%, var(--rep-neg-text) 100%);
}

/* ---------- Diamond Badge (200+ Positive Reviews) ---------- */
.elite-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24) 0%, rgba(129, 140, 248, 0.28) 100%);
  color: #7dd3fc;
  border: 1px solid rgba(96, 197, 252, 0.65);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.22);
}
.elite-badge.elite-size-lg {
  padding: 4px 12px;
  font-size: 12.5px;
  gap: 6px;
}
:root[data-theme="light"] .elite-badge {
  color: #0369a1;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.16) 0%, rgba(99, 102, 241, 0.18) 100%);
  border-color: rgba(2, 132, 199, 0.48);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.14);
}

.profile-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--avatar-bg);
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
}

.profile-card-meta {
  min-width: 0;
  flex: 1;
}

.profile-card-name {
  font-weight: 600;
  color: var(--text-bright);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-card-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.profile-card-rep {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rep-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
}
.rep-chip.pos { background: rgba(90, 143, 40, 0.22); color: var(--rep-pos-text); border: 1px solid rgba(90, 143, 40, 0.45); }
.rep-chip.neg { background: rgba(154, 47, 47, 0.22); color: var(--rep-neg-text); border: 1px solid rgba(154, 47, 47, 0.45); }
.rep-chip.ban { background: rgba(224, 82, 82, 0.2); color: #ff8080; border: 1px solid rgba(224, 82, 82, 0.5); font-size: 11px; }

.profile-card-snippet {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-snippet);
  padding: 7px 9px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty-state {
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 36px 24px;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- PROFILE PAGE (SteamTrades 2-Column Layout, No Ads) ---------- */
.profile-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0 48px;
}

.col-heading {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-accent);
  letter-spacing: -0.01em;
}

.left-col {
  border-right: 1px solid var(--border-subtle);
  padding-right: 24px;
}

.sidebar-section {
  margin-bottom: 26px;
}

.sidebar-section-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-accent);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid var(--row-divider);
}
.info-table tr:last-child { border-bottom: none; }

.info-table td {
  padding: 8px 2px;
  font-size: 13px;
}

.info-label {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-value {
  text-align: right;
  color: var(--text-bright);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.info-value.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.info-value.bad { color: var(--check-warn); }

/* Click-to-copy SteamID controls */
.copy-id-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.copy-id-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.copy-id-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-subtle);
  color: var(--text-bright);
}
.copy-id-btn.copied {
  background: rgba(90, 143, 40, 0.2);
  border-color: rgba(140, 209, 73, 0.45);
  color: var(--rep-pos-text);
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.status-dot.ok { background: var(--check-ok); color: #162410; }
.status-dot.bad { background: var(--check-warn); color: #ffffff; }

/* Right Column: Reputation Header */
.rep-profile-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.rep-avatar {
  width: 78px;
  height: 78px;
  border-radius: 4px;
  object-fit: cover;
  background: var(--avatar-bg);
  border: 2px solid var(--border-strong);
  flex-shrink: 0;
}

.rep-banner-right {
  flex: 1;
  min-width: 0;
}

.rep-bar-wrap {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 10px;
}

.rep-bar-pos {
  background: linear-gradient(180deg, #649e2d 0%, var(--rep-pos-bg) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 90px;
  border: 1px solid #75b339;
}

.rep-bar-neg {
  background: linear-gradient(180deg, #a63434 0%, var(--rep-neg-bg) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 90px;
  border: 1px solid #bd4444;
}

.rep-profile-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.visit-steam-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}
.visit-steam-link:hover { color: var(--text-bright); text-decoration: none; }

.profile-display-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
}

/* Reputation Sub-bar & Filter Controls */
.rep-section-bar {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-accent);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.rep-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rep-filter-btn {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}
.rep-filter-btn:hover {
  color: var(--text-bright);
  border-color: var(--border-strong);
}
.rep-filter-btn.active {
  background: #3a7ca5;
  border-color: #4b91bd;
  color: #ffffff;
}
.rep-filter-btn.active-pos {
  background: var(--rep-pos-bg);
  border-color: #6ea836;
  color: #ffffff;
}
.rep-filter-btn.active-neg {
  background: var(--rep-neg-bg);
  border-color: #b53d3d;
  color: #ffffff;
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.pagination-bar.top {
  margin-top: 0;
  margin-bottom: 12px;
  padding-top: 0;
  padding-bottom: 10px;
  border-top: none;
  border-bottom: 1px solid var(--border-subtle);
}

.pagination-info {
  font-size: 12px;
  color: var(--text-muted);
}

.pagination-controls {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.page-btn {
  min-width: 32px;
  height: 30px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.page-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: var(--text-accent);
  color: var(--text-bright);
}
.page-btn.active {
  background: #3a7ca5;
  border-color: #4b91bd;
  color: #ffffff;
  cursor: default;
}
.page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 5px;
  color: var(--text-muted);
  font-size: 12.5px;
  user-select: none;
}

/* Comment Composer */
.composer-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.composer-rating-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.rating-toggle {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rating-toggle.active-pos {
  background: rgba(90, 143, 40, 0.28);
  border-color: #6ea836;
  color: var(--rep-pos-text);
}
.rating-toggle.active-neg {
  background: rgba(154, 47, 47, 0.28);
  border-color: #bd4444;
  color: var(--rep-neg-text);
}

.composer-textarea {
  width: 100%;
  min-height: 78px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  padding: 10px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  outline: none;
}
.composer-textarea:focus { border-color: var(--text-accent); }

.composer-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Comments List */
.comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-item {
  display: flex;
  align-items: stretch;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.comment-item.comment-pos {
  border-left-color: var(--rep-pos-bg);
}
.comment-item.comment-pos:hover {
  border-color: rgba(90, 143, 40, 0.45);
  border-left-color: var(--rep-pos-text);
  background: var(--bg-card-hover);
}
.comment-item.comment-neg {
  border-left-color: var(--rep-neg-bg);
}
.comment-item.comment-neg:hover {
  border-color: rgba(154, 47, 47, 0.45);
  border-left-color: var(--rep-neg-text);
  background: var(--bg-card-hover);
}

.comment-main {
  flex: 1;
  display: flex;
  gap: 12px;
  padding: 13px 14px;
  min-width: 0;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--avatar-bg);
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author-name {
  font-weight: 600;
  color: var(--text-link);
  font-size: 13.5px;
}

.comment-delta {
  font-size: 12px;
  font-weight: 700;
}
.comment-delta.pos { color: var(--rep-pos-text); }
.comment-delta.neg { color: var(--rep-neg-text); }

.comment-body {
  color: var(--text-main);
  font-size: 13.5px;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 7px;
}

.comment-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.comment-time {
  cursor: help;
  border-bottom: 1px dotted var(--border-strong);
}

.report-btn-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.report-btn-link:hover { color: var(--rep-neg-text); }
.report-btn-link.reported { color: #7a838e; cursor: default; text-decoration: none; }

.comment-thumb-col {
  width: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
  flex-shrink: 0;
}

.comment-thumb-badge {
  width: 28px;
  height: 28px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.comment-thumb-badge.pos { background: var(--rep-pos-bg); }
.comment-thumb-badge.neg { background: var(--rep-neg-bg); }

/* Notice / Alert Banner */
.notice-banner {
  background: var(--notice-info-bg);
  border: 1px solid var(--notice-info-border);
  color: var(--notice-info-text);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.notice-banner.error {
  background: var(--notice-err-bg);
  border-color: var(--notice-err-border);
  color: var(--notice-err-text);
}
.notice-banner.success {
  background: var(--notice-ok-bg);
  border-color: var(--notice-ok-border);
  color: var(--notice-ok-text);
}

/* ---------- FOOTER (Matches Screenshot 3) ---------- */
.site-footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-subtle);
  padding: 36px 0 22px;
  margin-top: auto;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 26px;
}

.footer-col h4 {
  margin: 0 0 12px;
  color: var(--text-bright);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-icon {
  color: var(--text-accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.footer-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 390px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--footer-link);
  font-size: 13px;
  font-weight: 600;
}
.footer-links a:hover { color: var(--text-bright); }

.footer-bottom {
  border-top: 1px solid var(--footer-divider);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}

.powered-by-steam {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
.powered-by-steam strong {
  color: var(--footer-strong);
}

.footer-brand-right {
  font-weight: 700;
  color: var(--footer-strong);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999;
}
.modal-backdrop.open { display: flex; }

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 520px;
  padding: 20px;
  box-shadow: var(--shadow-modal);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-header h3 {
  margin: 0;
  font-size: 17px;
  color: var(--text-bright);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text-bright); }

/* ---------- ADMIN PANEL ---------- */
.admin-login-box {
  max-width: 400px;
  margin: 72px auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 28px;
}

.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: var(--text-bright);
  font-family: inherit;
  font-size: 13px;
  outline: none;
}
.form-control:focus { border-color: var(--text-accent); }

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.admin-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-tab.active {
  background: #3a7ca5;
  border-color: #4b91bd;
  color: #fff;
}

.badge-count {
  background: var(--rep-neg-bg);
  color: #fff;
  border-radius: 99px;
  padding: 1px 7px;
  font-size: 11px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-val { font-size: 26px; font-weight: 700; color: var(--text-bright); margin-top: 4px; }

.admin-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-bottom: 18px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  background: var(--bg-table-head);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.code-snippet {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-code);
  word-break: break-all;
  max-height: 90px;
  overflow-y: auto;
}

/* ---------- Help & Legal Pages (SteamTrades-Inspired 2-Column Docs) ---------- */
.info-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0 56px;
  align-items: start;
}

.info-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-nav-group {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.info-nav-heading {
  margin: 0;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-accent);
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 7px;
}

.info-nav-list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.info-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  text-decoration: none !important;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.info-nav-link:hover {
  background: var(--bg-card-hover);
  color: var(--text-bright);
}

.info-nav-link.active {
  background: var(--bg-subtle);
  color: var(--text-bright);
  font-weight: 600;
  border-left-color: var(--text-accent);
}

.info-article {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px 32px;
}

.info-article-header {
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-subtle);
}

.info-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-accent);
  margin-bottom: 6px;
}

.info-article-header h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 600;
  color: var(--text-bright);
  letter-spacing: -0.015em;
}

.info-lead {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.info-meta-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.info-toc {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
}

.info-toc-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.info-toc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
}

.info-section {
  margin-bottom: 26px;
}
.info-section:last-of-type {
  margin-bottom: 12px;
}

.info-section h2 {
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--row-divider);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-bright);
  flex-shrink: 0;
}

.info-section p {
  margin: 0 0 10px;
  color: var(--text-main);
  line-height: 1.68;
}

.info-section ul,
.info-section ol {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--text-main);
  line-height: 1.68;
}

.info-section li {
  margin-bottom: 6px;
}

.info-section code {
  background: var(--bg-code);
  color: var(--text-code);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--border-subtle);
}

.info-code-block {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-code);
  overflow-x: auto;
  white-space: pre;
  line-height: 1.55;
  margin: 10px 0 14px;
}

.info-callout {
  background: var(--notice-info-bg);
  border: 1px solid var(--notice-info-border);
  border-left: 3px solid var(--text-accent);
  color: var(--notice-info-text);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0;
}

.info-callout.warn {
  background: var(--notice-err-bg);
  border-color: var(--notice-err-border);
  border-left-color: var(--check-warn);
  color: var(--notice-err-text);
}

.info-callout.ok {
  background: var(--notice-ok-bg);
  border-color: var(--notice-ok-border);
  border-left-color: var(--check-ok);
  color: var(--notice-ok-text);
}

.info-table-doc {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 13px;
}
.info-table-doc th,
.info-table-doc td {
  text-align: left;
  padding: 9px 11px;
  border: 1px solid var(--border-subtle);
  vertical-align: top;
}
.info-table-doc th {
  background: var(--bg-table-head);
  color: var(--text-bright);
  font-weight: 600;
  font-size: 12.5px;
}

.info-example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.info-example-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.info-example-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.info-example-label.pos { color: var(--rep-pos-text); }
.info-example-label.neg { color: var(--rep-neg-text); }

.info-back-row {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

/* ---------- Responsive Mobile Layout ---------- */
@media (max-width: 960px) {
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-layout { grid-template-columns: 1fr; }
  .left-col {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-right: 0;
    padding-bottom: 20px;
  }
  .info-layout { grid-template-columns: 1fr; }
  .info-sidebar { position: static; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .profile-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .grid-2, .grid-3, .info-example-grid { grid-template-columns: 1fr; }
  .site-header-inner { flex-wrap: wrap; }
  .header-search-form { order: 3; max-width: 100%; width: 100%; }
  .home-topbar { position: static; display: flex; justify-content: flex-end; margin-bottom: 10px; }
  .home-hero-center { margin-top: 8px; }
  .home-hero-half::before { opacity: calc(var(--hero-img-opacity) * 0.55); }
  .hero-search-form { flex-direction: column; }
  .rep-profile-banner { flex-direction: column; }
  .info-article { padding: 20px 18px; }
}
