/* =========================================================
   Rune Heaven — Core Theme
   Modern dark slate + neon gold/emerald accents
   ========================================================= */

:root {
  --bg-0: #07090d;
  --bg-1: #0c1016;
  --bg-2: #121723;
  --bg-3: #1a2133;
  --line: #242d43;
  --line-soft: rgba(255, 210, 120, 0.12);

  --ink-0: #f3f6fb;
  --ink-1: #cfd6e4;
  --ink-2: #8a95ad;
  --ink-3: #5a6784;

  --gold: #ffcc5c;
  --gold-2: #f4b731;
  --gold-glow: rgba(255, 204, 92, 0.55);
  --emerald: #34d399;
  --emerald-glow: rgba(52, 211, 153, 0.45);
  --crimson: #ef4444;
  --violet: #a78bfa;
  --sapphire: #60a5fa;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --amber: #f59e0b;
  --lime: #84cc16;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-gold: 0 0 24px rgba(255, 204, 92, 0.25);
  --shadow-smooth: 0 8px 32px rgba(0, 0, 0, 0.3);

  --ff-display: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ff-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff-body);
  color: var(--ink-0);
  background:
    radial-gradient(1300px 900px at 8% -12%, rgba(167, 139, 250, 0.26), transparent 58%),
    radial-gradient(1200px 840px at 96% -8%, rgba(34, 211, 238, 0.22), transparent 56%),
    radial-gradient(1150px 780px at 50% 112%, rgba(244, 114, 182, 0.20), transparent 58%),
    radial-gradient(980px 740px at 18% 86%, rgba(132, 204, 22, 0.14), transparent 60%),
    radial-gradient(980px 740px at 84% 78%, rgba(245, 158, 11, 0.12), transparent 62%),
    linear-gradient(160deg, #06080d 0%, #0a0f1f 36%, #0d1328 100%);
  background-size: 150% 150%, 145% 145%, 160% 160%, 135% 135%, 135% 135%, 100% 100%;
  animation: backgroundDrift 22s ease-in-out infinite alternate;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -2;
  pointer-events: none;
  opacity: 0.42;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 204, 92, 0.22) 0 1px, transparent 2px),
    radial-gradient(circle at 75% 35%, rgba(96, 165, 250, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 30% 80%, rgba(52, 211, 153, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 85% 75%, rgba(244, 114, 182, 0.2) 0 1px, transparent 2px),
    radial-gradient(circle at 52% 52%, rgba(167, 139, 250, 0.18) 0 1px, transparent 2px);
  background-size: 170px 170px, 210px 210px, 220px 220px, 250px 250px, 200px 200px;
  animation: sparkleDrift 18s linear infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: -3;
  pointer-events: none;
  background:
    conic-gradient(from 0deg at 20% 30%, rgba(96, 165, 250, 0.16), rgba(167, 139, 250, 0.12), rgba(34, 211, 238, 0.16), rgba(96, 165, 250, 0.16)),
    conic-gradient(from 120deg at 80% 70%, rgba(244, 114, 182, 0.14), rgba(255, 204, 92, 0.12), rgba(132, 204, 22, 0.14), rgba(244, 114, 182, 0.14));
  filter: blur(90px) saturate(1.08);
  opacity: 0.42;
  animation: colorWheel 24s linear infinite;
}

/* Ambient gradient background */
.bg-aurora {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(44vw 34vw at 15% 16%, rgba(167, 139, 250, 0.26), transparent 68%),
    radial-gradient(42vw 32vw at 84% 18%, rgba(34, 211, 238, 0.22), transparent 70%),
    radial-gradient(40vw 30vw at 50% 82%, rgba(244, 114, 182, 0.2), transparent 72%),
    radial-gradient(36vw 28vw at 70% 70%, rgba(132, 204, 22, 0.13), transparent 72%);
  animation: auroraHue 16s ease-in-out infinite alternate;
}
.bg-aurora::before, .bg-aurora::after {
  content: ""; position: absolute; width: 60vw; height: 60vw; border-radius: 50%;
  filter: blur(115px); opacity: 0.5;
}
.bg-aurora::before {
  top: -20%; left: -10%;
  background: radial-gradient(circle, var(--gold) 0%, rgba(245, 158, 11, 0.28) 34%, transparent 62%);
  animation: floaty 12s ease-in-out infinite, pulseGlow 6s ease-in-out infinite;
}
.bg-aurora::after {
  bottom: -20%; right: -15%;
  background: radial-gradient(circle, var(--emerald) 0%, rgba(96, 165, 250, 0.24) 35%, transparent 62%);
  animation: floaty 15s ease-in-out infinite reverse, pulseGlow 7s ease-in-out infinite reverse;
}
@keyframes floaty {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(4%, -3%) scale(1.07); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.32; }
  50% { opacity: 0.5; }
}
@keyframes auroraHue {
  0% { filter: hue-rotate(0deg) saturate(1); }
  100% { filter: hue-rotate(44deg) saturate(1.16); }
}
@keyframes backgroundDrift {
  0% { background-position: 0% 0%, 100% 0%, 50% 100%, 14% 84%, 86% 18%, 0 0; }
  100% { background-position: 26% 22%, 74% 10%, 50% 84%, 18% 82%, 82% 20%, 0 0; }
}
@keyframes sparkleDrift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(-3%, -2%, 0); }
  100% { transform: translate3d(3%, 2%, 0); }
}
@keyframes colorWheel {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.04); }
  100% { transform: rotate(360deg) scale(1); }
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--ff-display);
  letter-spacing: 0.02em;
  margin: 0 0 .4em;
  color: var(--ink-0);
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 4.8vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { color: var(--ink-1); }
a  { color: var(--gold); text-decoration: none; transition: all 0.3s ease; }
a:hover { color: #fff; filter: brightness(1.15); }

.text-gold  { color: var(--gold); }
.text-emerald { color: var(--emerald); }
.text-muted { color: var(--ink-2); }
.text-dim   { color: var(--ink-3); }
.gold-gradient {
  background: linear-gradient(135deg, #fff1c1 0%, var(--gold) 40%, #d39b2d 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Layout */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 20px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer-s { height: 12px; }
.spacer   { height: 28px; }
.spacer-l { height: 56px; }

/* Navbar */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 9, 13, 0.72);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; max-width: 1400px; margin: 0 auto; gap: 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--ff-display); font-weight: 700; font-size: 1.25rem;
  color: #fff; letter-spacing: 0.08em;
  transition: all 0.3s ease;
}
.brand:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center; font-size: 18px; color: #1a1204;
  background: linear-gradient(135deg, #fff1c1, var(--gold) 55%, #a06a10);
  box-shadow: 0 0 18px var(--gold-glow);
  transition: all 0.3s ease;
}
.brand-logo:hover {
  transform: scale(1.1) rotateY(10deg);
}
.brand-logo-img {
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 8px rgba(255, 204, 92, 0.3));
}
.brand-logo-img:hover {
  filter: drop-shadow(0 0 16px rgba(255, 204, 92, 0.6)) brightness(1.1);
}
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  color: var(--ink-1); padding: 8px 12px; border-radius: 10px;
  font-weight: 500; font-size: .95rem; transition: all .2s;
}
.nav-links a:hover { color: #fff; background: rgba(255, 204, 92, 0.07); }
.nav-links a.active { color: var(--gold); background: rgba(255, 204, 92, 0.10); }

.nav-burger {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--ink-0); padding: 8px 10px; border-radius: 10px; cursor: pointer;
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: 64px; right: 12px; left: 12px;
    background: var(--bg-2); border: 1px solid var(--line); padding: 10px;
    border-radius: 14px; box-shadow: var(--shadow-1);
  }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: .95rem;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .3s ease, background .3s, color .3s;
  text-decoration: none; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.btn:hover::before {
  opacity: 1;
}
.btn:active { transform: translateY(2px); }
.btn-primary {
  background: linear-gradient(135deg, #ffd977 0%, var(--gold) 55%, #b17a17 100%);
  color: #1a1204; box-shadow: var(--shadow-gold);
}
.btn-primary:hover { 
  filter: brightness(1.12); 
  box-shadow: 0 0 40px var(--gold-glow), var(--shadow-gold);
  transform: translateY(-2px) scale(1.03);
  color: #1a1204;
}
.btn-ghost {
  background: transparent; color: var(--ink-0); border-color: var(--line);
}
.btn-ghost:hover { 
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold); 
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 204, 92, 0.2);
}
.btn-emerald {
  background: linear-gradient(135deg, #6ee7b7, var(--emerald)); color: #042017;
  box-shadow: 0 0 18px var(--emerald-glow);
}
.btn-emerald:hover { 
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--emerald-glow);
}
.btn-danger { background: #3b1212; color: #ffb4b4; border-color: #5a1d1d; }
.btn-danger:hover { 
  background: #551717; 
  color: #fff;
  transform: translateY(-2px);
}
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }
.btn-block { display: flex; width: 100%; justify-content: center; }

/* Cards */
.card {
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color .3s ease, box-shadow .3s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 70%, rgba(255, 204, 92, 0.06));
  pointer-events: none;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: radial-gradient(circle at 0% 0%, rgba(255, 204, 92, 0) 0%, rgba(255, 204, 92, 0.03) 100%);
  pointer-events: none; opacity: 0; transition: opacity 0.3s ease;
}
.card:hover { 
  transform: translateY(-6px) scale(1.01);
  border-color: var(--line-soft);
  box-shadow: var(--shadow-smooth), var(--shadow-gold), 0 0 40px rgba(96, 165, 250, 0.12);
}
.card:hover::after {
  opacity: 1;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.card-title { font-family: var(--ff-display); font-size: 1.1rem; margin: 0; color: #fff; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; color: var(--ink-2); font-weight: 500; text-transform: capitalize; }
.input, .select, .textarea {
  background: var(--bg-1); color: var(--ink-0);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; font-size: .95rem; font-family: inherit;
  transition: border-color .3s, box-shadow .3s, background .3s, transform .2s;
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; 
  border-color: var(--gold); 
  background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(255, 204, 92, 0.14);
  transform: translateY(-2px);
}
.textarea { resize: vertical; min-height: 110px; }

.help { font-size: .82rem; color: var(--ink-3); margin-top: 4px; }
.form-error {
  background: #3b1212; color: #ffb4b4; border: 1px solid #5a1d1d;
  padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 12px;
  animation: slideDown 0.3s ease-out;
}
.form-ok {
  background: #0f2a1e; color: #a9f0c9; border: 1px solid #16523a;
  padding: 10px 12px; border-radius: 10px; font-size: .9rem; margin-bottom: 12px;
  animation: slideDown 0.3s ease-out;
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600; letter-spacing: .03em;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-1);
  transition: all 0.3s ease;
  animation: scaleIn 0.4s ease-out;
}
.badge:hover {
  transform: scale(1.05);
}
.badge i { font-size: .8rem; }
.badge-bronze  { background: linear-gradient(135deg, #7a4a1f, #b07336); color: #fff2d8; border-color: #b07336; }
.badge-silver  { background: linear-gradient(135deg, #8a93a8, #cfd6e4); color: #111622; border-color: #cfd6e4; }
.badge-gold    { background: linear-gradient(135deg, #b17a17, var(--gold)); color: #1a1204; border-color: var(--gold); box-shadow: 0 0 12px var(--gold-glow); }
.badge-gold:hover { box-shadow: 0 0 20px var(--gold-glow); }
.badge-dragon  { background: linear-gradient(135deg, #7b1111, #ef4444); color: #fff; border-color: #ef4444; box-shadow: 0 0 12px rgba(239, 68, 68, 0.35); }
.badge-dragon:hover { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
.badge-rune    { background: linear-gradient(135deg, #1e4b7a, #60a5fa); color: #fff; border-color: #60a5fa; box-shadow: 0 0 14px rgba(96, 165, 250, 0.4); }
.badge-rune:hover { box-shadow: 0 0 22px rgba(96, 165, 250, 0.6); }
.badge-verified{ background: rgba(52, 211, 153, 0.14); color: #a9f0c9; border-color: rgba(52, 211, 153, 0.4); }
.badge-admin   { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; border-color: #a78bfa; }
.badge-cat     { background: rgba(96, 165, 250, 0.12); color: #bcd7ff; border-color: rgba(96, 165, 250, 0.35); }

/* Listing cards */
.listing-card { 
  cursor: pointer;
  animation: fadeUp 0.6s ease-out forwards;
  opacity: 0;
}
.listing-card:nth-child(1) { animation-delay: 0.05s; }
.listing-card:nth-child(2) { animation-delay: 0.1s; }
.listing-card:nth-child(3) { animation-delay: 0.15s; }
.listing-card:nth-child(4) { animation-delay: 0.2s; }
.listing-card:nth-child(5) { animation-delay: 0.25s; }
.listing-card:nth-child(6) { animation-delay: 0.3s; }
.listing-card .title {
  font-size: 1.08rem; font-weight: 700; color: #fff;
  margin-bottom: 6px; line-height: 1.3;
  transition: color 0.3s ease;
}
.listing-card:hover .title {
  color: var(--gold);
}
.listing-card .price {
  font-family: var(--ff-display); font-size: 1.35rem; color: var(--gold);
  text-shadow: 0 0 10px var(--gold-glow);
  font-weight: 700;
}
.listing-card .desc {
  color: var(--ink-2); font-size: .9rem; margin: 8px 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.listing-card .meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 10px; border-top: 1px solid var(--line); margin-top: 12px;
  font-size: .85rem; color: var(--ink-2);
}

/* Stars */
.stars { display: inline-flex; gap: 2px; color: var(--gold); font-size: .95rem; }
.stars .off { color: var(--ink-3); }

/* Chat */
.chat-shell {
  display: grid; grid-template-columns: 300px 1fr;
  height: calc(100vh - 80px); border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; background: var(--bg-1);
}
.chat-sidebar { border-right: 1px solid var(--line); overflow-y: auto; }
.conv-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s;
}
.conv-item:hover { background: rgba(255, 204, 92, 0.05); }
.conv-item.active { background: rgba(255, 204, 92, 0.10); border-left: 3px solid var(--gold); }
.conv-item .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #b17a17);
  display: grid; place-items: center; color: #1a1204; font-weight: 700; flex-shrink: 0;
}
.conv-item .info { flex: 1; overflow: hidden; }
.conv-item .info .name { font-weight: 600; color: #fff; font-size: .92rem; }
.conv-item .info .last {
  color: var(--ink-2); font-size: .8rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}

.chat-main { display: flex; flex-direction: column; background: var(--bg-0); }
.chat-header {
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; background: var(--bg-2);
}
.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg {
  max-width: 68%; padding: 10px 14px; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  animation: popIn .25s ease-out;
}
.msg.me { align-self: flex-end; background: linear-gradient(135deg, #3d2c0a, #5a3f0e); border-color: #7a561c; color: #ffeec7; }
.msg .text { font-size: .95rem; white-space: pre-wrap; word-wrap: break-word; }
.msg .time { font-size: .72rem; color: var(--ink-3); margin-top: 3px; }
.chat-input-bar {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--bg-2);
}
.chat-input-bar .input { flex: 1; }

@media (max-width: 800px) {
  .chat-shell { grid-template-columns: 1fr; height: calc(100vh - 72px); }
  .chat-sidebar { display: none; }
  .chat-sidebar.mobile-open { display: block; }
  .chat-main.mobile-hide { display: none; }
}

/* Hero */
.hero {
  padding: 80px 0 60px; text-align: center; position: relative;
}
.hero .eyebrow {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  background: rgba(255, 204, 92, 0.08); color: var(--gold);
  border: 1px solid var(--line-soft); font-size: .85rem; margin-bottom: 18px;
  letter-spacing: .12em; text-transform: uppercase;
}
.hero h1 { margin: 0 auto 18px; max-width: 900px; }
.hero p.lead { font-size: 1.1rem; max-width: 640px; margin: 0 auto 28px; color: var(--ink-1); }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Stats / feature rows */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin: 20px 0 60px;
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  padding: 20px; border-radius: 14px; background: var(--bg-2);
  border: 1px solid var(--line); text-align: center;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(255, 204, 92, 0.05), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.stat:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--gold);
  box-shadow: 0 0 30px rgba(255, 204, 92, 0.15);
}
.stat:hover::before {
  opacity: 1;
}
.stat .num { 
  font-family: var(--ff-display); 
  font-size: 1.8rem; 
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.05em;
}
.stat .lab { 
  color: var(--ink-2); 
  font-size: .85rem; 
  margin-top: 4px;
  font-weight: 500;
}

/* Feature grid */
.feature {
  padding: 24px; border-radius: 14px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line); transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative; overflow: hidden;
}
.feature::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 204, 92, 0.1), transparent);
  opacity: 0; transition: opacity 0.3s ease;
}
.feature:hover { 
  transform: translateY(-8px) scale(1.02);
  border-color: var(--gold);
  box-shadow: var(--shadow-smooth), 0 0 30px rgba(255, 204, 92, 0.15);
}
.feature:hover::before {
  opacity: 1;
}
.feature .icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(255, 204, 92, 0.1); color: var(--gold);
  display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 14px;
  border: 1px solid var(--line-soft);
  transition: all 0.3s ease;
}
.feature:hover .icon {
  background: rgba(255, 204, 92, 0.2);
  transform: scale(1.15) rotateZ(10deg);
  box-shadow: 0 0 20px rgba(255, 204, 92, 0.3);
}

/* Alerts / Toasts */
.toast-wrap {
  position: fixed; top: 16px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: 340px;
}
.toast {
  background: var(--bg-3); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  padding: 12px 14px; border-radius: 10px; color: var(--ink-0); font-size: .9rem;
  box-shadow: var(--shadow-1); animation: slideIn .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.3s ease;
}
.toast:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-smooth);
}
.toast.ok  { border-left-color: var(--emerald); }
.toast.err { border-left-color: var(--crimson); }

/* Utilities */
.divider { height: 1px; background: var(--line); margin: 30px 0; }
.hidden { display: none !important; }
.center { text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: .78rem;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--ink-1);
}
.kbd {
  display: inline-block; font-family: ui-monospace, monospace;
  padding: 2px 7px; border-radius: 6px; background: var(--bg-3);
  border: 1px solid var(--line); font-size: .82rem; color: var(--ink-1);
}

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.rh-table { width: 100%; border-collapse: collapse; background: var(--bg-1); }
table.rh-table th, table.rh-table td {
  padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line);
  font-size: .9rem; color: var(--ink-1);
}
table.rh-table th { background: var(--bg-2); color: var(--ink-0); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
table.rh-table tr:last-child td { border-bottom: none; }
table.rh-table tr:hover td { background: rgba(255, 204, 92, 0.03); }

/* Footer */
.footer {
  margin-top: 80px; padding: 40px 0 30px;
  border-top: 1px solid var(--line); background: var(--bg-1);
  animation: slideUp 0.6s ease-out;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer a { 
  color: var(--ink-2); 
  display: block; 
  padding: 4px 0; 
  font-size: .9rem;
  transition: all 0.3s ease;
}
.footer a:hover { 
  color: var(--gold);
  transform: translateX(4px);
}
.footer h4 { 
  color: #fff; 
  font-family: var(--ff-body); 
  font-size: .9rem; 
  text-transform: uppercase; 
  letter-spacing: .08em; 
  margin-bottom: 14px;
  font-weight: 700;
  transition: color 0.3s ease;
}
.footer h4:hover {
  color: var(--gold);
}
.footer-bottom {
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  color: var(--ink-3); font-size: .82rem;
}

/* Empty state */
.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-2);
}
.empty i { font-size: 2.5rem; color: var(--gold); margin-bottom: 14px; display: block; opacity: .6; }

/* Animations */
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes popIn   { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeUp  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shine   { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes glow-pulse { 0% { box-shadow: 0 0 10px rgba(255, 204, 92, 0.3); } 50% { box-shadow: 0 0 30px rgba(255, 204, 92, 0.6); } 100% { box-shadow: 0 0 10px rgba(255, 204, 92, 0.3); } }
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }
@keyframes rotateGlow { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  .bg-aurora,
  .bg-aurora::before,
  .bg-aurora::after,
  .reveal,
  .card,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}

.shine {
  background: linear-gradient(90deg, transparent, rgba(255, 204, 92, 0.25), transparent);
  background-size: 200% 100%; animation: shine 2.5s linear infinite;
}

.glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

.rotate-glow {
  animation: rotateGlow 8s linear infinite;
}

/* Loading */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--line); border-top-color: var(--gold);
  border-radius: 50%; animation: spin .8s linear infinite;
}
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; gap: 14px; color: var(--ink-2);
}

/* Generic avatars */
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #b17a17);
  display: grid;
  place-items: center;
  color: #1a1204;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img,
.avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Profile Avatar */
.avatar-lg {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, #b17a17 100%);
  display: grid; place-items: center;
  color: #1a1204;
  font-weight: 700;
  font-size: 2.2rem;
  box-shadow: 0 0 30px rgba(255, 204, 92, 0.3);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.avatar-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-lg:hover {
  transform: scale(1.05);
  box-shadow: 0 0 40px rgba(255, 204, 92, 0.5);
}
.avatar-lg.profile-edit {
  cursor: pointer;
}
.avatar-lg .edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
}
.avatar-lg:hover .edit-overlay {
  opacity: 1;
}

/* Image Upload */
.image-upload-section {
  background: var(--bg-2);
  padding: 24px;
  border-radius: 14px;
  border: 1px solid var(--line);
  margin: 20px 0;
}
.image-upload-label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--ink-0);
}
.upload-input {
  display: none;
}
.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ffd977 0%, var(--gold) 55%, #b17a17 100%);
  color: #1a1204;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-gold);
}
.upload-button:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--gold-glow), var(--shadow-gold);
}

.profile-image-preview {
  margin-top: 16px;
  border-radius: 12px;
  overflow: hidden;
  max-width: 200px;
  border: 2px solid var(--line);
}
.profile-image-preview img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* =========================================================
   ADVANCED FEATURES CSS
   Image uploads, Escrow, Analytics, Search, 2FA, etc.
   ========================================================= */

/* Upload Zones */
.upload-zone {
  border: 2px dashed var(--line-soft);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .3s;
  background: var(--bg-2);
}
.upload-zone:hover {
  border-color: var(--gold);
  background: rgba(255, 204, 92, 0.05);
}
.upload-zone.dragover {
  border-color: var(--emerald);
  background: rgba(52, 211, 153, 0.05);
  transform: scale(1.02);
}
.upload-zone-content i {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 12px;
  display: block;
  opacity: 0.8;
}
.upload-zone-content p {
  color: var(--ink-1);
  margin: 12px 0;
}
.upload-zone-content a {
  color: var(--emerald);
  text-decoration: none;
  font-weight: 600;
}
.upload-zone-content a:hover {
  text-decoration: underline;
}
.upload-zone-content small {
  color: var(--ink-3);
  display: block;
  margin-top: 10px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-2);
  aspect-ratio: 1;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}
.gallery-item-overlay button {
  background: var(--gold);
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  color: #1a1204;
  font-weight: 600;
}

/* Search Filters */
.search-filters {
  background: var(--bg-2);
  padding: 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  border: 1px solid var(--line);
}
.filter-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--ink-1);
  font-size: 0.9rem;
}
.filter-group input,
.filter-group select {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-0);
  font-family: var(--ff-body);
}
.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}
.filter-group .checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.filter-group input[type="checkbox"] {
  width: auto;
}

/* Escrow Transaction UI */
.transaction-details {
  background: var(--bg-2);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.detail-row:last-child {
  border-bottom: none;
}
.detail-row .label {
  color: var(--ink-2);
  font-weight: 600;
}
.detail-row code {
  background: var(--bg-1);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--emerald);
}

/* Analytics Dashboard */
.analytics-dashboard {
  padding: 20px;
}
.analytics-dashboard h2,
.analytics-dashboard h3 {
  color: var(--gold);
  margin: 20px 0 15px;
  font-family: var(--ff-display);
}
.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.metric-card {
  background: linear-gradient(135deg, rgba(255, 204, 92, 0.1), rgba(52, 211, 153, 0.1));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.metric-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold);
  font-family: var(--ff-display);
  text-shadow: 0 0 10px var(--gold-glow);
}
.metric-label {
  color: var(--ink-2);
  font-size: 0.85rem;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.analytics-table {
  overflow-x: auto;
  margin: 20px 0;
}
.analytics-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.analytics-table thead {
  background: var(--bg-1);
  border-bottom: 2px solid var(--line);
}
.analytics-table th,
.analytics-table td {
  padding: 12px 16px;
  text-align: left;
}
.analytics-table th {
  color: var(--gold);
  font-weight: 600;
  font-size: 0.9rem;
}
.analytics-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background .2s;
}
.analytics-table tbody tr:hover {
  background: rgba(255, 204, 92, 0.03);
}

/* 2FA / TOTP Setup */
.setup-step {
  margin: 20px 0;
  padding: 16px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--gold);
}
.setup-step h3 {
  margin-top: 0;
  color: var(--gold);
}
.setup-step ul {
  margin: 10px 0;
}
.setup-step li {
  margin: 6px 0;
  color: var(--ink-1);
}
#qr-code {
  background: white;
  padding: 16px;
  border-radius: var(--radius-sm);
  display: inline-block;
}
#qr-code img {
  border-radius: 4px;
}
#verification-code {
  border: 2px solid var(--line);
  background: var(--bg-1);
  color: var(--gold);
  font-weight: 600;
}
#verification-code:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
}
#backup-codes-list {
  margin: 10px 0;
  color: var(--ink-1);
  word-break: break-all;
}

/* Notification Settings */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-2);
  border-radius: var(--radius-sm);
  margin: 8px 0;
  cursor: pointer;
  transition: background .2s;
}
.checkbox-label:hover {
  background: rgba(255, 204, 92, 0.1);
}
.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--gold);
}
.checkbox-label label {
  margin: 0;
  cursor: pointer;
  color: var(--ink-0);
}

/* Favorites / Watchlist */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.favorite-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  position: relative;
  transition: all .3s;
}
.favorite-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}
.favorite-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--crimson);
  font-size: 1.3rem;
  cursor: pointer;
}

/* Read Receipts in Chat */
.msg-read-receipt {
  font-size: 0.8rem;
  color: var(--emerald);
  margin-top: 4px;
}
.msg .read-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  background: rgba(52, 211, 153, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--emerald);
}

/* Accessibility */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
body.high-contrast {
  --bg-0: #000;
  --ink-0: #fff;
  --line: #fff;
  --gold: #ffff00;
}

/* Keyboard Navigation */
body.keyboard-focus-mode .btn:focus-visible,
body.keyboard-focus-mode .link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

/* Form Accessibility */
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--ink-1);
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-0);
  font-family: var(--ff-body);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--ink-3);
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.75);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  animation: fadeUp .2s ease;
}
.modal {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px; width: 100%; max-width: 520px; box-shadow: var(--shadow-1);
  animation: popIn .25s ease;
  position: relative;
}
.modal h3 { margin-top: 0; }
.modal-close {
  position: absolute; top: 14px; right: 14px; background: none; border: none;
  color: var(--ink-2); font-size: 1.4rem; cursor: pointer;
}

/* Misc */
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.section-title {
  font-family: var(--ff-display); font-size: 1.8rem; text-align: center;
  margin-bottom: 10px;
}
.section-sub {
  color: var(--ink-2); text-align: center; margin-bottom: 40px;
}
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 14px; border-radius: 14px; margin-bottom: 24px;
}
.filter-bar .input, .filter-bar .select { flex: 1; min-width: 140px; }

/* Rating input */
.rating-input { display: inline-flex; gap: 4px; font-size: 1.6rem; }
.rating-input i { cursor: pointer; color: var(--ink-3); transition: color .15s, transform .15s; }
.rating-input i:hover { transform: scale(1.15); }
.rating-input i.active { color: var(--gold); text-shadow: 0 0 8px var(--gold-glow); }
