/* ============================================================
   TeroBazaar — Premium Modern Design System
   Palette: Deep Space Black + Electric Blue + Neon Purple
   Type: 'Inter' / System UI
   Aesthetic: Glassmorphism, Neon Glows, Smooth Transitions
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Core Colors */
  --bg-base: #050505;
  --bg-gradient: radial-gradient(circle at top left, #1a0b2e 0%, #050505 40%),
                 radial-gradient(circle at bottom right, #091c3f 0%, #050505 50%);
  --surface: rgba(20, 20, 25, 0.4);
  --surface-glass: rgba(255, 255, 255, 0.03);
  --surface-glass-hover: rgba(255, 255, 255, 0.08);
  
  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(138, 43, 226, 0.4);

  /* Typography Colors */
  --text: #ffffff;
  --text-muted: #a0a0ab;
  --text-faint: #6e6e7a;

  /* Accents */
  --accent-primary: #8a2be2; /* Neon Purple */
  --accent-secondary: #00d2ff; /* Electric Blue */
  --accent-gradient: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
  
  --accent-primary-soft: rgba(138, 43, 226, 0.15);
  --accent-secondary-soft: rgba(0, 210, 255, 0.15);

  /* Status Colors */
  --good: #00ffaa;
  --good-soft: rgba(0, 255, 170, 0.15);
  --bad: #ff3366;
  --bad-soft: rgba(255, 51, 102, 0.15);

  /* Geometry & Shadows */
  --radius-s: 12px;
  --radius-m: 20px;
  --radius-l: 32px;

  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px 0 rgba(138, 43, 226, 0.2);
  --shadow-pop: 0 15px 40px -10px rgba(0, 0, 0, 0.8);

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg-base);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100vh;
}

/* Background Ambient Orbs */
.ambient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.5;
  animation: floatOrb 15s ease-in-out infinite alternate;
}
.orb-1 {
  width: 400px; height: 400px;
  background: var(--accent-primary);
  top: -100px; left: -100px;
}
.orb-2 {
  width: 500px; height: 500px;
  background: var(--accent-secondary);
  bottom: -200px; right: -100px;
  animation-delay: -5s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0 0 0.5em;
  letter-spacing: -0.03em;
}

p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; text-decoration: none; transition: all 0.3s ease; }
img { max-width: 100%; display: block; border-radius: var(--radius-s); }
button { font-family: inherit; }

::selection { background: var(--accent-primary); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-secondary); outline-offset: 4px; border-radius: 8px; }

.mono { font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 24px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; 
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  backdrop-filter: blur(10px);
}
.btn:active { transform: scale(0.95); }

.btn-primary { 
  background: var(--accent-gradient); 
  color: #fff; 
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
}
.btn-primary:hover { 
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.5); 
  filter: brightness(1.1); 
}

.btn-ghost { 
  background: var(--surface-glass); 
  border-color: var(--border); 
  color: var(--text); 
}
.btn-ghost:hover { 
  background: var(--surface-glass-hover); 
  border-color: var(--accent-secondary); 
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.2);
}

.btn-outline { 
  background: transparent; 
  border-color: var(--border-strong); 
  color: var(--text); 
}
.btn-outline:hover { 
  background: var(--surface-glass); 
  border-color: var(--accent-primary); 
  color: #fff;
}

.btn-danger { background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(255, 51, 102, 0.3); }
.btn-danger:hover { background: rgba(255, 51, 102, 0.25); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; filter: none; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5, 5, 5, 0.6); 
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 80px; }

.logo { 
  display: flex; align-items: center; gap: 10px; 
  font-family: var(--font-display); font-size: 24px; font-weight: 800; 
  flex-shrink: 0; letter-spacing: -0.5px;
}
.logo .dot { 
  width: 10px; height: 10px; border-radius: 50%; 
  background: var(--accent-secondary); 
  box-shadow: 0 0 15px var(--accent-secondary); 
}
.logo span { background: var(--accent-gradient); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; color: var(--text-muted); flex-shrink: 0; }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-shadow: 0 0 10px rgba(255,255,255,0.3); }

.search-bar {
  flex: 1; display: flex; align-items: center; gap: 12px;
  background: var(--surface-glass); border: 1px solid var(--border); border-radius: 999px;
  padding: 12px 20px; max-width: 480px;
  transition: all 0.3s ease;
}
.search-bar:focus-within {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-secondary);
  box-shadow: 0 0 20px rgba(0, 210, 255, 0.15);
}
.search-bar input {
  border: none; background: transparent; color: var(--text); outline: none; font-size: 15px; width: 100%;
}
.search-bar input::placeholder { color: var(--text-faint); }
.search-bar svg { flex-shrink: 0; color: var(--text-muted); }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; margin-left: auto; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid transparent; 
  background: linear-gradient(var(--bg-base), var(--bg-base)) padding-box, var(--accent-gradient) border-box;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: var(--text);
  box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
}

@media (max-width: 900px) { .nav-links, .search-bar { display: none; } }

/* ---------------- Hero ---------------- */
.hero { padding: 100px 0 80px; position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 50px; text-align: center; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-secondary);
  background: var(--surface-glass); padding: 8px 16px; border-radius: 999px; margin-bottom: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.hero h1 { font-size: clamp(40px, 5vw, 68px); line-height: 1.1; margin-bottom: 24px; }
.hero h1 em { 
  font-style: normal; 
  background: var(--accent-gradient); 
  -webkit-background-clip: text;
  background-clip: text; 
  -webkit-text-fill-color: transparent; 
}
.hero-sub { font-size: 18px; max-width: 580px; margin-bottom: 40px; color: var(--text-muted); line-height: 1.6; }
@media (max-width: 980px) { .hero-sub { margin: 0 auto 40px; } }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
@media (max-width: 980px) { .hero-actions { justify-content: center; } }
.hero-stats { display: flex; gap: 40px; }
@media (max-width: 980px) { .hero-stats { justify-content: center; } }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 32px; font-weight: 700; color: #fff; }
.hero-stat span { font-size: 13px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }

.hero-visual { position: relative; }
.stall-stack { position: relative; height: 500px; display: flex; justify-content: center; align-items: center; }
.float-card {
  position: absolute; width: 260px; 
  background: rgba(20, 20, 25, 0.7); backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m); padding: 16px; 
  box-shadow: var(--shadow-pop), 0 0 30px rgba(0, 210, 255, 0.1);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.float-card:hover { transform: translateY(-10px) scale(1.02) !important; z-index: 10 !important; border-color: var(--accent-secondary); }
.float-card.card-a { top: 20px; left: 5%; transform: rotate(-6deg); z-index: 2; }
.float-card.card-b { top: 150px; right: 5%; transform: rotate(4deg); z-index: 3; }
.float-card.card-c { bottom: 20px; left: 15%; transform: rotate(-3deg); z-index: 1; opacity: 0.9; }
.float-card img { border-radius: var(--radius-s); height: 140px; object-fit: cover; width: 100%; margin-bottom: 12px; }
.float-card .fc-price { color: var(--text); font-size: 18px; font-weight: 700; margin-bottom: 4px; }

/* ---------------- House Rules banner ---------------- */
.rules-banner {
  background: var(--surface-glass); 
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong); 
  border-radius: var(--radius-m);
  padding: 32px; display: flex; gap: 24px; align-items: flex-start; margin: 60px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}
.rules-banner::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: var(--accent-gradient);
}
.rules-banner svg { flex-shrink: 0; color: var(--accent-secondary); margin-top: 4px; width: 28px; height: 28px; }
.rules-banner h4 { font-size: 18px; margin-bottom: 8px; color: #fff; }
.rules-banner p { font-size: 15px; margin: 0; color: var(--text-muted); }
.rules-banner ul { margin: 12px 0 0; padding-left: 20px; font-size: 14px; color: var(--text-muted); }
.rules-banner li { margin-bottom: 6px; }

/* ---------------- Section heading ---------------- */
.section { padding: 80px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 40px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { font-size: 32px; }
.section-head a { font-size: 14px; color: var(--accent-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.section-head a:hover { color: #fff; }

/* ---------------- Category chips ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 800px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-chip {
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  background: var(--surface-glass); backdrop-filter: blur(10px);
  border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 24px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.cat-chip::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(0, 210, 255, 0.1), transparent 70%);
  opacity: 0; transition: opacity 0.3s ease;
}
.cat-chip:hover { 
  border-color: var(--accent-secondary); 
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 210, 255, 0.1);
}
.cat-chip:hover::after { opacity: 1; }
.cat-chip .ci {
  width: 48px; height: 48px; border-radius: 12px; 
  background: rgba(255, 255, 255, 0.05); color: #fff;
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
  transition: all 0.3s ease;
}
.cat-chip:hover .ci {
  background: var(--accent-gradient);
  border-color: transparent;
}
.cat-chip span { font-size: 16px; font-weight: 600; position: relative; z-index: 2; }

/* ---------------- Listing card — Modern Floating Edition ---------------- */
.listing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) { .listing-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .listing-grid { grid-template-columns: 1fr; } }

.listing-card {
  position: relative; background: #14141c;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.listing-card:hover { 
  transform: translateY(-8px) scale(1.02); 
  border-color: rgba(0, 212, 255, 0.4); 
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(138, 43, 226, 0.3);
}
.lc-media { 
  position: relative; aspect-ratio: 16/11; overflow: hidden; background: #f0f0f0; 
  border-top-left-radius: 20px; border-top-right-radius: 20px; 
}
.lc-media img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); opacity: 0.95; }
.listing-card:hover .lc-media img { transform: scale(1.08); opacity: 1; }

.lc-fav {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%;
  background: #ffffff; border: none;
  display: flex; align-items: center; justify-content: center; color: #14141c; cursor: pointer;
  font-size: 15px; transition: all 0.2s ease; z-index: 5;
}
.lc-fav:hover { transform: scale(1.1); }
.lc-fav.active { color: #ff3366; }
.lc-fav.active svg { fill: #ff3366; stroke: #ff3366; }

.lc-body { padding: 16px; position: relative; flex: 1; display: flex; flex-direction: column; gap: 8px; }

.lc-title { 
  font-size: 15px; font-weight: 600; margin: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; 
  color: #ffffff; letter-spacing: -0.01em;
}

.lc-price { 
  font-size: 14px; font-weight: 600; color: #8a2be2;
  letter-spacing: -0.02em; margin-bottom: 8px;
}

.lc-user-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto;
}
.lc-user-info { display: flex; align-items: center; gap: 8px; overflow: hidden; text-decoration: none; color: inherit; }
.lc-user-info:hover .lc-username span { color: #00d4ff !important; }
.lc-user-info:hover { text-decoration: none; }
.lc-username { font-size: 13px; font-weight: normal; color: #a0a0ab; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-time { font-size: 12px; color: #a0a0ab; flex-shrink: 0; }

.seller-avatar-mini {
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(138, 43, 226, 0.2);
  font-size: 11px; font-weight: 600; color: #ffffff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; width: fit-content; }
.badge-good { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 10px rgba(16, 185, 129, 0.2); }
.badge-copper { background: rgba(0, 212, 255, 0.15); color: #00d4ff; border: 1px solid rgba(0, 212, 255, 0.3); box-shadow: 0 0 10px rgba(0, 212, 255, 0.2); }
.badge-bad { background: rgba(255, 51, 102, 0.15); color: #ff3366; border: 1px solid rgba(255, 51, 102, 0.3); }

/* ---------------- Cards / surfaces general ---------------- */
.card { 
  background: var(--surface-glass); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: var(--radius-l); 
  padding: 32px; box-shadow: var(--shadow-card);
}
.glass { background: var(--surface-glass); backdrop-filter: blur(12px); border: 1px solid var(--border); }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.field input, .field textarea, .field select {
  width: 100%; background: rgba(0,0,0,0.3); border: 1px solid var(--border-strong); border-radius: var(--radius-s);
  padding: 14px 16px; color: var(--text); font-family: var(--font-body); font-size: 15px; outline: none;
  transition: all 0.3s ease; backdrop-filter: blur(4px);
}
.field input:focus, .field textarea:focus, .field select:focus { 
  border-color: var(--accent-secondary); 
  background: rgba(0,0,0,0.5);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
}
.field textarea { resize: vertical; min-height: 120px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.help { font-size: 13px; color: var(--text-faint); margin-top: 8px; }

/* ---------------- Star Rating ---------------- */
.star-rating-select { display: inline-flex; gap: 4px; }
.star-btn {
  font-size: 24px; color: #333; cursor: pointer; transition: color 0.2s ease, transform 0.2s ease;
  user-select: none;
}
.star-btn:hover, .star-btn.active { color: #ffd700; transform: scale(1.1); }
.star-btn:hover ~ .star-btn { color: #333 !important; transform: scale(1); } /* Basic hover trick if ordered properly, but JS handles it here */

/* ---------------- Modal ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 24px;
}
.modal-backdrop.open { display: flex; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #111; background-image: radial-gradient(circle at top right, rgba(138, 43, 226, 0.15), transparent 40%);
  border: 1px solid var(--border-strong); border-radius: var(--radius-l);
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; 
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(138, 43, 226, 0.2);
  padding: 36px;
  position: relative;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.modal-close { 
  background: rgba(255,255,255,0.05); border: 1px solid var(--border); 
  border-radius: 50%; width: 32px; height: 32px; 
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); cursor: pointer; transition: all 0.2s ease;
}
.modal-close:hover { background: rgba(255,255,255,0.1); color: #fff; transform: rotate(90deg); }

/* ---------------- Toast ---------------- */
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 12px; }
.toast {
  background: rgba(20,20,25,0.9); backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong); border-left: 4px solid var(--accent-secondary);
  border-radius: var(--radius-s);
  padding: 16px 20px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-pop); min-width: 280px;
  animation: toast-in 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
}
.toast.error { border-left-color: var(--bad); }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px) scale(0.95); } to { opacity: 1; transform: none; } }

/* ---------------- Footer ---------------- */
.site-footer { border-top: 1px solid var(--border); padding: 60px 0; margin-top: 60px; background: rgba(0,0,0,0.5); backdrop-filter: blur(10px); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.foot-note { font-size: 14px; color: var(--text-faint); }

/* ---------------- Utility ---------------- */
.skeleton { 
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 37%, rgba(255,255,255,0.03) 63%); 
  background-size: 400% 100%; animation: sk 1.8s ease infinite; border-radius: var(--radius-s); 
}
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.empty-state { text-align: center; padding: 80px 20px; color: var(--text-faint); }
.empty-state svg { margin-bottom: 20px; color: var(--text-muted); width: 48px; height: 48px; }

/* ---------------- Real-Time Chat & Presence System ---------------- */
.avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.status-dot {
  position: absolute; bottom: 0; right: 0; width: 12px; height: 12px;
  border-radius: 50%; border: 2px solid rgba(20, 20, 25, 1);
  background: #6e6e7a; transition: all 0.3s ease;
}
.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}
.status-dot.offline { background: #6e6e7a; }

.chat-shell {
  display: flex; height: 600px; background: rgba(20, 20, 25, 0.5);
  backdrop-filter: blur(16px); border: 1px solid var(--border-strong);
  border-radius: var(--radius-m); overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.convo-list {
  width: 320px; border-right: 1px solid var(--border); overflow-y: auto;
  background: rgba(0, 0, 0, 0.2);
}
.convo-item {
  display: flex; gap: 14px; align-items: center; padding: 14px 18px;
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: all 0.2s ease; position: relative;
}
.convo-item:hover { background: rgba(255, 255, 255, 0.05); }
.convo-item.active {
  background: rgba(138, 43, 226, 0.12);
  border-left: 3px solid var(--accent-secondary);
}
.convo-title { font-weight: 600; font-size: 14.5px; color: var(--text); }
.convo-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.chat-pane { flex: 1; display: flex; flex-direction: column; height: 100%; max-height: 100%; min-height: 0; overflow: hidden; position: relative; background: rgba(15, 15, 20, 0.6); }
.chat-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(20, 20, 25, 0.8); backdrop-filter: blur(10px); flex-shrink: 0;
}
.chat-header-user { display: flex; align-items: center; gap: 12px; }
.typing-status { font-size: 12.5px; color: var(--accent-secondary); font-style: italic; display: flex; align-items: center; gap: 4px; }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots span { width: 4px; height: 4px; background: var(--accent-secondary); border-radius: 50%; animation: typingBlink 1.4s infinite ease-in-out; }
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBlink { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }

.chat-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg {
  max-width: 70%; padding: 12px 16px; border-radius: 16px; font-size: 14.5px; line-height: 1.5;
  position: relative; animation: fadeIn 0.2s ease;
}
.msg.mine {
  align-self: flex-end; background: var(--accent-gradient); color: #fff;
  border-bottom-right-radius: 4px; box-shadow: 0 4px 15px rgba(138, 43, 226, 0.25);
}
.msg.theirs {
  align-self: flex-start; background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border); color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-time { font-size: 10.5px; opacity: 0.7; margin-top: 4px; text-align: right; }

.chat-input {
  padding: 16px 20px; border-top: 1px solid var(--border); display: flex; gap: 12px;
  background: rgba(20, 20, 25, 0.9); backdrop-filter: blur(10px); flex-shrink: 0; margin-top: auto;
}
.chat-input input { flex: 1; background: rgba(0,0,0,0.4); border: 1px solid var(--border-strong); border-radius: 999px; padding: 12px 20px; color: #fff; font-size: 14px; }
.chat-input input:focus { border-color: var(--accent-secondary); outline: none; box-shadow: 0 0 15px rgba(0, 212, 255, 0.2); }

/* ---------------- Follow / Following Buttons ---------------- */
.btn-following {
  background: var(--accent-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3) !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}
.btn-following:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4) !important;
}

/* ---------------- Profile Layout ---------------- */
.profile-page { max-width: 900px; margin: 0 auto; padding: 48px 24px 80px; }

.profile-header {
  background: #111116; 
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px; padding: 40px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  margin-bottom: 36px; position: relative; overflow: hidden;
}

.profile-header-bg-dots {
  position: absolute; top: 40px; right: 40px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
  opacity: 0.3; pointer-events: none;
}
.profile-header-bg-dots span {
  width: 3px; height: 3px; background: #00d4ff; border-radius: 50%;
}

.profile-top { display: flex; gap: 32px; align-items: flex-start; margin-bottom: 40px; flex-wrap: wrap; position: relative; z-index: 2; }

.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
  width: 120px; height: 120px; border-radius: 50%;
  background: #1c1c24;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; font-weight: 500; color: #fff;
  border: 3px solid #8a2be2;
  box-shadow: 0 0 40px rgba(138, 43, 226, 0.4);
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { flex: 1; margin-top: 10px; }
.profile-name { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 8px; letter-spacing: -0.02em; }
.profile-username { font-size: 15px; color: #00d4ff; font-weight: 600; margin-bottom: 16px; display: inline-block; }

.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-edit-profile {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #fff; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; text-decoration: none;
}
.btn-edit-profile:hover { background: rgba(255,255,255,0.1); }

.profile-stats-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; position: relative; z-index: 2;
}
.profile-stat-item {
  display: flex; align-items: center; gap: 16px;
  border-right: 1px solid rgba(255,255,255,0.06); padding-right: 20px;
}
.profile-stat-item:last-child { border-right: none; }

.profile-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.icon-listings { background: rgba(138, 43, 226, 0.15); color: #c482ff; }
.icon-followers { background: rgba(0, 119, 255, 0.15); color: #4da6ff; }
.icon-following { background: rgba(0, 212, 255, 0.15); color: #00d4ff; }

.profile-stat-text { display: flex; flex-direction: column; gap: 2px; }
.profile-stat-num { font-size: 20px; font-weight: 700; color: #fff; }
.profile-stat-label { font-size: 11px; color: #a0a0ab; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.profile-products-section { margin-top: 4px; }
.profile-products-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.profile-products-header h3 { font-size: 17px; font-weight: 700; color: #fff; margin: 0; }
.profile-products-tab { font-size: 14px; color: #00d4ff; font-weight: 600; border-bottom: 2px solid #00d4ff; padding-bottom: 16px; }

.profile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 1024px) { .profile-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .profile-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .profile-grid { grid-template-columns: 1fr; } }
