/* ═══════════════════════════════════════════════════════════
   Marche Vanilla — Marketplace Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
@media (pointer: coarse) {
  button, a, .tab-btn, .page-btn, .category-card, .listing-card, .badge-item, .leaderboard-row { -webkit-tap-highlight-color: rgba(31,111,235,0.15); }
}

/* ── Tokens ────────────────────────────────────────────── */
:root {
  --bg: #0F172A;
  --bg-card: #1E293B;
  --bg-input: #0F172A;
  --border: #334155;
  --border-hover: #475569;
  --text: #F8FAFC;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --primary: #1F6FEB;
  --primary-hover: #1A5EC7;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  --purple: #8B5CF6;
  --pink: #EC4899;
  --amber: #F59E0B;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Layout ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-title { font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.section-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 32px; }
.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.loading { text-align: center; padding: 40px; color: var(--text-muted); }

/* ── Navbar ────────────────────────────────────────────── */
#navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; height: 60px; gap: 24px;
}
.nav-brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nav-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: var(--primary); color: #fff;
  border-radius: 8px; font-size: 13px; font-weight: 800;
}
.nav-logo-img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.nav-links { display: flex; gap: 20px; flex: 1; }
.nav-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }
.lang-select {
  background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px; font-size: 12px; font-family: var(--font); cursor: pointer;
}
.nav-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.btn-nav {
  padding: 6px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  background: var(--primary); color: #fff; border: none; cursor: pointer; transition: background 0.2s;
}
.btn-nav:hover { background: var(--primary-hover); }
.btn-logout { background: transparent; color: var(--text-muted); font-size: 16px; padding: 6px 8px; }
.btn-logout:hover { color: var(--error); background: transparent; }

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(31,111,235,0.15), transparent 70%);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 16px; }
.hero-subtitle { font-size: 18px; color: var(--text-muted); margin-bottom: 32px; }
.search-bar {
  display: flex; max-width: 600px; margin: 0 auto; gap: 8px;
}
.search-bar input {
  flex: 1; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  font-size: 15px; font-family: var(--font); outline: none; transition: border-color 0.2s;
}
.search-bar input:focus { border-color: var(--primary); }

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 24px; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: background 0.2s; font-family: var(--font);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 24px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; font-family: var(--font);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-secondary.liked { border-color: var(--error); color: var(--error); }

/* ── Stats Row ─────────────────────────────────────────── */
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.stat-card {
  flex: 1; min-width: 140px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.stat-card-clickable:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  border-color: var(--primary);
}
.stat-number { font-size: 32px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.streak-card.streak-active { border-color: #F59E0B; background: linear-gradient(135deg, var(--bg-card) 60%, rgba(245,158,11,0.08)); }
.streak-card.streak-active .stat-number { color: #F59E0B; }
.streak-best { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ── Activity Chart ────────────────────────────────────── */
.activity-chart-section { margin-bottom: 32px; }
.chart-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-metric-btn {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted); padding: 6px 14px; font-size: 13px; font-family: var(--font);
  cursor: pointer; transition: all 0.2s;
}
.chart-metric-btn:hover { border-color: var(--primary); color: var(--text); }
.chart-metric-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chart-period-controls { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-period-btn {
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-dim); padding: 4px 10px; font-size: 12px; font-family: var(--font);
  cursor: pointer; transition: all 0.2s;
}
.chart-period-btn:hover { border-color: var(--text-muted); color: var(--text-muted); }
.chart-period-btn.active { background: var(--bg-card); border-color: var(--text-muted); color: var(--text); }
.chart-date-range { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.chart-date-input {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); padding: 5px 10px; font-size: 13px; font-family: var(--font);
  color-scheme: dark;
}
.chart-date-sep { color: var(--text-dim); font-size: 14px; }
.chart-container { width: 100%; position: relative; }
.chart-container canvas { width: 100%; border-radius: var(--radius); }
.chart-tooltip {
  display: none; position: absolute; pointer-events: none;
  transform: translate(-50%, -100%); margin-top: -8px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 12px; color: var(--text); line-height: 1.5;
  white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  z-index: 10;
}

/* ── Achievement Notification ─────────────────────────── */
.achv-overlay {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  z-index: 9999; pointer-events: none;
  opacity: 0; transition: opacity 0.4s ease;
}
.achv-overlay.active { opacity: 1; }
.achv-overlay.closing { opacity: 0; }
.achv-card {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px 24px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(30,30,50,0.97) 0%, rgba(40,30,60,0.97) 100%);
  border: 1px solid rgba(245,158,11,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 40px rgba(245,158,11,0.15);
  animation: achvSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
@keyframes achvSlideIn {
  from { transform: translateY(-40px) scale(0.8); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.achv-glow {
  position: absolute; inset: -2px; border-radius: 14px;
  background: conic-gradient(from 0deg, transparent, rgba(245,158,11,0.4), transparent, rgba(139,92,246,0.3), transparent);
  animation: achvGlow 2s linear infinite;
  z-index: -1;
}
@keyframes achvGlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.achv-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(245,158,11,0.15); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; animation: achvPulse 0.6s ease 0.3s both;
}
@keyframes achvPulse { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
.achv-level-icon {
  font-size: 22px; font-weight: 800; color: #F59E0B;
  background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(139,92,246,0.2));
}
.achv-label { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: #F59E0B; font-weight: 700; }
.achv-name { font-size: 16px; font-weight: 700; color: #fff; margin: 2px 0; }
.achv-xp { font-size: 13px; color: #10B981; font-weight: 600; }
.achv-particles { position: absolute; inset: 0; pointer-events: none; }
.achv-particle {
  position: absolute; top: 50%; left: 50%; width: 4px; height: 4px;
  border-radius: 50%; background: #F59E0B;
  animation: achvBurst 0.8s ease-out var(--delay, 0s) both;
}
@keyframes achvBurst {
  0% { transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translateY(0) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) rotate(var(--angle, 0deg)) translateY(-60px) scale(0); opacity: 0; }
}

/* ── Category Grid ─────────────────────────────────────── */
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.category-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 16px; text-align: center; transition: all 0.2s; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.category-icon { font-size: 36px; }

/* ── Listing Grid & Cards ──────────────────────────────── */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.listing-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all 0.2s; display: block;
}
.listing-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.card-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.card-thumb-placeholder {
  width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  background: var(--bg); font-size: 48px;
}
.card-body { padding: 16px; }
.card-type-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.badge-application { background: rgba(31,111,235,0.15); color: var(--primary); }
.badge-template { background: rgba(139,92,246,0.15); color: var(--purple); }
.badge-service { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-portfolio { background: rgba(245,158,11,0.15); color: var(--amber); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-author { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.card-rating { color: var(--warning); }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.card-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-dim); }

/* ── Tags ──────────────────────────────────────────────── */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  background: rgba(100,116,139,0.2); color: var(--text-muted); font-size: 11px;
}

/* ── Filter Bar & Tabs ─────────────────────────────────── */
.filter-bar { margin-bottom: 32px; }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.tab-btn {
  padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: var(--font);
}
.tab-btn:hover { border-color: var(--primary); color: var(--text); }
.tab-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-controls { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-search { max-width: 300px; flex: 1; min-width: 0; }
.filter-select { max-width: 200px; flex-shrink: 0; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--bg-input); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; font-family: var(--font); outline: none; transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); }
.form-textarea { resize: vertical; }
.form-select { cursor: pointer; }

/* ── Publish Form ──────────────────────────────────────── */
.publish-form { max-width: 700px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.type-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.type-option { cursor: pointer; }
.type-option input { display: none; }
.type-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 16px 8px; border-radius: var(--radius); border: 2px solid var(--border);
  transition: all 0.2s; text-align: center;
}
.type-option input:checked + .type-card { border-color: var(--primary); background: rgba(31,111,235,0.1); }
.type-card:hover { border-color: var(--border-hover); }
.type-icon { font-size: 28px; }
.screenshot-preview { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.screenshot-thumb { width: 100px; height: 60px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ── Listing Detail ────────────────────────────────────── */
.listing-detail { margin-bottom: 40px; }
.screenshot-gallery { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; margin-bottom: 24px; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
.screenshot-img { height: 300px; width: min(85vw, 500px); border-radius: var(--radius); object-fit: cover; scroll-snap-align: start; flex-shrink: 0; }
.listing-header { margin-bottom: 24px; }
.listing-header h1 { font-size: 28px; font-weight: 700; margin: 8px 0; }
.listing-meta { display: flex; gap: 20px; font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.listing-rating { color: var(--warning); }
.listing-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.listing-body-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; }
@media (max-width: 900px) and (min-width: 769px) {
  .listing-body-grid { grid-template-columns: 1fr 240px; gap: 20px; }
}
.listing-description h2 { font-size: 18px; margin-bottom: 12px; }
.listing-description p { color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }
.service-rate { font-size: 20px; font-weight: 700; color: var(--success); }
.listing-sidebar { display: flex; flex-direction: column; gap: 16px; }
.author-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; align-items: center; gap: 12px;
}
.author-avatar {
  width: 48px; height: 48px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.author-name a { font-weight: 600; transition: color 0.2s; }
.author-name a:hover { color: var(--primary); }
.listing-actions { display: flex; flex-direction: column; gap: 8px; }

/* ── Reviews ───────────────────────────────────────────── */
.review-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
}
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.review-author { font-weight: 600; font-size: 14px; }
.review-stars { color: var(--warning); font-size: 14px; }
.review-date { font-size: 12px; color: var(--text-dim); margin-left: auto; }
.review-comment { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.star-input { display: flex; gap: 4px; margin-bottom: 8px; }
.star-input .star { font-size: 28px; cursor: pointer; color: var(--text-dim); transition: color 0.15s; }
.star-input .star:hover, .star-input .star.active { color: var(--warning); }

/* ── Profile ───────────────────────────────────────────── */
.profile-header {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; display: flex; align-items: center; gap: 24px; margin-bottom: 32px;
}
.profile-header.compact { padding: 20px; }
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #fff; flex-shrink: 0; overflow: hidden;
}
.profile-info h1, .profile-info h2 { margin-bottom: 4px; }
.profile-username { color: var(--text-muted); font-size: 14px; }
.profile-title { color: var(--primary); font-weight: 600; margin: 4px 0 8px; }
/* ── Badges (RPG style) ───────────────────────────────── */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; margin-bottom: 32px; }
.badge-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px; border-radius: var(--radius);
  background: var(--bg-card); border: 2px solid var(--border); transition: all 0.3s;
  position: relative; overflow: hidden; cursor: default;
}
.badge-item::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, color-mix(in srgb, var(--badge-color, #1F6FEB) 10%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.badge-item:hover { transform: translateY(-4px); }

/* Badge icon */
.badge-icon-wrap { position: relative; z-index: 1; }
.badge-icon { width: 36px; height: 36px; color: var(--badge-color, var(--primary)); filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
.badge-icon svg { width: 100%; height: 100%; }
.badge-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; text-align: center; position: relative; z-index: 1; color: var(--text); }
.badge-date { font-size: 10px; color: var(--text-dim); position: relative; z-index: 1; }

/* Rarity label */
.badge-rarity-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; position: relative; z-index: 1; }
.badge-rarity-common    { color: #94A3B8; }
.badge-rarity-rare      { color: #3B82F6; }
.badge-rarity-epic      { color: #A855F7; }
.badge-rarity-legendary { color: #FBBF24; }
.badge-rarity-mythic    { color: #FF6B35; }

/* Rarity borders & glows */
.badge-common    { border-color: var(--border); }
.badge-common:hover { border-color: #94A3B8; box-shadow: 0 4px 16px rgba(148,163,184,0.15); }
.badge-rare      { border-color: rgba(59,130,246,0.3); }
.badge-rare:hover { border-color: #3B82F6; box-shadow: 0 4px 20px rgba(59,130,246,0.25); }
.badge-epic      { border-color: rgba(168,85,247,0.3); }
.badge-epic:hover { border-color: #A855F7; box-shadow: 0 4px 24px rgba(168,85,247,0.3); }
.badge-legendary { border-color: rgba(251,191,36,0.3); background: linear-gradient(135deg, var(--bg-card) 0%, rgba(251,191,36,0.05) 100%); }
.badge-legendary:hover { border-color: #FBBF24; box-shadow: 0 4px 28px rgba(251,191,36,0.3); }
.badge-mythic    { border-color: rgba(255,107,53,0.4); background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255,107,53,0.08) 100%); animation: mythicPulse 3s ease infinite; }
.badge-mythic:hover { border-color: #FF6B35; box-shadow: 0 4px 36px rgba(255,107,53,0.4); }
@keyframes mythicPulse {
  0%, 100% { box-shadow: 0 0 8px rgba(255,107,53,0.1); }
  50% { box-shadow: 0 0 20px rgba(255,107,53,0.2); }
}

/* Locked badges */
.badge-locked { opacity: 0.4; filter: grayscale(0.8); }
.badge-locked:hover { opacity: 0.6; transform: translateY(-2px); filter: grayscale(0.5); }
.badge-locked .badge-icon { color: var(--text-dim) !important; }

/* ── Badge detail modal ──────────────────────────────── */
.badge-modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
.badge-modal-overlay.active { display: flex; }
.badge-modal-content {
  position: relative; background: var(--bg-primary); border-radius: var(--radius-lg);
  padding: 32px; max-width: 380px; width: 90%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: badgeModalIn 0.25s ease;
}
@keyframes badgeModalIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.badge-modal-close {
  position: absolute; top: 12px; right: 12px; background: none; border: none;
  color: var(--text-secondary); font-size: 24px; cursor: pointer; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.badge-modal-close:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.photo-modal-content {
  position: relative; background: var(--bg-primary); border-radius: var(--radius-lg);
  padding: 32px; max-width: 500px; width: 90%; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3); animation: badgeModalIn 0.25s ease;
}
.photo-modal-img {
  display: block; margin: 0 auto;
  max-width: 100%; max-height: 70vh; border-radius: var(--radius-lg); object-fit: contain;
}
.badge-modal-badge {
  width: 80px; height: 80px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--bg-secondary);
  box-shadow: var(--badge-glow, 0 0 14px) var(--badge-color, #6B7280);
}
.badge-modal-icon { width: 48px; height: 48px; color: var(--badge-color); }
.badge-modal-icon svg { width: 100%; height: 100%; }
.badge-modal-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.badge-modal-badge.has-image { width: 220px; height: 220px; }
.badge-modal-badge.has-image .badge-modal-icon { width: 200px; height: 200px; }
.badge-modal-name { font-size: 1.3rem; font-weight: 700; margin: 0 0 8px; color: var(--text-primary); }
.badge-modal-xp { font-size: 0.9rem; color: var(--accent-primary); font-weight: 600; margin-bottom: 12px; }
.badge-modal-desc { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; margin: 0 0 16px; }
.badge-modal-status { font-size: 0.85rem; padding: 8px 16px; border-radius: var(--radius-md); margin-bottom: 12px; display: inline-flex; align-items: center; gap: 8px; }
.badge-modal-earned { background: rgba(16,185,129,0.12); color: #10B981; }
.badge-modal-locked { background: var(--bg-tertiary); color: var(--text-tertiary); }
.badge-modal-date { font-size: 0.8rem; opacity: 0.8; }
.badge-modal-category { font-size: 0.8rem; color: var(--text-tertiary); margin-top: 4px; }
.badge-modal-condition { font-size: 0.82rem; color: var(--text-tertiary); margin: 10px 0 0; font-style: italic; }
.badge-modal-locked-visual .badge-modal-icon { opacity: 0.4; filter: grayscale(0.8); }
.badge-modal-locked-visual { opacity: 0.85; }
/* Badge progress bar (grid cards) */
.badge-progress {
  width: 100%; padding: 0 4px; margin-top: 4px;
}
.badge-progress-bar {
  width: 100%; height: 4px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden;
}
.badge-progress-fill {
  height: 100%; border-radius: 2px; transition: width 0.4s ease;
}
.badge-progress-text {
  font-size: 9px; color: var(--text-tertiary); display: block; text-align: center; margin-top: 2px;
}
/* Badge modal progress bar */
.badge-modal-progress {
  margin: 12px 0; padding: 0 16px;
}
.badge-modal-progress-bar {
  width: 100%; height: 8px; background: var(--bg-tertiary); border-radius: 4px; overflow: hidden;
}
.badge-modal-progress-fill {
  height: 100%; border-radius: 4px; transition: width 0.4s ease;
}
.badge-modal-progress-text {
  font-size: 0.82rem; color: var(--text-secondary); margin-top: 6px; display: block;
}
.badge-locked-clickable { cursor: pointer; }
.title-clickable { transition: opacity 0.2s, transform 0.2s; }
.title-clickable:hover { opacity: 0.8; transform: scale(1.05); }

/* ── Level ring & Title (RPG) ─────────────────────────── */
.rpg-level-ring {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: conic-gradient(from 0deg, var(--primary), #8B5CF6, var(--primary));
  box-shadow: 0 0 16px rgba(31,111,235,0.4);
  animation: levelRingSpin 8s linear infinite;
}
@keyframes levelRingSpin {
  0% { filter: hue-rotate(0deg); }
  100% { filter: hue-rotate(360deg); }
}
.rpg-level {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); color: #fff; font-size: 16px; font-weight: 800;
}
.rpg-title-section { display: flex; flex-direction: column; gap: 4px; }
.rpg-title-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(31,111,235,0.12), rgba(139,92,246,0.12));
  border: 1px solid rgba(31,111,235,0.25);
  font-size: 15px; font-weight: 700; color: var(--primary);
}
.rpg-title-icon { width: 18px; height: 18px; display: inline-flex; color: inherit; }
.rpg-title-icon svg { width: 100%; height: 100%; }
.rpg-next-title { font-size: 11px; color: var(--text-dim); font-weight: 500; }

/* Title color variants */
.rpg-title-wanderer   { color: #94A3B8; border-color: rgba(148,163,184,0.3); background: linear-gradient(135deg, rgba(148,163,184,0.1), rgba(148,163,184,0.05)); }
.rpg-title-apprentice { color: #10B981; border-color: rgba(16,185,129,0.3); background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(16,185,129,0.05)); }
.rpg-title-initiate   { color: #3B82F6; border-color: rgba(59,130,246,0.3); background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(59,130,246,0.05)); }
.rpg-title-developer  { color: #1F6FEB; border-color: rgba(31,111,235,0.3); background: linear-gradient(135deg, rgba(31,111,235,0.12), rgba(139,92,246,0.12)); }
.rpg-title-artisan    { color: #8B5CF6; border-color: rgba(139,92,246,0.3); background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(139,92,246,0.05)); }
.rpg-title-expert     { color: #A855F7; border-color: rgba(168,85,247,0.3); background: linear-gradient(135deg, rgba(168,85,247,0.1), rgba(168,85,247,0.05)); }
.rpg-title-master     { color: #EC4899; border-color: rgba(236,72,153,0.3); background: linear-gradient(135deg, rgba(236,72,153,0.1), rgba(236,72,153,0.05)); }
.rpg-title-grandmaster{ color: #F97316; border-color: rgba(249,115,22,0.3); background: linear-gradient(135deg, rgba(249,115,22,0.1), rgba(249,115,22,0.05)); }
.rpg-title-champion   { color: #FBBF24; border-color: rgba(251,191,36,0.3); background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,191,36,0.05)); }
.rpg-title-legend     { color: #FBBF24; border-color: rgba(251,191,36,0.4); background: linear-gradient(135deg, rgba(251,191,36,0.15), rgba(249,115,22,0.08)); text-shadow: 0 0 8px rgba(251,191,36,0.3); }
.rpg-title-mythic     { color: #FF6B35; border-color: rgba(255,107,53,0.5); background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(236,72,153,0.08)); text-shadow: 0 0 12px rgba(255,107,53,0.4); animation: mythicTitleGlow 2s ease infinite; }
@keyframes mythicTitleGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(255,107,53,0.2); }
  50% { box-shadow: 0 0 12px rgba(255,107,53,0.4); }
}

/* ── XP Bar ───────────────────────────────────────────── */
.xp-bar-container { width: 100%; max-width: 340px; margin: 8px 0; }
.xp-bar-label { font-size: 11px; color: var(--text-dim); margin-bottom: 3px; display: flex; justify-content: space-between; }
.xp-bar {
  width: 100%; max-width: 340px; height: 12px; background: var(--border); border-radius: 6px;
  overflow: hidden; position: relative;
}
.xp-fill {
  height: 100%; border-radius: 6px; transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, var(--primary), #8B5CF6, #EC4899);
  background-size: 200% 100%; animation: xpShimmer 3s ease infinite;
  position: relative;
}
.xp-fill::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 40px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2));
  border-radius: 0 6px 6px 0;
}
@keyframes xpShimmer { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* ── Gamification card ────────────────────────────────── */
.gami-card {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(31,111,235,0.05) 100%);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; margin-bottom: 32px; position: relative; overflow: hidden;
}
.gami-card::before {
  content: ''; position: absolute; top: -100px; right: -100px; width: 250px; height: 250px;
  background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.gami-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; position: relative; z-index: 1; }
.gami-stats { display: flex; gap: 12px; flex-wrap: wrap; position: relative; z-index: 1; }

/* ── Achievements panel ───────────────────────────────── */
.achievements-container { margin-bottom: 32px; }
.achievements-progress { margin-bottom: 24px; }
.achievements-progress-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.achievements-bar { width: 100%; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.achievements-bar-fill {
  height: 100%; border-radius: 4px; transition: width 1s ease;
  background: linear-gradient(90deg, var(--primary), #8B5CF6, #EC4899);
}
.achievement-category { margin-bottom: 24px; }
.achievement-category-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* ── Leaderboard ──────────────────────────────────────── */
.leaderboard { display: flex; flex-direction: column; gap: 6px; }
.leaderboard-row {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
  text-decoration: none; color: inherit; transition: all 0.2s;
}
.leaderboard-row:hover { border-color: var(--primary); transform: translateX(4px); }
.leaderboard-top1 { border-color: rgba(251,191,36,0.4); background: linear-gradient(90deg, var(--bg-card), rgba(251,191,36,0.06)); }
.leaderboard-top2 { border-color: rgba(148,163,184,0.4); background: linear-gradient(90deg, var(--bg-card), rgba(148,163,184,0.04)); }
.leaderboard-top3 { border-color: rgba(180,83,9,0.3); background: linear-gradient(90deg, var(--bg-card), rgba(180,83,9,0.04)); }
.leaderboard-rank {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: var(--text-muted); flex-shrink: 0;
}
.leaderboard-top1 .leaderboard-rank { color: #FBBF24; }
.leaderboard-top2 .leaderboard-rank { color: #94A3B8; }
.leaderboard-top3 .leaderboard-rank { color: #B45309; }
.leaderboard-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden;
}
.leaderboard-info { flex: 1; min-width: 0; }
.leaderboard-name { font-weight: 600; font-size: 14px; display: block; }
.leaderboard-title { font-size: 12px; color: var(--primary); font-weight: 500; }
.leaderboard-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.leaderboard-level { font-weight: 700; color: var(--text); }
.leaderboard-xp { color: var(--primary); font-weight: 600; }
.leaderboard-badges { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.lb-badge { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-secondary); overflow: hidden; border: 1.5px solid var(--border); }
.lb-badge-rare { border-color: rgba(59,130,246,0.5); }
.lb-badge-epic { border-color: rgba(139,92,246,0.5); }
.lb-badge-legendary { border-color: rgba(251,191,36,0.5); }
.lb-badge-mythic { border-color: rgba(255,107,53,0.6); box-shadow: 0 0 6px rgba(255,107,53,0.3); }
.lb-badge-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lb-badge-svg { display: flex; align-items: center; justify-content: center; width: 18px; height: 18px; }
.lb-badge-svg svg { width: 100%; height: 100%; }

/* ── Dashboard ─────────────────────────────────────────── */
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.dashboard-listings { display: flex; flex-direction: column; gap: 12px; }
.dashboard-listing-row {
  display: flex; align-items: center; gap: 16px; padding: 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s; flex-wrap: wrap;
}
.dashboard-listing-row:hover { border-color: var(--primary); }
.dashboard-listing-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dashboard-listing-title { font-weight: 600; font-size: 14px; color: var(--text); transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.dashboard-listing-title:hover { color: var(--primary); }
.dashboard-listing-stats { display: flex; gap: 14px; font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.dashboard-listing-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Small / Danger buttons ───────────────────────────── */
.btn-small {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: var(--font); transition: all 0.2s; text-decoration: none;
}
.btn-small.btn-secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-small.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: transparent; color: var(--error); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.1); border-color: var(--error); }

/* ── Status badges ────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status-published { background: rgba(16,185,129,0.15); color: var(--success); }
.status-draft { background: rgba(245,158,11,0.15); color: var(--warning); }
.status-archived { background: rgba(100,116,139,0.2); color: var(--text-muted); }

/* ── Pagination ────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.page-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); font-size: 13px; cursor: pointer;
  font-family: var(--font); transition: all 0.2s;
}
.page-btn:hover { border-color: var(--primary); color: var(--text); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Empty State ───────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state .btn-primary { margin-top: 16px; }

/* ── Auth Forms ────────────────────────────────────────── */
.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.auth-tab {
  flex: 1; padding: 12px; background: none; border: none; color: var(--text-muted);
  font-size: 15px; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s;
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-tab:hover:not(.active) { color: var(--text); }
.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-form .form-label { margin-bottom: -8px; }
.auth-submit { width: 100%; padding: 14px; font-size: 15px; margin-top: 4px; }
.auth-submit.loading { opacity: 0.6; pointer-events: none; }
.auth-error {
  background: rgba(239,68,68,0.12); color: var(--error); padding: 12px 16px;
  border-radius: var(--radius-sm); font-size: 14px; border: 1px solid rgba(239,68,68,0.25);
}
.auth-success {
  background: rgba(16,185,129,0.12); color: var(--success); padding: 12px 16px;
  border-radius: var(--radius-sm); font-size: 14px; border: 1px solid rgba(16,185,129,0.25);
}
.auth-switch { text-align: center; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  padding: 32px 0; text-align: center; color: var(--text-dim);
  border-top: 1px solid var(--border); font-size: 13px; margin-top: 48px;
}
.footer a { color: var(--primary); }
.footer a:hover { text-decoration: underline; }

/* ── Spinner ───────────────────────────────────────────── */
.spinner {
  width: 32px; height: 32px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.7s linear infinite; margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Responsive ────────────────────────────────────────── */

/* Tablet / small desktop */
@media (max-width: 768px) {
  .brand-text { display: none; }
  .nav-brand { margin-right: auto; }
  .nav-actions { order: 1; }
  .nav-toggle { display: block; order: 2; }
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; padding: 12px 20px; gap: 0; z-index: 99; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-login-link { color: var(--primary) !important; font-weight: 600; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .listing-grid { grid-template-columns: 1fr; }
  .listing-body-grid { grid-template-columns: 1fr; }
  .stats-row { flex-direction: column; }
  .type-selector { grid-template-columns: repeat(2, 1fr); }
  .filter-controls { flex-direction: column; }
  .filter-search,
  .filter-select,
  .filter-controls .form-input,
  .filter-controls .form-select { max-width: 100%; }
  .profile-header { flex-direction: column; text-align: center; padding: 24px 16px; }
  .profile-header .xp-bar-container { margin-left: auto; margin-right: auto; }
  .search-bar { flex-direction: column; }
  .dashboard-header { flex-direction: column; align-items: stretch; }
  .showcase-grid { grid-template-columns: 1fr; }
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
  .rpg-level-ring { width: 40px; height: 40px; }
  .rpg-level { width: 34px; height: 34px; font-size: 14px; }
  .leaderboard-badges { display: none; }
  .leaderboard-stats { flex-direction: column; gap: 2px; }
  .gami-stats { gap: 8px; }
  .gami-stats .stat-card { min-width: 100px; padding: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column; }
  .form-actions .btn-primary,
  .form-actions .btn-secondary { width: 100%; text-align: center; }
  .hero { padding: 48px 0 36px; }
  .hero-subtitle { font-size: 15px; margin-bottom: 20px; }
  .section { padding: 32px 0; }
  .section-title { font-size: 20px; margin-bottom: 16px; }
  .screenshot-img { height: 200px; }
  .listing-header h1 { font-size: 22px; }
  .listing-meta { flex-wrap: wrap; gap: 10px; font-size: 13px; }
  .gami-card { padding: 20px; }
  .gami-header { gap: 12px; }
  .rpg-title-badge { font-size: 13px; padding: 5px 12px; }
  .community-grid { grid-template-columns: 1fr; }
  .member-card { padding: 16px; }
  .dashboard-listing-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .dashboard-listing-stats { justify-content: flex-start; }
  .dashboard-listing-actions { justify-content: flex-end; }
  .dashboard-listing-title { max-width: 100%; }
}

/* Portrait tablets & large phones */
@media (max-width: 600px) {
  .category-grid { gap: 10px; }
  .category-card { padding: 20px 12px; }
  .stat-card { min-width: 0; }
  .stats-row { gap: 10px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .listing-meta { flex-direction: column; gap: 6px; }
  .review-date { margin-left: 0; }
  .dashboard-listing-info { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tabs { gap: 4px; }
  .tab-btn { padding: 7px 10px; font-size: 12px; }
}

/* Small phones */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .nav-inner { padding: 0 12px; gap: 12px; }
  .nav-brand { font-size: 15px; }
  .lang-select { padding: 3px 6px; font-size: 11px; }
  .hero { padding: 32px 0 24px; }
  .hero-subtitle { font-size: 14px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .category-card { padding: 18px 10px; gap: 8px; }
  .category-icon { font-size: 28px; }
  .category-card span:last-child { font-size: 13px; }
  .section { padding: 24px 0; }
  .section-title { font-size: 18px; margin-bottom: 12px; }
  .listing-grid { gap: 14px; }
  .card-body { padding: 12px; }
  .card-title { font-size: 15px; }
  .card-stats { gap: 10px; font-size: 12px; }
  .stat-card { padding: 14px 10px; min-width: 0; }
  .stat-number { font-size: 24px; }
  .stat-label { font-size: 12px; }
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
  .badge-item { padding: 12px 8px; }
  .badge-name { font-size: 10px; }
  .badge-icon { width: 28px; height: 28px; }
  .gami-card { padding: 16px; margin-bottom: 20px; }
  .gami-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .gami-stats { flex-direction: column; gap: 6px; }
  .gami-stats .stat-card { min-width: 0; width: 100%; }
  .xp-bar-container { max-width: 100%; }
  .xp-bar { max-width: 100%; }
  .profile-header { padding: 16px; margin-bottom: 20px; }
  .profile-avatar { width: 64px; height: 64px; font-size: 26px; }
  .profile-info h1, .profile-info h2 { font-size: 20px; }
  .rpg-title-badge { font-size: 12px; padding: 4px 10px; gap: 6px; }
  .rpg-level-ring { width: 36px; height: 36px; }
  .rpg-level { width: 30px; height: 30px; font-size: 12px; }
  .screenshot-img { height: 160px; }
  .screenshot-gallery { gap: 8px; }
  .listing-header h1 { font-size: 20px; }
  .listing-meta { font-size: 12px; gap: 8px; }
  .author-card { padding: 14px; gap: 10px; }
  .author-avatar { width: 40px; height: 40px; font-size: 16px; }
  .leaderboard-row { padding: 10px 12px; gap: 10px; }
  .leaderboard-avatar { width: 32px; height: 32px; font-size: 12px; }
  .leaderboard-name { font-size: 13px; }
  .leaderboard-rank { width: 24px; height: 24px; font-size: 12px; }
  .tab-btn { padding: 6px 12px; font-size: 12px; }
  .tabs { gap: 4px; }
  .footer { padding: 20px 0; font-size: 12px; margin-top: 32px; }
  .btn-primary { padding: 10px 16px; font-size: 13px; }
  .btn-secondary { padding: 10px 16px; font-size: 13px; }
  .review-card { padding: 12px; }
  .review-header { flex-wrap: wrap; }
  .star-input .star { font-size: 24px; }
  .badge-modal-content { padding: 24px 16px; width: 95%; }
  .publish-form { max-width: 100%; }
  .type-selector { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .type-card { padding: 12px 6px; }
  .type-icon { font-size: 24px; }
  .member-card { flex-direction: column; text-align: center; }
  .member-avatar { margin: 0 auto; }
  .member-skills { justify-content: center; }
  .empty-state { padding: 40px 12px; }
  .empty-icon { font-size: 36px; }
  .pagination { gap: 4px; }
  .page-btn { width: 32px; height: 32px; font-size: 12px; }
}

/* ── Profile extras ────────────────────────────────────── */
.profile-bio { background: var(--bg-card); border-radius: 12px; padding: 20px; margin-bottom: 24px; color: var(--text-secondary); line-height: 1.6; }
.profile-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.profile-contact { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.contact-link { color: var(--text-muted); font-size: 14px; text-decoration: none; transition: color 0.2s; }
.contact-link:hover { color: var(--accent); }
.showcase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.showcase-card { background: var(--bg-card); border-radius: 12px; padding: 16px; text-align: center; border: 1px solid var(--border); }
.showcase-icon { font-size: 32px; margin-bottom: 8px; }
.showcase-name { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.showcase-desc { font-size: 13px; color: var(--text-muted); }

/* ── Community members ─────────────────────────────────── */
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.member-card { display: flex; gap: 16px; background: var(--bg-card); border-radius: 12px; padding: 20px; border: 1px solid var(--border); text-decoration: none; color: inherit; transition: transform 0.2s, box-shadow 0.2s; }
.member-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.member-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent, #1F6FEB); color: white; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 600; font-size: 16px; color: var(--text-primary); }
.member-username { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.member-title { font-size: 13px; color: var(--accent, #1F6FEB); font-weight: 500; margin-bottom: 6px; }
.member-bio { font-size: 13px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 8px; }
.member-skills { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.tag-small { font-size: 11px; padding: 2px 8px; }
.member-projects { display: flex; flex-wrap: wrap; gap: 6px; }
.showcase-chip { font-size: 12px; background: var(--bg-secondary, #1E293B); border-radius: 6px; padding: 3px 8px; color: var(--text-secondary); }
