/* Line 1: Font import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap");

/* Line 2: Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

.welcome-page { background: #071a14; color: #edf8f1; min-height: 100vh; font-family: 'Poppins', sans-serif; }
.welcome-header { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:1rem clamp(1rem,4vw,4rem); background:#0b2b20; border-bottom:1px solid rgba(232,191,90,.35); position:sticky; top:0; z-index:2; }
.welcome-brand { display:flex; align-items:center; gap:.7rem; color:#f4d78a; text-decoration:none; font-size:1.2rem; font-weight:700; }
.welcome-brand img { width:42px; height:42px; object-fit:cover; border-radius:50%; }
.welcome-actions { display:flex; gap:.6rem; }
.welcome-action { color:#08150f; background:#f4d78a; padding:.65rem 1rem; text-decoration:none; font-weight:700; font-size:.82rem; letter-spacing:.08em; }
.welcome-action:hover { background:#fff0b4; }
.welcome-banners { width:100%; }
.welcome-banner { width:100%; position:relative; background:#04110c; overflow:hidden; }
.welcome-banner img, .welcome-banner video { display:block; width:100%; height:auto; max-height:78vh; object-fit:contain; }
.welcome-caption { position:absolute; left:0; right:0; bottom:0; padding:1rem clamp(1rem,4vw,4rem); color:#fff; background:linear-gradient(transparent,rgba(0,0,0,.8)); font-size:clamp(.9rem,2vw,1.3rem); }
.welcome-empty { min-height:45vh; display:grid; place-items:center; color:#a8c8b6; font-size:1.1rem; }
.welcome-footer { max-width:none; padding-left:clamp(1rem,4vw,4rem); padding-right:clamp(1rem,4vw,4rem); }

/* Line 3: AUTH pages – full-bleed reference background, scrollable on small screens */
body.auth {
  font-family: Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,211,106,.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(99,255,193,.14), transparent 26%),
    linear-gradient(140deg, rgba(20,60,45,.62) 0%, rgba(8,22,18,.92) 100%),
    url("images/theme-auth-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-y: auto;
  position: relative;
}

/* Line 5: DASHBOARD only – animated crypto background */
body.dashboard {
  font-family: 'Poppins', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255,211,106,.18), transparent 24%),
    radial-gradient(circle at bottom right, rgba(97,255,194,.14), transparent 26%),
    linear-gradient(135deg, #143c2d 0%, #1f5c40 45%, #2e7a57 100%);
  color: #eaf5ee;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
body.dashboard::before {
  content: "₿ Ξ € £ ¥";
  position: fixed;
  inset: -10%;
  font-size: clamp(3rem, 6vw, 6rem);
  color: rgba(232,191,90,.06);
  z-index: -1;
  animation: float 40s linear infinite;
  pointer-events: none;
}
body.dashboard::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,211,106,.18), transparent 24%),
    radial-gradient(circle at 80% 0%, rgba(97,255,194,.14), transparent 28%);
  z-index: -2;
  pointer-events: none;
  animation: driftGlow 12s ease-in-out infinite alternate;
}

/* Line 17: Center auth forms (auth pages only — was leaking onto every page) */
body.auth .container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* Line 18: Auth form box — frosted gold-glass card, matching the reference sign-in panel */
.form-box {
  background: linear-gradient(165deg, rgba(12,36,28,.94) 0%, rgba(8,24,20,.97) 100%);
  backdrop-filter: blur(12px);
  padding: 44px 40px 36px;
  border-radius: 18px;
  border: 1px solid rgba(232,191,90,.42);
  box-shadow: 0 24px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(232,191,90,.08) inset;
  width: 380px;
  max-width: 100%;
  text-align: center;
  position: relative;
}
.auth-logo-wrap {
  display: flex;
  justify-content: center;
  margin: -76px auto 14px;
}
.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(232,191,90,.35);
  box-shadow: 0 8px 24px rgba(232,191,90,.35);
  background: rgba(255,255,255,.08);
}
/* Line 20-21: Titles */
.form-box h1 { color: #e8bf5a; margin-bottom: 6px; font-size: 26px; font-family: 'Poppins', sans-serif; font-weight: 700; }
.form-box h2 { color: #9db8a9; margin-bottom: 22px; font-size: 15px; font-weight: 400; }

/* Line 22: Inputs */
.form-box input, .form-box select {
  width: 100%;
  padding: 12px 14px;
  margin: 8px 0;
  background: rgba(7,26,20,.7);
  border: 1px solid #234a3a;
  border-radius: 8px;
  color: #eaf5ee;
}
.form-box input:focus, .form-box select:focus { outline: none; border-color: #e8bf5a; }
/* Line 23: Button — gold gradient like the reference "Sign In" button */
.form-box button {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #f4d78a, #e8bf5a 45%, #b8892c);
  color: #1a1200;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
  box-shadow: 0 6px 18px rgba(232,191,90,.3);
}
/* Line 24: Links + message */
.form-box a { color: #e8bf5a; text-decoration: none; }
#message { margin-top: 15px; font-weight: bold; min-height: 24px; }

/* Line 25: Dashboard layout */
.dashboard-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}
/* Line 26: Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid #234a3a;
  margin-bottom: 30px;
}
/* Line 27: Logo + logout */
.logo { font-size: 24px; font-weight: 700; color: #e8bf5a; }
.logout-btn {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid #e8bf5a;
  color: #e8bf5a;
  border-radius: 4px;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
/* Line 28: Small header stat cards (replace the old bigger duplicate boxes) */
.stat-card-sm, .stat-card {
  background: linear-gradient(135deg, rgba(18,49,39,.96), rgba(11,29,24,.94));
  padding: .6rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(232,191,90,.28);
  min-width: 130px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
}

.card, .form-box, .notif-dropdown, .promo-banner {
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
}

button:hover, .btn:hover, .logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

.card, .quick-action-card, .promo-banner, .focus-strip {
  opacity: 1;
  transform: none;
}

.card, .quick-action-card, .promo-banner, .btn, .gallery-nav, .notif-item, .site-footer a {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover, .quick-action-card:hover, .promo-banner:hover, .notif-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
}
.btn:active, .quick-action-card:active, .gallery-nav:active {
  transform: translateY(0) scale(.98);
}
.stat-card-sm {
  animation: softFloat 4s ease-in-out infinite;
}
.stat-card-sm:nth-child(2) {
  animation-delay: 1.2s;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.quick-action-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(25,58,45,.95), rgba(17,38,30,.95));
  border: 1px solid rgba(232,191,90,.24);
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0,0,0,.16);
  transition: transform .2s ease, box-shadow .2s ease;
}
.quick-action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.quick-action-icon { font-size: 1.1rem; }
.quick-action-text { font-weight: 700; }

.live-pulse-card {
  overflow: hidden;
}
.live-pulse-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.live-dot {
  font-size: .78rem;
  color: #3ddc97;
  border: 1px solid rgba(61,220,151,.3);
  background: rgba(61,220,151,.12);
  padding: .3rem .55rem;
  border-radius: 999px;
}
.live-pulse-list { display: grid; gap: .55rem; }
.live-pulse-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem .75rem;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.live-pulse-symbol { font-weight: 700; color: var(--accent); }
.live-pulse-change.up { color: #3ddc97; }
.live-pulse-change.down { color: #ff5d5d; }

@media (max-width: 700px) {
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Hero section — top layer of the dashboard, background image supplied by admin */
.hero {
  background-image: url("/images/bitcoin-background-rescaled.jpg");
  background-size: cover;
  background-position: center;
  width: 100%;
  min-height: 260px;
  position: relative;
  overflow: hidden;
}
.hero-overlay {
  position: relative;
  background: linear-gradient(180deg, rgba(10,25,47,.55) 0%, rgba(10,25,47,.9) 100%);
  min-height: 260px;
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1rem;
  overflow: hidden;
}
.hero-glow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: .8;
  animation: floatOrb 8s ease-in-out infinite;
}
.orb-a {
  width: 220px; height: 220px;
  background: rgba(232,191,90,.18);
  top: -3.5rem; right: -2rem;
}
.orb-b {
  width: 170px; height: 170px;
  background: rgba(97,255,194,.16);
  bottom: -1rem; left: 8%;
  animation-delay: 1.8s;
}
.orb-c {
  width: 120px; height: 120px;
  background: rgba(255,255,255,.12);
  top: 30%; left: 55%;
  animation-delay: 3.2s;
}
.hero-top, .hero-intro, .header-cards {
  position: relative;
  z-index: 1;
}
.header-cards {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: .5rem;
}
.header-cards .stat-card-sm {
  min-width: 180px;
  padding: .8rem 1rem;
  border: 1px solid rgba(232,191,90,.34);
  background: linear-gradient(135deg, rgba(20,48,39,.96), rgba(11,30,24,.94));
}
.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.hero-brand-row {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.hero-brand-copy, .market-brand { display: flex; align-items: center; gap: .65rem; }
.hero-brand-copy { flex-direction: column; align-items: flex-start; gap: .05rem; }
.hero-brand-copy strong { color: #fff; font-size: .95rem; }
.eyebrow { color: var(--muted); font-size: .62rem; font-weight: 700; letter-spacing: .16em; }
.market-brand .site-logo-sm { width: 40px; height: 40px; object-fit: cover; }
.site-nav {
  display: flex;
  align-items: center;
  gap: .3rem;
  position: relative;
  z-index: 2;
  margin: .85rem 0 1rem;
  padding: .35rem;
  overflow-x: auto;
  background: rgba(5,20,15,.48);
  border: 1px solid rgba(232,191,90,.18);
  border-radius: 10px;
  scrollbar-width: thin;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  padding: .55rem .8rem;
  border-radius: 7px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.site-nav a:hover, .site-nav a:focus, .site-nav a.active { color: #111b13; background: var(--accent); }
.site-nav a:hover { transform: translateY(-1px); }
.member-page-header { margin-bottom: .4rem; padding: .65rem 0; }
.page-nav { margin-top: 0; }
.site-logo-sm { height: 40px; width: auto; border-radius: 6px; }
.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(232,191,90,.24);
  color: #f4d78a;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.hero-live-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 999px;
  background: #3ddc97;
  box-shadow: 0 0 8px rgba(61,220,151,.8);
  animation: pulseDot 1.4s ease-in-out infinite;
}
.hero-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.hero-actions-right { margin-left: auto; }
.hero-intro { display: grid; gap: .25rem; }
.hero-title { font-size: 1.6rem; font-weight: 700; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.hero-subtitle { color: rgba(234,245,238,.84); font-size: .95rem; max-width: 560px; }
@media (max-width: 500px) { .hero-title { font-size: 1.25rem; } }

/* Notification bell + dropdown */
.bell-btn { position: relative; font-size: 1.1rem; padding: .5rem .7rem; }
.notif-badge {
  position: absolute; top: -6px; right: -6px;
  background: #ff5d5d; color: #fff; font-size: .7rem; font-weight: 700;
  border-radius: 999px; min-width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.notif-dropdown {
  position: fixed; top: 4rem; right: 1rem; z-index: 60;
  width: min(360px, calc(100vw - 2rem));
  max-height: 70vh; overflow-y: auto;
  background: #0e261e; border: 1px solid #234a3a; border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.notif-dropdown-head {
  padding: .75rem 1rem; font-weight: 700; color: #e8bf5a;
  border-bottom: 1px solid #234a3a;
}
.notif-item { padding: .65rem 1rem; border-bottom: 1px solid #234a3a; font-size: .88rem; }
.notif-item:last-child { border-bottom: none; }

/* Positions box + price chart */

/* Flashier promotions banner */
.promo-banner {
  background: linear-gradient(120deg, #1d3b5f 0%, #2a1d4a 50%, #1d3b5f 100%);
  background-size: 200% 200%;
  animation: promo-shimmer 6s ease infinite;
  padding: 1.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e8bf5a;
  text-align: center;
  margin: 1rem 0;
  box-shadow: 0 0 30px rgba(100,255,218,.15);
}
.promo-banner h2 {
  color: #e8bf5a; font-size: 1.3rem; margin-bottom: .5rem;
  text-shadow: 0 0 12px rgba(100,255,218,.5);
}
.promo-media-img { max-width: 100%; border-radius: 8px; margin: .75rem 0; }
@keyframes promo-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes softFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(8px, -10px, 0) scale(1.04); }
}
@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: .7; }
}
@keyframes revealIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes driftGlow {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(10px, -8px, 0); }
}

/* Buttons flash red briefly on click for visible feedback */
.btn-flash-red {
  background: #ff5d5d !important;
  color: #fff !important;
  border-color: #ff5d5d !important;
  transition: background .15s ease;
}

/* Featured insight + focus strip */
.featured-insight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, rgba(31,70,54,.96), rgba(17,39,31,.96));
  border: 1px solid rgba(232,191,90,.24);
}
.featured-insight-copy h3 {
  color: #f4d78a;
  margin: .2rem 0 .25rem;
  font-size: 1rem;
}
.featured-insight-copy p {
  color: var(--muted);
  margin: 0;
  font-size: .9rem;
}
.featured-insight-badge {
  padding: .6rem .8rem;
  border-radius: 999px;
  background: rgba(232,191,90,.16);
  color: #f4d78a;
  font-weight: 700;
  border: 1px solid rgba(232,191,90,.24);
}
.focus-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  padding: .95rem 1rem;
  margin-bottom: .25rem;
}
.focus-strip-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.focus-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}
.focus-pill {
  align-items: flex-start;
  padding: .55rem .7rem;
  border-radius: 999px;
  border: 1px solid rgba(232,191,90,.22);
  background: rgba(232,191,90,.12);
}
@media (max-width: 700px) {
  .focus-strip { grid-template-columns: 1fr; }
}

/* Footer */
.site-footer {
  max-width: 1200px; margin: 2rem auto 0; padding: 1.5rem 1rem 2rem;
  border-top: 1px solid #234a3a; text-align: center;
}
.footer-card {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(232,191,90,.2);
  border-radius: 16px;
  background: rgba(8,24,20,.7);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  margin-bottom: 1rem;
}
.footer-pill-row {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .55rem;
}
.footer-pill {
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(232,191,90,.2);
  background: rgba(232,191,90,.12);
  color: #f4d78a;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}
.footer-lines { color: #9db8a9; font-size: .85rem; line-height: 1.6; }
.footer-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-logo { height: 32px; width: auto; opacity: .85; }
.footer-social { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: center; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #f4d78a;
  text-decoration: none;
}
.footer-social a:hover {
  transform: translateY(-2px) scale(1.04);
  background: rgba(232,191,90,.18);
}

/* Line 34: Chart box (legacy, kept for compatibility) */
.chart-container {
  background: #0e261e;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #234a3a;
  height: 400px;
} 

:root{
  --bg:#123b2b; --card:linear-gradient(135deg, rgba(25,58,45,.95) 0%, rgba(17,38,30,.95) 100%); --border:rgba(255,220,140,.4); --text:#f5f8f5;
  --muted:#b8d7c2; --accent:#ffd36a; --gold:rgba(255,211,106,0.16); --red:#ff6d6d;
  --pos:#3ddc97; --neg:#ff5d5d;
}
*{box-sizing:border-box}
body{font-family:"Inter",sans-serif;background:linear-gradient(135deg, #123b2b 0%, #1b5a41 45%, #2f7a57 100%);color:var(--text);margin:0;padding:1rem;position:relative;overflow-x:hidden} /* 1rem on mobile */

/* Marketplace / Transact / Home dashboard: the same emerald hex-network
   wallpaper used across the reference design, fixed behind translucent cards */
body.dashboard, body:not(.dashboard):not(.auth) {
  background-image:
    radial-gradient(circle at top left, rgba(255,211,106,.12), transparent 24%),
    linear-gradient(135deg, rgba(18,59,43,.72) 0%, rgba(22,84,60,.76) 45%, rgba(43,114,82,.8) 100%),
    url("/images/bitcoin-background-rescaled.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
body::before{content:"";position:fixed;inset:0;background:radial-gradient(circle at top right, rgba(255,211,106,.16), transparent 24%),radial-gradient(circle at bottom left, rgba(82,255,186,.16), transparent 24%);z-index:-2;pointer-events:none}
@media(min-width:768px){body{padding:1.5rem}} /* desktop bigger */

@keyframes float{0%{transform:translate(0,0) rotate(-25deg)}100%{transform:translate(-50%,-50%) rotate(-25deg)}}
.container{max-width:1200px;margin:0 auto;z-index:1;position:relative}

header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.5rem;gap:.8rem;flex-wrap:wrap} /* wrap for mobile */
.logo{font-size:1.3rem;font-weight:700;color:var(--accent);font-family:"Poppins",sans-serif;letter-spacing:.02em}
@media(min-width:768px){.logo{font-size:1.4rem}}

.hero-glow-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(14px);
  opacity: .8;
  animation: floatOrb 8s ease-in-out infinite;
}
.orb-a { width: 220px; height: 220px; background: rgba(232,191,90,.18); top: -3.5rem; right: -2rem; }
.orb-b { width: 170px; height: 170px; background: rgba(97,255,194,.16); bottom: -1rem; left: 8%; animation-delay: 1.8s; }
.orb-c { width: 120px; height: 120px; background: rgba(255,255,255,.12); top: 30%; left: 55%; animation-delay: 3.2s; }
.hero-intro { position: relative; z-index: 1; display: grid; gap: .2rem; }
.hero-title { font-size: 1.45rem; font-weight: 700; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.5); margin: 0; }
.hero-subtitle { color: rgba(234,245,238,.84); font-size: .95rem; max-width: 560px; margin: 0; }
.marketplace-header, .transact-hero-top { position: relative; z-index: 1; }
.marketplace-header { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.transact-hero { position: relative; overflow: hidden; padding: 1.2rem 1.2rem 1rem; border-radius: 16px; background: linear-gradient(135deg, rgba(16,46,36,.9), rgba(10,26,22,.95)); border: 1px solid rgba(255,220,140,.24); box-shadow: 0 12px 30px rgba(0,0,0,.16); margin-bottom: 1rem; }
.transact-hero-top { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; }
.marketplace-hero-overlay, .transact-hero { position: relative; overflow: hidden; }

.card, .quick-action-card, .promo-banner, .btn, .gallery-nav, .notif-item, .site-footer a {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover, .quick-action-card:hover, .promo-banner:hover, .notif-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
}
.btn:active, .quick-action-card:active, .gallery-nav:active {
  transform: translateY(0) scale(.98);
}

@keyframes floatOrb {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(8px,-10px,0) scale(1.04); }
}

.btn{background:var(--card);color:var(--accent);border:1px solid var(--border);padding:.7rem 1.1rem; /* bigger touch */border-radius:8px;cursor:pointer;text-decoration:none;font-weight:600;transition:.2s;font-size:1rem;min-height:44px} /*44px = mobile tap */
.btn:hover{border-color:var(--accent)}
.btn.red{background:var(--red);color:#fff;border-color:var(--red)}

.card{background:var(--site-card-bg,var(--card));color:var(--site-card-text,inherit);border:1px solid var(--border);border-radius:12px;padding:1rem;backdrop-filter:blur(8px);box-shadow:0 8px 24px rgba(0,0,0,.18)}
.acc-card{padding:.6rem .9rem;min-width:120px} /* don't shrink too much */
.label{font-size:.75rem;color:var(--muted);text-transform:uppercase;letter-spacing:1px}
.value{font-size:1.5rem;font-weight:700;color:var(--accent)} /* smaller on mobile */
@media(min-width:768px){.value{font-size:1.8rem}}

@media(max-width:620px){
  .hero-brand-copy strong { font-size: .82rem; }
  .hero-live-pill { display: none; }
  .site-nav { margin-top: .65rem; }
  .site-nav a { padding: .5rem .65rem; }
  .marketplace-header .header-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .marketplace-header .header-cards .stat-card {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .marketplace-header .header-cards #notif-bell,
  .marketplace-header .header-cards > a {
    width: 100%;
    grid-column: 1 / -1;
  }
}

body:not(.admin-page) .card :where(h1,h2,h3,h4,p,span,div,label,small,strong,li,a) {
  color: var(--site-card-text, inherit);
}

.grid-2{display:grid;grid-template-columns:1fr;gap:1rem} /* MOBILE = 1 column first */
.grid-2 > div { min-width: 0; } /* allow grid items to shrink below content size, so .table-wrap's own scrollbar contains wide tables instead of the whole page overflowing */
@media(min-width:900px){.grid-2{grid-template-columns:1fr 300px;gap:1.5rem}} /* DESKTOP = 2 column */

input,textarea{width:100%;background:rgba(7,26,20,.7);border:1px solid var(--border);color:var(--text);padding:.9rem;border-radius:8px;font-size:1rem;min-height:44px} /* mobile friendly */

/* Marketplace table fix */
.table-wrap{overflow-x:auto} /* allow horizontal scroll on mobile */
.table{width:100%;border-collapse:collapse;min-width:520px} /* prevent squish */
.table th,.td{padding:.8rem .6rem;font-size:.85rem}
@media(min-width:768px){.table th,.td{padding:10px 14px;font-size:.9rem}}

/* Hot 20 tags bigger for thumb */
.hot-tag{font-size:.85rem;padding:.5rem .8rem}

/* Coin table rows */
.table td { padding:.65rem .5rem; border-bottom:1px solid var(--border); }
.coin-name-cell { display:flex; align-items:center; gap:.5rem; }
.coin-icon { width:24px; height:24px; border-radius:50%; }
.price-cell { font-family:monospace; transition:background .4s ease; }
.change-cell.up { color:#3ddc97; }
.change-cell.down { color:#ff5d5d; }
.flash-up { animation:flash-green .9s ease; }
.flash-down { animation:flash-red .9s ease; }
@keyframes flash-green { 0%{background:rgba(61,220,151,.25);} 100%{background:transparent;} }
@keyframes flash-red   { 0%{background:rgba(255,93,93,.25);} 100%{background:transparent;} }

/* Buy/Sell buttons */
.btn-buy  { background:rgba(61,220,151,.12); border:1px solid rgba(61,220,151,.4); color:#3ddc97; }
.btn-sell { background:rgba(255,93,93,.12); border:1px solid rgba(255,93,93,.4); color:#ff5d5d; }

/* Mover chips (for hot5 / hot20-full) */
.mover-chip { background:var(--surface-2,#141f38); border:1px solid var(--border); border-radius:8px; padding:.4rem .6rem; font-family:monospace; font-size:.78rem; display:flex; gap:.4rem; align-items:center; }
/* ============================================================================
   Added: missing utility classes used by marketplace/transact/about pages,
   golden dialog-box treatment, and better centering/typography for the
   marketplace layout.
   ============================================================================ */

.muted { color: var(--muted); }
.center { text-align: center; }

.btn-primary { background: var(--accent); color: #10131a; border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-block { width: 100%; text-align: center; display: block; }
.btn-row { display: flex; gap: .4rem; justify-content: flex-end; }

.mover-strip { color: var(--muted); font-size: .85rem; margin-bottom: 1rem; }
.hot20-box { cursor: pointer; }
.hot5-row, .hot20-grid { display: flex; gap: .6rem; flex-wrap: wrap; margin: .5rem 0; }
.coin-symbol { color: var(--muted); font-size: .78rem; }
.coin-list-head {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr;
  padding: 0 .6rem .6rem; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border);
}
.badge {
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  padding: .2rem .6rem; font-family: monospace; font-size: .75rem;
}
.result-ok { color: #3ddc97; font-size: .85rem; }
.result-no { color: #ff5d5d; font-size: .85rem; }
.field { margin-bottom: .8rem; }

.about-container { max-width: 960px; margin: 0 auto; }
.about-story { width: 100%; }
.about-copy { max-width: 760px; margin: 0 auto; padding: 1rem 0; color: var(--text); line-height: 1.8; }
.about-copy p + p { margin-top: 1rem; }
.about-photo { width: 100%; margin: 1.5rem 0; overflow: hidden; }
.about-photo img, .about-photo video { display: block; width: 100%; height: clamp(260px, 48vw, 560px); object-fit: cover; }
.about-reveal { opacity: 0; transform: translateY(38px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.75,.25,1); }
.about-reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .about-reveal { opacity: 1; transform: none; transition: none; }
}
.field label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .05em; }
.wallet-address { font-family: monospace; word-break: break-all; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; }

/* ----------------------------------------------------------------------
   Marketplace: centered, readable column width instead of stretching
   edge-to-edge, without hiding anything — the right-hand column becomes
   a proper sidebar card rather than a bare link.
   ---------------------------------------------------------------------- */
.container { max-width: 1080px; }
.grid-2 > div:last-child .btn { position: sticky; top: 1rem; }
body, .card, input, textarea, select, button { font-family: "Inter", sans-serif; }
.logo, h1, h2, h3 { font-family: "Poppins", "Inter", sans-serif; }

/* ----------------------------------------------------------------------
   Every dialogue box (Hot 20 overlay, Buy/Sell confirmation, chat cards)
   gets a warm gold-to-grey gradient with dark, legible text — replacing
   the plain dark card background used elsewhere on the site.
   ---------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; padding: 1.5rem; overflow: auto;
  background: linear-gradient(160deg, #f4c95d 0%, #d4a942 22%, #6b6153 55%, #3a3630 100%);
}
.overlay-title { color: #1a1200; font-family: "Poppins", sans-serif; }
.overlay-center { display: flex; align-items: center; justify-content: center; }

.dialog {
  max-width: 420px; width: 100%;
  background: linear-gradient(160deg, #f6d488 0%, #cfa54a 35%, #948a7c 70%, #55504a 100%);
  color: #201705;
  border: 1px solid rgba(0,0,0,.15);
}
.dialog-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.dialog-head h3 { margin: 0; color: #201705; }
.dialog-message { color: #33291a; line-height: 1.5; font-size: .92rem; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.dialog .badge { background: rgba(255,255,255,.35); border-color: rgba(0,0,0,.2); color: #201705; }
.dialog .btn { background: rgba(255,255,255,.35); border-color: rgba(0,0,0,.25); color: #201705; }
.dialog .btn-primary, .dialog .btn-buy, .dialog .btn-sell { background: rgba(255,255,255,.55); color: #201705; border-color: rgba(0,0,0,.3); }

#hot20-overlay .btn { background: rgba(255,255,255,.3); color: #201705; border-color: rgba(0,0,0,.25); }
#hot20-overlay .mover-chip { background: rgba(255,255,255,.35); color: #201705; border-color: rgba(0,0,0,.2); }

/* Responsive tweak: stack the marketplace sidebar under the main column
   on narrow screens without hiding the "Go to Transact" action */
@media (max-width: 900px) {
  .grid-2 > div:last-child .btn { position: static; }
}

/* ----------------------------------------------------------------------
   Header widgets used on marketplace.html/transact.html — were referenced
   in the HTML but never actually defined, so the two account cards were
   stacking full-width instead of sitting side by side in the header.
   ---------------------------------------------------------------------- */
.icon-btn {
  font-size: 1.3rem; text-decoration: none; display: inline-flex;
  align-items: center; justify-content: center;
  width: 2.4rem; height: 2.4rem; border-radius: 8px;
  background: var(--card); border: 1px solid var(--border);
}
.header-cards { display: flex; gap: .75rem; flex-wrap: wrap; }
.value-sm { font-size: 1rem !important; }

/* ----------------------------------------------------------------------
   Image gallery / slideshow
   ---------------------------------------------------------------------- */
.gallery-wrap { position: relative; }
#gallery-track { position: relative; width: 100%; height: 260px; border-radius: 10px; overflow: hidden; background: var(--bg); }
.gallery-slide { position: absolute; inset: 0; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem .75rem;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; font-size: .85rem;
}
.gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.2rem; height: 2.2rem; padding: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.gallery-prev { left: .5rem; }
.gallery-next { right: .5rem; }
@media (max-width: 500px) { #gallery-track { height: 180px; } }

/* Empty states — icon + message + CTA, replacing bare "No X yet" text */
.empty-state {
  text-align: center; padding: 1.5rem 1rem; color: var(--muted);
}
.empty-state .empty-icon { font-size: 2rem; margin-bottom: .5rem; opacity: .8; }
.empty-state .empty-title { color: var(--text); font-weight: 600; margin-bottom: .25rem; }
.empty-state .empty-subtitle { font-size: .85rem; margin-bottom: .85rem; }
.empty-state .btn { display: inline-block; }

/* WebSocket live-price connection indicator */
.ws-status {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-left: .4rem; vertical-align: middle; background: var(--muted);
  transition: background .3s;
}
.ws-status.live { background: var(--pos); box-shadow: 0 0 6px var(--pos); animation: ws-pulse 2s ease-in-out infinite; }
.ws-status.reconnecting { background: #e8bf5a; }
.ws-status.offline { background: var(--neg); }
@keyframes ws-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* Live coin candlestick charts */
.market-chart-card {
  margin-top: 1rem;
  padding: clamp(.85rem, 2vw, 1.25rem);
  overflow: hidden;
  color: #e5edf2;
  background: linear-gradient(145deg, #101d27, #07111a 70%);
  border: 1px solid rgba(114, 151, 171, .25);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .23), inset 0 1px rgba(255, 255, 255, .035);
}
.market-chart-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.market-chart-title { color: #f2f6f8; font-size: 1rem; font-weight: 700; }
.market-chart-quote { display: flex; align-items: baseline; gap: .65rem; margin-top: .25rem; color: #a5b6c1; font: 600 .85rem "JetBrains Mono", monospace; }
.market-chart-quote strong { color: #f3f7f9; font-size: 1.1rem; }
.chart-up { color: #30d69d; }
.chart-down { color: #ff7380; }
.market-chart-live { display: inline-flex; align-items: center; gap: .4rem; color: #7de2b9; font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.market-chart-live i { width: .48rem; height: .48rem; border-radius: 50%; background: #25d397; box-shadow: 0 0 12px rgba(37, 211, 151, .8); animation: market-live-pulse 1.4s ease-in-out infinite; }
@keyframes market-live-pulse { 50% { opacity: .35; box-shadow: 0 0 3px rgba(37, 211, 151, .35); } }
.chart-range-toggle { display: flex; gap: .35rem; margin: .75rem 0; overflow-x: auto; scrollbar-width: thin; }
.chart-range-btn {
  flex: 0 0 auto; background: transparent; border: 1px solid rgba(134, 159, 174, .2); color: #9dafba;
  padding: .34rem .62rem; border-radius: .45rem; font-size: .75rem; cursor: pointer; font-weight: 600;
}
.chart-range-btn:hover { color: #ecf7f4; border-color: rgba(48, 214, 157, .65); }
.chart-range-btn.active { background: rgba(36, 201, 143, .16); color: #58e6b2; border-color: #27bd8a; }
.market-chart-tools { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin: -.25rem 0 .55rem; }
.market-chart-tool { min-width: 2rem; min-height: 2rem; padding: .3rem .55rem; border: 1px solid rgba(134, 159, 174, .25); border-radius: .4rem; background: #111e29; color: #dce8ec; font: 600 .78rem "Inter", sans-serif; cursor: pointer; }
.market-chart-tool:hover:not(:disabled), .market-chart-tool:focus-visible { border-color: #43d8a3; color: #67e8b8; outline: none; }
.market-chart-tool:disabled { opacity: .42; cursor: default; }
.market-chart-zoom-level { margin-right: auto; color: #a9bbc5; font: 500 .72rem "JetBrains Mono", monospace; }
.market-chart-canvas-wrap { width: 100%; height: clamp(280px, 48vw, 480px); overflow: hidden; border-radius: .65rem; background: #0a131c; }
.market-chart-canvas-wrap canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.market-chart-note { min-height: 1.2rem; margin-top: .55rem; color: #8195a2; font-size: .72rem; }
.market-chart-panel.chart-landscape {
  position: fixed !important; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: max(.75rem, env(safe-area-inset-top)) max(.9rem, env(safe-area-inset-right)) max(.75rem, env(safe-area-inset-bottom)) max(.9rem, env(safe-area-inset-left));
  overflow: auto; border: 0; border-radius: 0; background: #07111a; box-shadow: none;
}
body.market-chart-open { overflow: hidden; }
.market-chart-panel.chart-landscape .market-chart-canvas-wrap { height: calc(100dvh - 150px); min-height: 220px; }
.market-chart-panel.chart-landscape .market-chart-note { display: none; }
.market-chart-panel.chart-landscape:fullscreen { width: 100%; height: 100%; }
.coin-chart-trigger { display: block; max-width: 100%; padding: .15rem; border: 0; border-radius: .45rem; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.coin-chart-trigger:hover, .coin-chart-trigger:focus-visible { background: rgba(42, 207, 150, .1); outline: 1px solid rgba(42, 207, 150, .45); }
.coin-chart-trigger .coin-name-cell { display: inline-flex; }
@media (max-width: 560px) {
  .market-chart-card { padding: .75rem; }
  .market-chart-canvas-wrap { height: 300px; }
  .market-chart-quote strong { font-size: .95rem; }
  .chart-range-btn { padding: .32rem .52rem; }
}
@media (orientation: landscape) and (max-height: 600px) {
  .market-chart-panel.chart-landscape .market-chart-canvas-wrap { height: calc(100dvh - 120px); }
}

/* ----------------------------------------------------------------------
   Notification dropdown: explicit close button so it can always be
   collapsed, plus a transparent full-screen backdrop so tapping anywhere
   outside it also closes it.
   ---------------------------------------------------------------------- */
.notif-dropdown-head { display: flex; align-items: center; justify-content: space-between; }
.notif-close-btn {
  background: none; border: none; color: var(--muted); font-size: 1.1rem;
  cursor: pointer; line-height: 1; padding: .1rem .3rem;
}
.notif-close-btn:hover { color: var(--text); }
.notif-backdrop {
  position: fixed; inset: 0; z-index: 55; background: transparent;
}

/* ----------------------------------------------------------------------
   Promotions banner: gold background per admin request, bold black text
   for legibility against gold, and it now opens into a larger layover
   (modal) that can hold much more text than the strip itself.
   ---------------------------------------------------------------------- */
.promo-banner {
  background: linear-gradient(135deg, #1d3b5f 0%, #2a1d4a 50%, #1d3b5f 100%);
  background-size: 200% 200%;
  animation: promo-shimmer 6s ease infinite;
  padding: 1.75rem 1.5rem;
  border-radius: 12px;
  border: 1px solid #e8bf5a;
  text-align: center;
  margin: 1rem 0;
  box-shadow: 0 0 30px rgba(100,255,218,.15);
}
.promo-banner h2 {
  color: #e8bf5a; font-size: 1.3rem; margin-bottom: .5rem;
  text-shadow: 0 0 12px rgba(100,255,218,.5);
}
.promo-banner #promoText, .promo-banner p { color: #fff; font-weight: 700; }
.promo-banner .muted-hint { color: #e8bf5a; font-weight: 600; font-size: .78rem; margin-top: .5rem; }
.promo-media-img { max-width: 100%; border-radius: 8px; margin: .75rem 0; }

.promo-modal-overlay {
  position: fixed; inset: 0; z-index: 70; padding: 1.5rem; overflow: auto;
  background: rgba(10,15,10,.65); display: flex; align-items: center; justify-content: center;
}
.promo-modal {
  max-width: 560px; width: 100%; max-height: 80vh; overflow-y: auto;
  background: linear-gradient(160deg, #fff3c4 0%, #f4c95d 30%, #d4a942 65%, #b8892c 100%);
  color: #1a1200; border-radius: 14px; padding: 1.75rem; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.promo-modal h2 { color: #1a1200; font-weight: 800; margin-bottom: .75rem; }
.promo-modal-body { white-space: pre-line; font-weight: 700; line-height: 1.6; color: #1a1200; }
.promo-modal-link-btn {
  display: inline-block; margin-top: 1rem; padding: .7rem 1rem; border-radius: 999px;
  background: #1a1200; color: #fff3c4; text-decoration: none; font-weight: 700;
}
.promo-modal-close {
  position: absolute; top: .9rem; right: .9rem; background: rgba(0,0,0,.12); border: none;
  color: #1a1200; width: 2rem; height: 2rem; border-radius: 50%; font-size: 1.1rem; cursor: pointer;
}

/* Admin editable textarea for the promo, used on the admin panel — bold
   black text on gold so it visually matches what the user will see. */
.promo-admin-input {
  background: linear-gradient(135deg, #fff3c4 0%, #d4a942 100%) !important;
  color: #1a1200 !important; font-weight: 700 !important;
}

/* ----------------------------------------------------------------------
   Gallery: no title, no frame borders around each slide, and a hint that
   images can be held/pressed to preview larger.
   ---------------------------------------------------------------------- */
.gallery-wrap #gallery-track { border-radius: 10px; border: none; box-shadow: none; }
.gallery-slide img { border: none; }
.gallery-hint { font-size: .72rem; color: var(--muted); text-align: center; margin-top: .4rem; }
.gallery-preview-overlay {
  position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.gallery-preview-overlay img { max-width: 100%; max-height: 90vh; border-radius: 8px; }

/* ----------------------------------------------------------------------
   Mobile money boxes (Airtel / MTN) — sit right next to the crypto
   deposit-addresses box on the Transact page.
   ---------------------------------------------------------------------- */
.mobile-money-grid { display: grid; grid-template-columns: 1fr; gap: .75rem; margin-top: .75rem; }
@media (min-width: 700px) { .mobile-money-grid { grid-template-columns: 1fr 1fr; } }
.mm-box { border-radius: 10px; padding: .8rem .9rem; }
.mm-airtel { background: linear-gradient(135deg, rgba(255,0,0,.12), rgba(255,0,0,.03)); border: 1px solid rgba(255,60,60,.4); }
.mm-mtn { background: linear-gradient(135deg, rgba(255,204,0,.16), rgba(255,204,0,.03)); border: 1px solid rgba(255,204,0,.5); }
.mm-box .label { font-weight: 700; }
.mm-box .mm-details { font-family: monospace; word-break: break-word; margin-top: .35rem; white-space: pre-line; }

/* ----------------------------------------------------------------------
   Footer social icons — bottom right
   ---------------------------------------------------------------------- */
.site-footer { display: flex; flex-direction: column; gap: .75rem; }
.footer-card {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(232,191,90,.2);
  border-radius: 16px;
  background: rgba(8,24,20,.7);
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  margin-bottom: .25rem;
}
.footer-pill-row {
  display: flex;
  justify-content: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .55rem;
}
.footer-pill {
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(232,191,90,.2);
  background: rgba(232,191,90,.12);
  color: #f4d78a;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .72rem;
}
.footer-bottom-row {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .75rem;
}
.footer-social { display: flex; gap: .6rem; margin-left: auto; }
.footer-social a {
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--card);
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--accent); text-decoration: none; font-size: 1rem;
}
.footer-social a:hover { border-color: var(--accent); transform: translateY(-2px) scale(1.04); }

/* ----------------------------------------------------------------------
   Account status banner (warned / suspended)
   ---------------------------------------------------------------------- */
.account-status-banner {
  border-radius: 10px; padding: .75rem 1rem; margin-bottom: 1rem; font-weight: 600; font-size: .9rem;
}
.account-status-banner.warned { background: rgba(255,193,7,.12); border: 1px solid rgba(255,193,7,.5); color: #ffc107; }
.account-status-banner.suspended { background: rgba(255,93,93,.12); border: 1px solid rgba(255,93,93,.5); color: #ff5d5d; }

/* ----------------------------------------------------------------------
   Referral bonus box (distinct from account balance)
   ---------------------------------------------------------------------- */
.referral-bonus-box { margin-top: .75rem; padding-top: .75rem; border-top: 1px dashed var(--border); }
.referral-bonus-amount { font-size: 1.3rem; font-weight: 700; color: #f4c95d; }

/* Marketplace upper-page background image */
.marketplace-hero {
  background-image: url("/images/dashboard-mid.png");
  background-size: cover; background-position: center;
  border-radius: 12px; overflow: hidden; margin-bottom: 1rem;
}
.marketplace-hero-overlay {
  background: linear-gradient(180deg, rgba(10,25,47,.55) 0%, rgba(10,25,47,.92) 100%);
  padding: 1.25rem 1.5rem 1.5rem; min-height: 180px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: .75rem;
}

body.chat-page {
  font-family: "Inter", sans-serif;
  background-image:
    radial-gradient(circle at top left, rgba(255,221,107,.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(51,216,130,.16), transparent 28%),
    linear-gradient(135deg, #082b1e 0%, #0f4a31 45%, #1e6e48 100%);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  color: #f4f6ed;
  min-height: 100vh;
}

.chat-page .chat-hero {
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(18,70,45,.95), rgba(10,35,24,.96));
  border: 1px solid rgba(255,211,106,.18);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  padding: 2rem;
  margin-bottom: 1rem;
}
.chat-page .chat-hero h1,
.chat-page .chat-hero p {
  color: #f8e8a1;
}
.chat-page .chat-hero p {
  max-width: 720px;
}
.chat-page .chat-messages {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: calc(100vh - 440px);
  overflow-y: auto;
  padding: .9rem;
  border-radius: 20px;
  background: rgba(9,31,22,.72);
  border: 1px solid rgba(255,255,255,.08);
}
.chat-page .chat-message {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  max-width: 84%;
}
.chat-page .chat-message.admin { align-self: flex-start; }
.chat-page .chat-message.member { align-self: flex-end; }
.chat-page .chat-bubble {
  background: rgba(34,72,48,.92);
  color: #f4f6ed;
  border-radius: 18px;
  padding: .95rem 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.chat-page .chat-message.member .chat-bubble {
  background: linear-gradient(135deg, rgba(255,211,106,.96), rgba(239,168,58,.92));
  color: #10131a;
}
.chat-page .chat-meta {
  font-size: .75rem;
  color: rgba(245,248,245,.72);
}
.chat-page .chat-action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .75rem;
  align-items: center;
  margin-top: 1rem;
}
.chat-page .chat-share {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}
.chat-page .chat-share input { flex: 1; min-width: 0; }
.chat-page .chat-file { display:flex; gap:.75rem; align-items:center; margin-top:.75rem; }
.chat-page img.chat-media,
.chat-page video.chat-media {
  max-width: 100%;
  border-radius: 14px;
  margin-top: .5rem;
}
.chat-page .chat-card { padding: 1rem; }

body.chat-page {
  --chat-ink: #e8eff5;
  --chat-muted: #8fa5b5;
  --chat-panel: #0c1722;
  --chat-panel-soft: #101f2d;
  --chat-green: #57d6a8;
  --chat-gold: #eac77a;
  padding: 1rem;
  background:
    radial-gradient(ellipse at 12% 15%, rgba(42, 109, 100, .2), transparent 36%),
    radial-gradient(ellipse at 90% 85%, rgba(40, 87, 126, .18), transparent 38%),
    linear-gradient(145deg, #07111a, #0b1823 55%, #101b26);
  color: var(--chat-ink);
}
body.chat-page > .container { max-width: 1200px; }
body.chat-page .marketplace-header { margin-bottom: .65rem; }
body.chat-page .marketplace-header .btn { border-radius: 999px; }
body.chat-page .site-nav { margin-bottom: 1rem; }
body.chat-page #chat-page { display: block; width: 100%; }
body.chat-page .chat-room {
  max-width: 980px;
  min-height: min(760px, calc(100vh - 165px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(9, 18, 27, .93);
  border: 1px solid rgba(159, 190, 205, .15);
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .42), 0 1px 0 rgba(255,255,255,.04) inset;
  backdrop-filter: blur(18px);
}
body.chat-page .chat-room-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1.25rem;
  background: linear-gradient(100deg, rgba(17, 35, 47, .98), rgba(13, 27, 38, .98));
  border-bottom: 1px solid rgba(159, 190, 205, .12);
}
body.chat-page .chat-room-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #12211f;
  font: 700 .86rem "Space Grotesk", sans-serif;
  letter-spacing: .04em;
  background: linear-gradient(140deg, #f1d89c, #58d8ac);
  box-shadow: 0 0 28px rgba(87, 214, 168, .18);
}
body.chat-page .chat-room-heading { min-width: 0; flex: 1; }
body.chat-page .chat-room-heading h1 {
  margin: 0 0 .22rem;
  color: var(--chat-ink);
  font: 600 1.02rem "Space Grotesk", sans-serif;
  letter-spacing: -.015em;
}
body.chat-page .chat-room-heading p {
  display: flex;
  align-items: center;
  gap: .38rem;
  margin: 0;
  color: var(--chat-muted);
  font-size: .76rem;
}
body.chat-page .chat-live-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: var(--chat-green);
  box-shadow: 0 0 10px rgba(87, 214, 168, .7);
  animation: chat-live-pulse 2s ease-in-out infinite;
}
body.chat-page .chat-room-separator { opacity: .5; }
body.chat-page .chat-room-badge {
  padding: .42rem .68rem;
  border: 1px solid rgba(234, 199, 122, .23);
  border-radius: 999px;
  color: var(--chat-gold);
  background: rgba(234, 199, 122, .07);
  font: 600 .62rem "JetBrains Mono", monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}
body.chat-page .chat-room-badge span { margin-right: .2rem; }
body.chat-page .chat-status {
  min-height: 0;
  padding: 0 1.1rem;
  background: var(--chat-panel);
}
body.chat-page .chat-status:empty { display: none; }
body.chat-page .chat-access-notice {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem .25rem;
  color: var(--chat-muted);
  font-size: .82rem;
}
body.chat-page .chat-access-notice strong {
  color: var(--chat-gold);
  font-size: .85rem;
  white-space: nowrap;
}
body.chat-page .chat-conversation {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  min-height: 340px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 55% 55%, rgba(26, 68, 67, .17), transparent 62%),
    #0a151f;
}
body.chat-page .chat-market-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
body.chat-page .chat-market-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 21, 31, .2), rgba(10, 21, 31, .48));
}
body.chat-page .chat-market-chart {
  position: absolute;
  top: 12%;
  left: 0;
  width: 200%;
  height: 76%;
  overflow: visible;
  opacity: .78;
  animation: chat-chart-flow 32s linear infinite;
}
body.chat-page .chat-chart-trace { animation: chat-chart-breathe 7s ease-in-out infinite alternate; }
body.chat-page .chat-chart-line {
  fill: none;
  stroke: #5de1b5;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 7px rgba(93, 225, 181, .7));
}
body.chat-page .chat-chart-area { fill: url(#chat-chart-fill); stroke: none; opacity: .75; }
body.chat-page .chat-chart-label {
  position: absolute;
  top: 1rem;
  right: 1.1rem;
  z-index: 1;
  color: rgba(180, 205, 210, .44);
  font: 500 .58rem "JetBrains Mono", monospace;
  letter-spacing: .11em;
}
body.chat-page .chat-chart-label span { color: rgba(93, 225, 181, .65); margin-left: .35rem; }
body.chat-page .chat-messages {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .95rem;
  width: 100%;
  height: auto;
  min-height: 340px;
  max-height: 540px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.45rem clamp(.9rem, 4vw, 2.6rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  scrollbar-color: rgba(130, 160, 177, .3) transparent;
  scrollbar-width: thin;
}
body.chat-page .chat-message {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: .55rem;
  max-width: min(78%, 680px);
  animation: chat-message-arrive .32s ease both;
}
body.chat-page .chat-message.admin { align-self: flex-start; }
body.chat-page .chat-message.member { align-self: flex-end; flex-direction: row-reverse; }
body.chat-page .chat-sender-avatar {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #203746;
  color: #c2d7df;
  font: 600 .7rem "Space Grotesk", sans-serif;
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
body.chat-page .chat-sender-avatar.admin {
  background: linear-gradient(145deg, #edd28f, #9ccfba);
  color: #14201e;
}
body.chat-page .chat-message-body { min-width: 0; }
body.chat-page .chat-meta {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin: 0 .65rem .28rem;
  color: rgba(206, 220, 226, .65);
  font-size: .68rem;
}
body.chat-page .chat-meta strong { color: #b6d4d4; font-weight: 600; }
body.chat-page .chat-meta time { color: rgba(160, 180, 191, .55); font-size: .63rem; }
body.chat-page .chat-bubble {
  padding: .68rem .88rem;
  border: 1px solid rgba(172, 198, 208, .09);
  border-radius: 4px 17px 17px 17px;
  background: rgba(25, 43, 55, .94);
  color: #e9eff2;
  box-shadow: 0 6px 20px rgba(0,0,0,.16);
  font-size: .9rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
body.chat-page .chat-message.member .chat-bubble {
  border-color: rgba(87, 214, 168, .13);
  border-radius: 17px 4px 17px 17px;
  background: linear-gradient(140deg, rgba(30, 91, 76, .96), rgba(26, 77, 70, .96));
  color: #effaf5;
}
body.chat-page .chat-bubble p { margin: .25rem 0; }
body.chat-page .chat-bubble a { color: #8fe7ca; text-decoration: underline; }
body.chat-page img.chat-media,
body.chat-page video.chat-media {
  display: block;
  width: auto;
  max-width: min(100%, 420px);
  max-height: 360px;
  border-radius: 13px;
  margin-top: .45rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.27);
}
body.chat-page .chat-empty-state {
  align-self: center;
  margin: auto;
  padding: 1.2rem;
  text-align: center;
  color: var(--chat-muted);
}
body.chat-page .chat-empty-state span { display: block; margin-bottom: .4rem; color: var(--chat-gold); font-size: 1.6rem; }
body.chat-page .chat-empty-state strong { color: var(--chat-ink); font: 600 1rem "Space Grotesk", sans-serif; }
body.chat-page .chat-empty-state p { margin: .4rem 0 0; font-size: .8rem; }
body.chat-page .chat-composer {
  flex-direction: column;
  padding: .8rem 1.1rem .75rem;
  border-top: 1px solid rgba(159, 190, 205, .12);
  background: linear-gradient(180deg, rgba(13, 26, 37, .98), rgba(10, 20, 29, .99));
}
body.chat-page .chat-compose-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}
body.chat-page .chat-attach-button {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(150, 181, 194, .16);
  border-radius: 50%;
  color: #b8d0d8;
  background: rgba(35, 55, 68, .64);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
body.chat-page .chat-attach-button:hover { color: var(--chat-green); background: #203c45; transform: rotate(90deg); }
body.chat-page #chat-media-input { display: none; }
body.chat-page #tier-chat-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  margin: 0;
  padding: .75rem 1rem;
  border: 1px solid rgba(150, 181, 194, .15);
  border-radius: 999px;
  color: var(--chat-ink);
  background: rgba(25, 41, 53, .85);
  font-size: .9rem;
}
body.chat-page #tier-chat-input::placeholder { color: #8295a3; }
body.chat-page #tier-chat-input:focus { border-color: rgba(87, 214, 168, .55); box-shadow: 0 0 0 3px rgba(87, 214, 168, .08); }
body.chat-page .chat-send-button {
  min-width: 92px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 999px;
  color: #092019;
  background: linear-gradient(135deg, #72e2b6, #46c999);
  box-shadow: 0 6px 20px rgba(67, 196, 148, .2);
  font: 700 .8rem "Inter", sans-serif;
  cursor: pointer;
  transition: transform .18s, box-shadow .18s, filter .18s;
}
body.chat-page .chat-send-button:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(67, 196, 148, .3); filter: brightness(1.06); }
body.chat-page .chat-send-button span:last-child { font-size: 1rem; }
body.chat-page .chat-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
body.chat-page .chat-share-button {
  padding: .18rem .4rem;
  border: 0;
  color: #a4c9c6;
}
body.chat-page .chat-share-button:hover { color: var(--chat-green); }
body.chat-page #chat-share-link { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
body.chat-page .chat-compose-status { min-height: 0; color: var(--chat-green); font-size: .7rem; text-align: right; }
@keyframes chat-chart-flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes chat-chart-breathe { from { opacity: .72; } to { opacity: 1; } }
@keyframes chat-live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .42; } }
@keyframes chat-message-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 600px) {
  body.chat-page { padding: .6rem; }
  body.chat-page > .container { padding: .45rem; }
  body.chat-page .chat-room { min-height: calc(100dvh - 150px); border-radius: 17px; }
  body.chat-page .chat-room-header { min-height: 70px; padding: .7rem .8rem; gap: .65rem; }
  body.chat-page .chat-room-avatar { width: 41px; height: 41px; flex-basis: 41px; }
  body.chat-page .chat-room-heading h1 { font-size: .88rem; }
  body.chat-page .chat-room-heading p { font-size: .65rem; flex-wrap: wrap; }
  body.chat-page .chat-room-badge { font-size: .52rem; padding: .35rem .48rem; }
  body.chat-page .chat-messages { min-height: 320px; padding: 1rem .65rem; }
  body.chat-page .chat-message { max-width: 90%; }
  body.chat-page .chat-sender-avatar { width: 24px; height: 24px; flex-basis: 24px; font-size: .62rem; }
  body.chat-page .chat-bubble { padding: .6rem .72rem; font-size: .84rem; }
  body.chat-page .chat-composer { padding: .65rem .7rem .55rem; }
  body.chat-page .chat-compose-row { gap: .4rem; }
  body.chat-page .chat-attach-button { width: 38px; height: 38px; flex-basis: 38px; }
  body.chat-page #tier-chat-input { height: 42px; padding: .65rem .8rem; font-size: .84rem; }
  body.chat-page .chat-send-button { min-width: 44px; width: 44px; height: 42px; padding: 0; }
  body.chat-page .chat-send-button span:first-child { display: none; }
  body.chat-page .chat-composer-footer { align-items: flex-start; font-size: .6rem; }
  body.chat-page .chat-access-notice { align-items: flex-start; flex-direction: column; gap: .25rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.chat-page .chat-chart-trace,
  body.chat-page .chat-live-dot { animation: none; }
}
