/* ─── Profile Page ─────────────────────────────────────────────────────────── */

.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--navbar-h) + 32px) 20px 40px;
  position: relative;
  z-index: 1;
}

/* Loading / Error states */
.profile-loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.profile-loading .spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border-h);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.profile-error {
  text-align: center;
  padding: 80px 20px;
}
.profile-error-icon { font-size: 3rem; margin-bottom: 16px; }
.profile-error h2   { font-size: 1.4rem; margin-bottom: 8px; }
.profile-error p    { color: var(--text-muted); margin-bottom: 24px; }
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: .88rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .15s;
}
.btn-primary:hover { background: var(--accent-h); }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.profile-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.profile-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.15);
  transform: scale(1.1);
}
.profile-hero-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 36px;
}

.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  border: 3px solid var(--border-h);
  object-fit: cover;
}
.profile-vip-badge {
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #b8860b, #f1c40f, #b8860b);
  color: #000;
  font-size: .62rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: .04em;
}

.profile-hero-info { flex: 1; }
.profile-username {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.profile-steamid {
  font-size: .72rem;
  color: var(--text-dim);
  font-family: monospace;
  margin-bottom: 20px;
}
.profile-hero-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.profile-hero-stat { text-align: center; }
.profile-hero-stat-val {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
}
.profile-hero-stat-label {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ─── Grid layout ───────────────────────────────────────────────────────────── */
.profile-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
}
@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-hero-inner { flex-direction: column; text-align: center; }
  .profile-hero-stats { justify-content: center; }
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}
.profile-card-title {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
}
.profile-stats-loading {
  font-size: .8rem;
  color: var(--text-dim);
  padding: 8px 0;
}

/* ─── CFTools grid ───────────────────────────────────────────────────────────── */
.cftools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.cftools-stat {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.cftools-stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  display: block;
  margin-bottom: 4px;
}
.cftools-stat-label {
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ─── Orders list ────────────────────────────────────────────────────────────── */
.profile-orders-list { display: flex; flex-direction: column; gap: 8px; }
.profile-order-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

/* ─── Form groups in profile ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

/* ─── Navbar extras ──────────────────────────────────────────────────────────── */
.nav-avatar { width: 28px; height: 28px; border-radius: 50%; }
.nav-username { font-size: .82rem; color: var(--text); }
.navbar-links { display: flex; gap: 20px; }
.navbar-links a { color: var(--text-muted); text-decoration: none; font-size: .88rem; transition: color .15s; }
.navbar-links a:hover, .navbar-links a.active { color: var(--text); }
.navbar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.coin-badge-nav { display: flex; align-items: center; gap: 4px; font-size: .82rem; color: #f1c40f; font-weight: 700; }
.btn-login { background: var(--accent); color: #fff; padding: 7px 16px; border-radius: 8px; font-size: .82rem; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.btn-login:hover { background: var(--accent-h); }
.btn-logout { background: transparent; border: 1px solid var(--border-h); color: var(--text-muted); }
.btn-logout:hover { color: #e74c3c; border-color: #e74c3c40; }

/* ─── Toast ──────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #1c2333; border: 1px solid var(--border-h); color: var(--text);
  padding: 12px 24px; border-radius: 10px; font-size: .85rem;
  z-index: 9999; transition: transform .25s; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(63,185,80,.4); color: #3fb950; }
.toast.error   { border-color: rgba(231,76,60,.4); color: #e74c3c; }
