/* ─────────────────────────────────────────────────────────────────────────────
   SteamVault — Main Stylesheet
   Theme: Dark Cyberpunk Gaming
   Fonts: Rajdhani (display) + Inter (body) + JetBrains Mono (code)
───────────────────────────────────────────────────────────────────────────── */

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --bg-base:       #0a0e17;
  --bg-surface:    #0f1521;
  --bg-card:       #141c2e;
  --bg-card-hover: #192235;
  --bg-elevated:   #1e2a42;
  --bg-input:      #111827;

  --border:        rgba(255,255,255,.08);
  --border-accent: rgba(0,210,255,.25);
  --border-hover:  rgba(0,210,255,.5);

  --color-accent:  #00d2ff;
  --color-accent2: #7b5ea7;
  --color-success: #00e676;
  --color-danger:  #ff4757;
  --color-warning: #ffba08;
  --color-info:    #40a9ff;

  --text-primary:  #e8eaf6;
  --text-secondary:#8b9cbf;
  --text-muted:    #4a5568;

  --font-display:  'Rajdhani', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --radius-sm:     6px;
  --radius:        10px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,.4);
  --shadow:        0 4px 24px rgba(0,0,0,.6);
  --shadow-lg:     0 8px 48px rgba(0,0,0,.8);
  --glow-accent:   0 0 20px rgba(0,210,255,.2);

  --nav-h:         64px;
  --transition:    .2s ease;
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main.main-content { flex: 1; padding-top: var(--nav-h); }

a { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

img { max-width: 100%; }
code, .code-font { font-family: var(--font-mono); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Typography ────────────────────────────────────────────────────────────── */
h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .03em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-lg  { padding: .75rem 1.75rem; font-size: 1.1rem; }
.btn-sm  { padding: .35rem .85rem; font-size: .9rem; }
.btn-xs  { padding: .2rem .6rem; font-size: .8rem; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), #0095b3);
  color: #000;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent);
  color: #000;
  box-shadow: var(--glow-accent);
  transform: translateY(-1px);
}

.btn-steam {
  background: #1b2838;
  color: #c6d4df;
  border-color: #2a475e;
}
.btn-steam:hover {
  background: #2a475e;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--border-accent);
}
.btn-outline:hover {
  background: rgba(0,210,255,.08);
  border-color: var(--border-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-danger {
  background: rgba(255,71,87,.15);
  color: var(--color-danger);
  border-color: var(--color-danger);
}
.btn-danger:hover {
  background: var(--color-danger);
  color: #fff;
}

.btn-success {
  background: rgba(0,230,118,.12);
  color: var(--color-success);
  border-color: var(--color-success);
}
.btn-success:hover {
  background: var(--color-success);
  color: #000;
}

.w-full { width: 100%; justify-content: center; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(10,14,23,.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}
.brand-icon { color: var(--color-accent); }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

.nav-link {
  padding: .4rem .9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--border);
}

/* User Menu */
.nav-user { position: relative; }

.user-trigger {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem .35rem .4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font-body);
  font-size: .9rem;
}
.user-trigger:hover { border-color: var(--border-accent); }

.user-avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
}
.nav-user.open .user-dropdown { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1rem;
  color: var(--text-secondary);
  font-size: .9rem;
  transition: all var(--transition);
  text-decoration: none;
}
.dropdown-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.dropdown-item .fas { width: 16px; color: var(--text-muted); }
.dropdown-item:hover .fas { color: var(--color-accent); }
.dropdown-divider { height: 1px; background: var(--border); margin: .25rem 0; }
.text-danger { color: var(--color-danger) !important; }
.text-accent  { color: var(--color-accent) !important; }

/* Notifications */
.nav-notif { position: relative; }

.notif-btn {
  position: relative;
  padding: .4rem .6rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--transition);
}
.notif-btn:hover { color: var(--text-primary); background: var(--bg-card); border-color: var(--border); }

.notif-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--color-danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 100;
}
.nav-notif.open .notif-dropdown { display: block; }

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: .85rem;
}

.notif-item {
  display: block;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background var(--transition);
}
.notif-item:hover { background: var(--bg-elevated); }

.notif-title { font-weight: 600; font-size: .85rem; color: var(--text-primary); }
.notif-body  { font-size: .8rem; color: var(--text-secondary); margin: .2rem 0; }
.notif-time  { font-size: .75rem; color: var(--text-muted); }
.notif-empty { padding: 1.5rem; text-align: center; color: var(--text-muted); font-size: .9rem; }
.notif-clear { font-size: .8rem; color: var(--color-accent); }

/* Mobile toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  margin-left: auto;
}
.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  transition: all var(--transition);
}

/* ── Flash Messages ─────────────────────────────────────────────────────────── */
.flash-container {
  position: fixed;
  top: calc(var(--nav-h) + 1rem);
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  max-width: 380px;
}

.flash {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: .9rem;
  font-weight: 500;
  animation: slideIn .3s ease;
  box-shadow: var(--shadow);
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.flash-success { background: rgba(0,230,118,.1); border-color: var(--color-success); color: var(--color-success); }
.flash-error   { background: rgba(255,71,87,.1);  border-color: var(--color-danger);  color: var(--color-danger); }
.flash-info    { background: rgba(64,169,255,.1);  border-color: var(--color-info);    color: var(--color-info); }

.flash-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: inherit;
  opacity: .7;
}
.flash-close:hover { opacity: 1; }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,210,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,210,255,.04) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-glow {
  position: absolute;
  top: -20%;
  left: -10%;
  width: 70%;
  height: 70%;
  background: radial-gradient(ellipse, rgba(0,210,255,.08) 0%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 6rem 0 4rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(0,210,255,.1);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  padding: .35rem 1rem;
  font-size: .85rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: .05em;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .4rem 1rem;
  font-size: .9rem;
  color: var(--text-secondary);
}
.stat-pill strong { color: var(--color-accent); }

/* ── Sections ───────────────────────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-alt { background: var(--bg-surface); }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}
.section-title.text-center { text-align: center; }

.section-sub {
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  font-size: 1rem;
}

/* ── Steps Grid ─────────────────────────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  position: relative;
  transition: all var(--transition);
}
.step-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--glow-accent);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(0,210,255,.1);
  position: absolute;
  top: 1rem; right: 1.25rem;
  line-height: 1;
}

.step-icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: 1.2rem;
  margin-bottom: .5rem;
}

.step-card p {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.6;
}

/* ── Listing Cards ──────────────────────────────────────────────────────────── */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.listing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.listing-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--glow-accent);
}

.listing-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.listing-seller {
  display: flex;
  align-items: center;
  gap: .65rem;
}

.seller-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.seller-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-primary);
}
.seller-name:hover { color: var(--color-accent); }

.seller-rank {
  display: block;
  font-size: .75rem;
  margin-top: .1rem;
}

.listing-meta-top {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .2rem;
  font-size: .8rem;
  color: var(--text-muted);
}

.listing-bids { color: var(--color-accent); font-weight: 600; }
.listing-games-count { color: var(--text-muted); }

.listing-card-body { padding: 1.25rem; flex: 1; }

.listing-title {
  font-size: 1.05rem;
  margin-bottom: .75rem;
  line-height: 1.3;
}
.listing-title a { color: var(--text-primary); }
.listing-title a:hover { color: var(--color-accent); }

.listing-payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.method-tag {
  background: rgba(0,210,255,.08);
  border: 1px solid rgba(0,210,255,.15);
  border-radius: 100px;
  padding: .2rem .6rem;
  font-size: .78rem;
  color: var(--text-secondary);
}
.method-tag-lg {
  padding: .3rem .8rem;
  font-size: .85rem;
}

.listing-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
}

.listing-time { font-size: .8rem; color: var(--text-muted); }

/* ── Payment Methods Section ──────────────────────────────────────────────── */
.methods-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.method-badge {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition);
}
.method-badge:hover { border-color: var(--border-accent); background: var(--bg-card-hover); }
.method-badge span { font-size: 1.3rem; }

/* ── Disclaimer ─────────────────────────────────────────────────────────────── */
.disclaimer-note {
  text-align: center;
  color: var(--text-secondary);
  font-size: .9rem;
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255,186,8,.05);
  border: 1px solid rgba(255,186,8,.2);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
}
.disclaimer-note i { color: var(--color-warning); }

.disclaimer-box {
  background: rgba(64,169,255,.06);
  border: 1px solid rgba(64,169,255,.2);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.disclaimer-box i { color: var(--color-info); margin-right: .4rem; }

/* ── Listing Detail ─────────────────────────────────────────────────────────── */
.listing-detail { padding: 2rem 0 4rem; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 1.5rem;
  transition: color var(--transition);
}
.back-link:hover { color: var(--color-accent); }

.listing-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  margin-bottom: 2rem;
}

.listing-seller-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.seller-avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border-accent);
}

.seller-name-lg {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: block;
}
.seller-name-lg:hover { color: var(--color-accent); }

.seller-rank-lg {
  font-size: .8rem;
  font-weight: 600;
}

.listing-detail-title {
  font-size: 1.8rem;
  margin-bottom: .75rem;
}

.listing-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.listing-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 1rem;
}
.listing-meta-row i { color: var(--text-muted); margin-right: .25rem; }

.listing-status {
  font-weight: 700;
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .08em;
}
.status-active    { color: var(--color-success); }
.status-closed    { color: var(--color-warning); }
.status-completed { color: var(--color-info); }
.status-removed   { color: var(--color-danger); }

/* Listing detail right column */
.lh-right { display: flex; flex-direction: column; gap: 1rem; min-width: 220px; }

.owner-actions {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.owner-actions h4 { font-size: .9rem; color: var(--text-muted); margin-bottom: .25rem; }

/* Games Section */
.games-section { display: flex; flex-direction: column; gap: 1.5rem; }

.section-label {
  font-size: 1.3rem;
  margin-bottom: .5rem;
  color: var(--text-secondary);
  font-family: var(--font-display);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: .75rem;
}

.game-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}
.game-block:hover { border-color: var(--border-accent); }

.game-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.game-title-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
}

.game-icon {
  width: 36px; height: 36px;
  background: rgba(0,210,255,.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  flex-shrink: 0;
}

.game-name {
  font-size: 1.05rem;
  color: var(--text-primary);
}

.game-bid-count {
  background: rgba(0,210,255,.1);
  border: 1px solid var(--border-accent);
  border-radius: 100px;
  padding: .2rem .65rem;
  font-size: .8rem;
  color: var(--color-accent);
  white-space: nowrap;
}

/* Bids Table */
.bids-table-wrap { overflow-x: auto; }

.bids-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.bids-table th {
  text-align: left;
  padding: .75rem 1rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.bids-table td {
  padding: .9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.bids-table tr:last-child td { border-bottom: none; }

.bid-row:hover td { background: rgba(255,255,255,.02); }
.bid-row.bid-status-accepted td { background: rgba(0,230,118,.04); }
.bid-row.bid-status-rejected td { opacity: .5; }
.bid-row.bid-status-withdrawn td { opacity: .4; }

.bidder-cell { display: flex; align-items: center; gap: .65rem; }
.bidder-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
}
.bidder-name { font-weight: 600; color: var(--text-primary); }
.bidder-name:hover { color: var(--color-accent); }
.bid-message { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

.bid-amount { font-weight: 700; font-family: var(--font-mono); }
.bid-currency { font-size: .75rem; color: var(--text-muted); margin-left: .25rem; }
.bid-time { color: var(--text-muted); white-space: nowrap; }

.rep-pos { color: var(--color-success); font-weight: 600; }
.rep-neg { color: var(--color-danger); font-weight: 600; }

.bid-status-badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.status-pending   { background: rgba(255,186,8,.1);  color: var(--color-warning); }
.status-accepted  { background: rgba(0,230,118,.12); color: var(--color-success); }
.status-rejected  { background: rgba(255,71,87,.08); color: var(--color-danger); }
.status-cancelled { background: rgba(139,156,191,.1);color: var(--text-muted); }
.status-withdrawn { background: rgba(139,156,191,.1);color: var(--text-muted); }

.no-bids {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active { display: flex; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { transform: scale(.94) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 1.2rem; }

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

.modal-body { padding: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.25rem; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-page { padding: 3rem 0 5rem; }

.form-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.form-card-header {
  padding: 2rem 2rem 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}
.form-card-header h1 { font-size: 1.6rem; margin-bottom: .4rem; }
.form-card-header p  { color: var(--text-secondary); font-size: .95rem; }

.form-body { padding: 2rem; display: flex; flex-direction: column; gap: 1.5rem; }

.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-weight: 600; font-size: .9rem; color: var(--text-secondary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-control {
  width: 100%;
  padding: .65rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .95rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0,210,255,.08);
}
.form-control::placeholder { color: var(--text-muted); }

.form-control-sm { padding: .4rem .75rem; font-size: .85rem; }
.form-control-xs { padding: .25rem .5rem; font-size: .8rem; }

textarea.form-control { resize: vertical; min-height: 80px; }
textarea.code-font { font-family: var(--font-mono); font-size: .9rem; line-height: 1.7; }

.form-hint { font-size: .8rem; color: var(--text-muted); }
.form-info-text { font-weight: 600; color: var(--text-primary); }

.required { color: var(--color-danger); }
.optional  { color: var(--text-muted); font-weight: 400; }

.form-actions { display: flex; justify-content: flex-end; gap: .75rem; }

.form-color {
  width: 40px; height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  padding: 2px;
}

/* Checkbox grid */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: .5rem;
}

.checkbox-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  padding: .85rem .5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  font-size: .85rem;
  text-align: center;
}
.checkbox-card:hover { border-color: var(--border-accent); }
.checkbox-card input { display: none; }
.checkbox-card:has(input:checked) {
  border-color: var(--color-accent);
  background: rgba(0,210,255,.08);
  color: var(--color-accent);
}
.checkbox-icon { font-size: 1.5rem; }
.checkbox-label { color: var(--text-secondary); }

/* Rank Info Bar */
.rank-info-bar {
  padding: .85rem 2rem;
  background: rgba(0,210,255,.04);
  border-bottom: 1px solid rgba(0,210,255,.1);
  font-size: .88rem;
  color: var(--text-secondary);
}
.used-count { color: var(--color-warning); font-weight: 600; }

/* ── Browse Page ──────────────────────────────────────────────────────────── */
.browse-page { padding: 2.5rem 0 4rem; }

.browse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.browse-header h1 { font-size: 2rem; }

.search-form { display: flex; gap: .5rem; }
.search-input { width: 280px; }

.pagination {
  display: flex;
  justify-content: center;
  gap: .4rem;
  margin-top: 2.5rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: .9rem;
  transition: all var(--transition);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--border-accent); color: var(--color-accent); }
.page-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #000;
}

/* ── User Profile ─────────────────────────────────────────────────────────── */
.profile-page { padding: 2.5rem 0 4rem; }

.profile-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.avatar-wrapper { position: relative; display: inline-block; }

.profile-avatar {
  width: 120px; height: 120px;
  border-radius: var(--radius-lg);
  border: 3px solid var(--border-accent);
  object-fit: cover;
}

.ban-badge {
  position: absolute;
  bottom: -6px; right: -6px;
  background: var(--color-danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .15rem .4rem;
  border-radius: var(--radius-sm);
  letter-spacing: .06em;
}

.profile-name {
  font-size: 2rem;
  margin-bottom: .25rem;
}

.profile-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: .5rem;
}

.profile-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .85rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 700;
  border: 1px solid;
}

.profile-realname { color: var(--text-secondary); margin-bottom: .25rem; }
.profile-country  { color: var(--text-muted); font-size: .85rem; margin-bottom: .75rem; }

.profile-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1rem 0;
}

.pstat { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.pstat-val { font-size: 1.5rem; font-weight: 700; font-family: var(--font-display); }
.pstat-label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

.ban-warning {
  background: rgba(255,71,87,.1);
  border: 1px solid rgba(255,71,87,.3);
  border-radius: var(--radius-sm);
  padding: .5rem 1rem;
  color: var(--color-danger);
  font-size: .85rem;
  margin-bottom: .75rem;
}

.profile-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.profile-joined { color: var(--text-muted); font-size: .85rem; }

/* Tabs */
.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
  gap: .25rem;
}

.tab-btn {
  padding: .65rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--color-accent); border-bottom-color: var(--color-accent); }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Reviews */
.reviews-list { display: flex; flex-direction: column; gap: .75rem; }

.review-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
}
.review-pos { border-left-color: var(--color-success); }
.review-neg { border-left-color: var(--color-danger); }

.review-left { display: flex; align-items: center; gap: .65rem; }
.review-avatar { width: 36px; height: 36px; border-radius: 50%; }
.review-from { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.review-time { font-size: .75rem; color: var(--text-muted); }
.review-comment { font-size: .88rem; color: var(--text-secondary); }

.rep-pos-badge { color: var(--color-success); font-weight: 700; white-space: nowrap; }
.rep-neg-badge { color: var(--color-danger); font-weight: 700; white-space: nowrap; }

/* Review Form */
.review-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  max-width: 600px;
}
.review-form-card h3 { margin-bottom: 1.25rem; }

.score-toggle { display: flex; gap: .75rem; }
.score-opt { cursor: pointer; }
.score-opt input { display: none; }
.score-pos, .score-neg {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-weight: 600;
  transition: all var(--transition);
}
.score-opt:has(input:checked) .score-pos { background: rgba(0,230,118,.12); border-color: var(--color-success); color: var(--color-success); }
.score-opt:has(input:checked) .score-neg { background: rgba(255,71,87,.12); border-color: var(--color-danger); color: var(--color-danger); }

/* ── Admin Panel ──────────────────────────────────────────────────────────── */
.admin-page { padding: 2.5rem 0 4rem; }

.admin-header { margin-bottom: 2rem; }
.admin-header h1 { font-size: 2rem; }
.admin-header p { color: var(--text-secondary); }

.admin-grid { display: flex; flex-direction: column; gap: 1.5rem; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.astat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}
.astat-val { font-size: 2.5rem; font-weight: 700; font-family: var(--font-display); color: var(--color-accent); }
.astat-label { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; text-transform: uppercase; letter-spacing: .06em; }

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.admin-card h2 { font-size: 1.2rem; margin-bottom: .25rem; }
.card-sub { color: var(--text-muted); font-size: .85rem; margin-bottom: 1rem; }
.full-width { width: 100%; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.admin-table th {
  text-align: left;
  padding: .6rem .85rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table .row-banned td { opacity: .5; }

.user-cell { display: flex; align-items: center; gap: .5rem; }
.user-avatar-xs { width: 24px; height: 24px; border-radius: 50%; }

.mini-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .35rem;
  border-radius: 3px;
  letter-spacing: .06em;
}
.mini-badge.vac { background: rgba(255,71,87,.2); color: var(--color-danger); }

.status-badge {
  padding: .2rem .6rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
}
.status-active { color: var(--color-success); }
.status-banned { color: var(--color-danger); }

.table-responsive { overflow-x: auto; }

/* ── Empty States ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: .3;
}
.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: .5rem;
  color: var(--text-secondary);
}
.empty-state p {
  margin-bottom: 1.5rem;
  font-size: .95rem;
}

/* ── Error Page ───────────────────────────────────────────────────────────── */
.error-page { padding: 6rem 0; text-align: center; }
.error-code {
  font-size: 8rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: rgba(0,210,255,.1);
  line-height: 1;
  margin-bottom: 1rem;
}
.error-content h1 { font-size: 2rem; margin-bottom: .75rem; }
.error-content p { color: var(--text-secondary); margin-bottom: 2rem; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1.1rem;
}
.footer-tagline { color: var(--text-muted); font-size: .85rem; }

.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a { color: var(--text-secondary); font-size: .9rem; }
.footer-links a:hover { color: var(--color-accent); }

.footer-disclaimer {
  max-width: 600px;
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-copy { font-size: .78rem; color: var(--text-muted); }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.mt-2 { margin-top: .75rem; }
.small { font-size: .82rem; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .listing-header-card { grid-template-columns: 1fr; }
  .lh-right { flex-direction: row; flex-wrap: wrap; }
  .profile-header-card { flex-direction: column; }
}

@media (max-width: 768px) {
  .navbar-nav { display: none; flex-direction: column; position: fixed; inset: var(--nav-h) 0 0 0; background: var(--bg-surface); padding: 1.5rem; gap: .5rem; overflow-y: auto; z-index: 999; }
  .navbar-nav.open { display: flex; }
  .mobile-toggle { display: flex; }

  .hero-title { font-size: 2.2rem; }
  .form-row { grid-template-columns: 1fr; }
  .browse-header { flex-direction: column; align-items: flex-start; }
  .search-input { width: 100%; }
  .search-form { flex: 1; width: 100%; }

  .bids-table th, .bids-table td { padding: .6rem .75rem; }
  .game-header { padding: 1rem; }
  .listing-header-card { padding: 1.25rem; }
  .profile-header-card { padding: 1.25rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero-cta { flex-direction: column; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .checkbox-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: 1fr; }
}
