/* ===================================================
   DarkVein — Shared Stylesheet
   Gothic dark mine theme
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Metal+Mania&family=Nosifer&family=Crimson+Pro:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ── CSS Variables — DarkVein gothic palette ── */
:root {
  --font-display: 'Metal Mania', system-ui, cursive;
  --font-brand:   'Nosifer', 'Metal Mania', cursive;
  --font-body:    'Crimson Pro', Georgia, serif;
  --vein:         #A63D57;
  --vein-dark:    #6E2840;
  --teal:         #9B5A78;
  --teal-dark:    #6E3D55;
  --purple:       #4A2868;
  --purple-dark:  #2E1845;
  --gold:         #8B6914;
  --bnb:          #7A5E12;
  --bg:           #010002;
  --bg2:          #06040A;
  --card:         #0C0912;
  --card-border:  #181222;
  --text:         #D8CFE8;
  --text2:        #7A6B94;
  --text3:        #3D2E52;
  --success:      #3D6B52;
  --danger:       #9B3058;
  --warning:      #8B6914;
  --sidebar-w:    240px;
  --radius:       14px;
  --radius-sm:    6px;
  --transition:   0.25s ease;
  --shadow:       0 6px 36px rgba(0,0,0,0.85);
  --glow-teal:    0 0 22px rgba(166,61,87,0.28);
  --glow-purple:  0 0 22px rgba(74,40,104,0.35);
  --asset-filter: brightness(0.68) saturate(0.82) contrast(1.06);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  letter-spacing: 0.01em;
}
h1, h2, h3, h4, h5, h6,
.section-title, .nav-logo, .nav-logo span,
.btn, .badge, .stat-value, .hiw-num,
.modal-header h3, .filter-tab, .sidebar-item {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}
.brand-title {
  font-family: var(--font-brand);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow:
    0 2px 0 rgba(0,0,0,0.9),
    0 0 28px rgba(96,0,0,0.35),
    0 0 2px rgba(192,183,162,0.4);
}
.title-metal {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c4b8a4;
  text-shadow: 0 2px 0 #0a0406, 0 0 20px rgba(96,0,0,0.28);
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font-display); border: none; outline: none; letter-spacing: 0.06em; }
input, select, textarea { font-family: var(--font-body); }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--card-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple); }

/* ── Gradient Utilities ── */
.gradient-text {
  background: linear-gradient(135deg, #C45A72 0%, #6B4088 55%, #8B6914 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-bg {
  background: linear-gradient(135deg, var(--vein) 0%, var(--purple) 100%);
}
.gradient-bg-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #5C3A10 100%);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}
/* Primary — blood vein glow */
.btn-primary {
  background: linear-gradient(135deg, #1a0a10 0%, #120818 100%);
  color: #e8c8d4;
  border-color: rgba(166,61,87,0.4);
  box-shadow: inset 0 1px 0 rgba(166,61,87,0.1);
}
.btn-primary::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(166,61,87,0.08) 0%, rgba(74,40,104,0.08) 100%);
  opacity: 0; transition: opacity 0.25s;
}
.btn-primary:hover { transform: translateY(-2px); border-color: rgba(166,61,87,0.65); box-shadow: 0 4px 18px rgba(166,61,87,0.2); }
.btn-primary:hover::before { opacity: 1; }

/* Secondary — muted outline */
.btn-secondary {
  background: rgba(166,61,87,0.05);
  color: #b8909e;
  border-color: rgba(166,61,87,0.28);
}
.btn-secondary:hover {
  background: rgba(166,61,87,0.12);
  border-color: rgba(166,61,87,0.5);
  color: #dcc8d0;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

/* Purple — tomb accent */
.btn-purple {
  background: linear-gradient(135deg, #100818 0%, #180c28 100%);
  color: #b8a0cc;
  border-color: rgba(74,40,104,0.45);
  box-shadow: inset 0 1px 0 rgba(74,40,104,0.12);
}
.btn-purple:hover {
  transform: translateY(-2px);
  border-color: rgba(74,40,104,0.7);
  box-shadow: 0 4px 18px rgba(74,40,104,0.28);
  color: #d4c4e8;
}

/* Gold — tarnished relic */
.btn-gold {
  background: linear-gradient(135deg, #1a1206 0%, #241808 100%);
  color: #c4a050;
  border-color: rgba(139,105,20,0.4);
  font-weight: 800;
}
.btn-gold:hover {
  transform: translateY(-2px);
  border-color: rgba(139,105,20,0.6);
  box-shadow: 0 4px 18px rgba(0,0,0,0.45);
  color: #dcc070;
}

.btn-sm { padding: 8px 16px; font-size: 0.85rem; border-radius: 8px; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 14px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
}
.card:hover { border-color: var(--purple); box-shadow: var(--glow-purple); }
.card-glass {
  background: rgba(39,38,44,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56,50,65,0.6);
  border-radius: var(--radius);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-teal   { background: rgba(166,61,87,0.14); color: var(--vein); }
.badge-purple { background: rgba(74,40,104,0.18); color: #9a7ab8; }
.badge-gold   { background: rgba(139,105,20,0.16); color: var(--gold); }
.badge-green  { background: rgba(61,107,82,0.16); color: var(--success); }
.badge-red    { background: rgba(155,48,88,0.16); color: var(--danger); }
.badge-bnb    { background: rgba(122,94,18,0.16); color: var(--bnb); }

/* ── Section Titles ── */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  margin-bottom: 8px;
  color: #c4b8a4;
  text-shadow: 0 2px 0 #0a0406, 0 0 20px rgba(96,0,0,0.28);
}
.section-sub {
  color: var(--text2);
  font-size: 1.05rem;
  margin-bottom: 48px;
}

.page-hero h1,
.dash-topbar h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c4b8a4;
  text-shadow: 0 2px 0 #0a0406, 0 0 18px rgba(96,0,0,0.25);
}
.dash-topbar h1 { font-size: clamp(1.2rem, 3vw, 1.45rem); }
.page-hero h1 img,
.dash-topbar h1 img {
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  flex-shrink: 0;
}
.dash-topbar h1 img { width: 28px; height: 28px; }

/* ═══════════════════════════════════════
   NAVBAR
═══════════════════════════════════════ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8,6,11,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  line-height: 0;
}
.site-logo {
  height: 44px;
  width: auto;
  max-width: min(220px, 52vw);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.85));
}
.nav-logo--sm .site-logo { height: 36px; max-width: 180px; }
.hero-logo-img {
  width: min(540px, 94vw);
  height: auto;
  margin: 0 auto 10px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 6px 28px rgba(96,0,0,0.22));
}
.hero-brand { text-align: center; margin-bottom: 4px; }
.nav-logo span.nav-logo-text {
  display: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--text2);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.bsc-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(122,94,18,0.1);
  border: 1px solid rgba(122,94,18,0.28);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bnb);
  font-family: var(--font-display);
}
.bsc-dot { width: 7px; height: 7px; background: var(--bnb); border-radius: 50%; animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:0.6;transform:scale(1.3)} }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 8px;
  border-radius: 8px;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile Nav */
.mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: rgba(8,6,11,0.98);
  border-bottom: 1px solid var(--card-border);
  padding: 16px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
  backdrop-filter: blur(16px);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 16px;
  border-radius: 10px;
  color: var(--text2);
  font-weight: 600;
  transition: var(--transition);
}
.mobile-menu a:hover { background: rgba(255,255,255,0.06); color: var(--text); }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--card-border);
  padding: 60px 40px 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto 48px;
}
.footer-brand p { color: var(--text2); font-size: 0.9rem; margin-top: 12px; max-width: 260px; line-height: 1.7; }
.footer-col h4 { font-weight: 800; margin-bottom: 16px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text2); }
.footer-col a { display: block; color: var(--text2); font-size: 0.9rem; padding: 4px 0; transition: var(--transition); }
.footer-col a:hover { color: var(--teal); }
.footer-socials { display: flex; gap: 12px; margin-top: 20px; }
.social-icon {
  width: 38px; height: 38px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  transition: var(--transition);
}
.social-icon:hover { background: rgba(166,61,87,0.1); border-color: var(--vein); color: var(--vein); transform: translateY(-2px); }
.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 28px;
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text3);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 12px;
}

/* ═══════════════════════════════════════
   WALLET MODAL
═══════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 32px;
  width: 90%;
  max-width: 420px;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.modal-overlay.show .modal { transform: translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-header h3 { font-size: 1.2rem; font-weight: 800; }
.modal-close {
  background: rgba(255,255,255,0.06);
  border: none; border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 1.1rem;
  cursor: pointer; transition: var(--transition);
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }
.wallet-option {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; border-radius: 12px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.03);
  cursor: pointer; transition: var(--transition);
  margin-bottom: 12px;
}
.wallet-option:hover { border-color: var(--purple); background: rgba(74,40,104,0.12); transform: translateX(4px); }
.wallet-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.wallet-info h4 { font-weight: 700; font-size: 0.95rem; }
.wallet-info p { color: var(--text2); font-size: 0.8rem; }

/* ═══════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9998;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 360px;
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: toast-in 0.3s ease forwards;
}
.toast.removing { animation: toast-out 0.3s ease forwards; }
.toast-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.toast-icon.success { background: rgba(61,107,82,0.16); }
.toast-icon.info    { background: rgba(166,61,87,0.14); }
.toast-icon.warning { background: rgba(139,105,20,0.16); }
.toast-body h5 { font-size: 0.85rem; font-weight: 700; }
.toast-body p  { font-size: 0.8rem; color: var(--text2); }
.toast-close { margin-left: auto; background: none; color: var(--text3); font-size: 0.9rem; padding: 4px; border-radius: 4px; cursor: pointer; }
.toast-close:hover { color: var(--text); }
@keyframes toast-in  { from{opacity:0;transform:translateX(30px)} to{opacity:1;transform:translateX(0)} }
@keyframes toast-out { from{opacity:1;transform:translateX(0)} to{opacity:0;transform:translateX(30px)} }

/* ═══════════════════════════════════════
   LOADING SPINNER
═══════════════════════════════════════ */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(166,61,87,0.2);
  border-top-color: var(--vein);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   TOOLTIP
═══════════════════════════════════════ */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: #1A1825;
  border: 1px solid var(--card-border);
  color: var(--text);
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}
[data-tooltip]:hover::after { opacity: 1; }

/* ═══════════════════════════════════════
   HERO ANIMATIONS
═══════════════════════════════════════ */
@keyframes float {
  0%,100%{ transform: translateY(0) rotate(0deg); }
  50%    { transform: translateY(-18px) rotate(5deg); }
}
@keyframes float2 {
  0%,100%{ transform: translateY(0) rotate(0deg); }
  50%    { transform: translateY(-12px) rotate(-8deg); }
}
@keyframes float3 {
  0%,100%{ transform: translateY(0) scale(1); }
  50%    { transform: translateY(-10px) scale(1.05); }
}
@keyframes pulse-ring {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(166,61,87,0.35); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 16px rgba(166,61,87,0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(166,61,87,0); }
}
@keyframes pulse-live {
  0%,100%{ opacity:1 } 50%{ opacity:0.4 }
}
.animate-float  { animation: float  4s ease-in-out infinite; }
.animate-float2 { animation: float2 5s ease-in-out infinite; }
.animate-float3 { animation: float3 3.5s ease-in-out infinite; }

/* ═══════════════════════════════════════
   PROGRESS BAR
═══════════════════════════════════════ */
.progress-wrap { background: rgba(255,255,255,0.07); border-radius: 100px; overflow: hidden; height: 10px; }
.progress-bar  {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--teal), var(--purple));
  position: relative;
  transition: width 1s ease;
}
.progress-bar::after {
  content: '';
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--vein);
}
.progress-sm { height: 6px; }
.progress-sm .progress-bar::after { display: none; }

/* ═══════════════════════════════════════
   LIVE INDICATOR
═══════════════════════════════════════ */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
}
.live-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  background: rgba(61,107,82,0.12);
  border: 1px solid rgba(61,107,82,0.3);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--success);
}

/* ═══════════════════════════════════════
   DIFFICULTY STARS
═══════════════════════════════════════ */
.stars { display: flex; gap: 2px; }
.star  { color: var(--gold); font-size: 0.85rem; }
.star.empty { color: rgba(139,105,20,0.25); }

/* ═══════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════ */
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--purple));
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--glow-purple); }
.stat-label { font-size: 0.8rem; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 1.8rem; font-weight: 800; margin: 4px 0; }
.stat-change { font-size: 0.78rem; font-weight: 700; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }
.stat-icon {
  position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  opacity: 0.85;
}

/* ═══════════════════════════════════════
   TABLE
═══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 10px 16px;
  font-size: 0.78rem; font-weight: 700;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--card-border);
}
tbody tr { border-bottom: 1px solid rgba(56,50,65,0.5); transition: var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.02); }
tbody td { padding: 12px 16px; font-size: 0.9rem; }

/* ═══════════════════════════════════════
   LAYOUT HELPERS
═══════════════════════════════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section   { padding: 80px 0; }
.flex      { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.text2 { color: var(--text2); }
.text3 { color: var(--text3); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* ═══════════════════════════════════════
   SIDEBAR LAYOUT (dashboard/games/shop)
═══════════════════════════════════════ */
.app-layout {
  display: flex;
  min-height: calc(100vh - 68px);
}
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--card-border);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  position: sticky; top: 68px;
  height: calc(100vh - 68px);
  overflow-y: auto;
  flex-shrink: 0;
}
.sidebar-nav { flex: 1; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text2);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 4px;
}
.sidebar-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.sidebar-item.active { background: linear-gradient(135deg, rgba(166,61,87,0.12), rgba(74,40,104,0.14)); color: var(--vein); border: 1px solid rgba(166,61,87,0.22); }
.sidebar-item .s-icon { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-section { font-size: 0.7rem; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 14px 4px; margin-top: 8px; }
.sidebar-user {
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  margin-top: 16px;
  display: flex; align-items: center; gap: 12px;
}
.user-avatar {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 800; flex-shrink: 0;
  position: relative;
}
.user-avatar::after {
  content: '';
  position: absolute; bottom: 1px; right: 1px;
  width: 9px; height: 9px;
  background: var(--success);
  border: 2px solid var(--bg2);
  border-radius: 50%;
}
.user-info { overflow: hidden; }
.user-info h5 { font-size: 0.82rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info p  { font-size: 0.72rem; color: var(--text2); }

.main-content { flex: 1; padding: 32px; overflow-x: hidden; }
.top-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 16px;
}
.top-bar h1 { font-size: 1.4rem; font-weight: 800; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }
.wallet-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 100px; padding: 8px 16px;
  font-size: 0.82rem; font-weight: 600;
}
.wallet-pill .dot { width: 7px; height: 7px; background: var(--success); border-radius: 50%; }

/* ═══════════════════════════════════════
   FILTER TABS
═══════════════════════════════════════ */
.filter-tabs {
  display: flex; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-tab {
  padding: 8px 18px; border-radius: 100px;
  background: var(--card); border: 1px solid var(--card-border);
  color: var(--text2); font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: var(--transition);
}
.filter-tab:hover { border-color: var(--teal); color: var(--teal); }
.filter-tab.active {
  background: linear-gradient(135deg, var(--teal), var(--purple));
  border-color: transparent; color: #fff;
}

/* ═══════════════════════════════════════
   SEARCH BAR
═══════════════════════════════════════ */
.search-bar {
  position: relative; display: flex; align-items: center;
}
.search-bar input {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 100px; padding: 10px 16px 10px 42px;
  color: var(--text); font-size: 0.9rem; width: 260px;
  transition: var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--vein); box-shadow: 0 0 0 3px rgba(166,61,87,0.12); }
.search-bar input::placeholder { color: var(--text3); }
.search-icon { position: absolute; left: 14px; color: var(--text3); font-size: 0.9rem; }

/* ═══════════════════════════════════════
   ACTIVITY FEED
═══════════════════════════════════════ */
.activity-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; border-bottom: 1px solid rgba(56,50,65,0.5);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; flex-shrink: 0;
}
.activity-text h5 { font-size: 0.85rem; font-weight: 700; }
.activity-text p  { font-size: 0.78rem; color: var(--text2); }
.activity-time { margin-left: auto; font-size: 0.75rem; color: var(--text3); white-space: nowrap; }

/* ═══════════════════════════════════════
   BAR CHART (CSS only)
═══════════════════════════════════════ */
.bar-chart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 120px; padding: 0 4px;
}
.bar-chart-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-chart-bar {
  width: 100%; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--teal), var(--purple));
  transition: height 1s ease;
  min-height: 4px;
  position: relative;
}
.bar-chart-bar:hover::before {
  content: attr(data-value);
  position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
  background: #1A1825; border: 1px solid var(--card-border);
  padding: 3px 8px; border-radius: 6px;
  font-size: 0.72rem; font-weight: 700; color: var(--text);
  white-space: nowrap;
}
.bar-label { font-size: 0.7rem; color: var(--text3); font-weight: 600; }

/* ═══════════════════════════════════════
   CART (shop)
═══════════════════════════════════════ */
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid rgba(56,50,65,0.5);
}
.cart-item:last-child { border-bottom: none; }
.cart-thumb {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; flex-shrink: 0;
}
.cart-info h5 { font-size: 0.85rem; font-weight: 700; }
.cart-info p  { font-size: 0.78rem; color: var(--text2); }
.cart-remove { margin-left: auto; background: none; color: var(--text3); font-size: 1rem; padding: 4px; cursor: pointer; border-radius: 4px; transition: var(--transition); }
.cart-remove:hover { color: var(--danger); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.cart-total-row span:first-child { color: var(--text2); font-size: 0.85rem; }
.cart-total-row span:last-child  { font-weight: 800; }
.cart-divider { height: 1px; background: var(--card-border); margin: 4px 0; }
.cart-empty { text-align: center; padding: 40px 0; color: var(--text3); font-size: 0.9rem; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 768px) {
  .navbar { padding: 0 16px; }
  .nav-links, .bsc-badge { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .main-content { padding: 20px 16px; }
  .top-bar { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .btn-lg { padding: 14px 24px; font-size: 0.95rem; }
  .stat-value { font-size: 1.5rem; }
}

/* ══════════════════════════════════════════
   SPRITE / ASSET ICON HELPERS
══════════════════════════════════════════ */
.sprite-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sprite-icon img {
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}
/* Legacy icon box — optional beside logo in content areas */
.logo-crystal {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, rgba(20,8,14,0.95), rgba(12,6,18,0.95));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(166,61,87,0.35);
  box-shadow: inset 0 0 12px rgba(0,0,0,0.5);
}
.logo-crystal img {
  width: 24px; height: 24px;
  filter: var(--asset-filter) drop-shadow(0 0 6px rgba(166,61,87,0.45));
}

/*
  Icon semantics (Flap vault / mine — avoid Plant_* / Thorn_* / Crystal_* in UI chrome;
  crystals read as green sprouts). Use:
  - Scull_door_* → vault, TVL, VEIN balance, Flap
  - Rock_*       → hashrate, fuel, mining power
  - Lich_* / Pile_sculls_* → miners, rank, activity
  - Ruin_* / Bones_* / Grave_* → atmosphere only
*/
/* Unified sprite treatment */
.pixel-asset,
.sprite-icon img,
.gt-hero,
.hiw-asset,
.rig-main-img,
.strip-icon {
  filter: var(--asset-filter);
}
.asset-glow { filter: var(--asset-filter) drop-shadow(0 0 6px rgba(166,61,87,0.4)); }
.asset-glow-gold { filter: var(--asset-filter) drop-shadow(0 0 6px rgba(139,105,20,0.45)); }
.asset-glow-purple { filter: var(--asset-filter) drop-shadow(0 0 6px rgba(74,40,104,0.5)); }
.asset-decor { opacity: 0.22; filter: var(--asset-filter); }

/* ── Game thumbnail layout ──
   Structure: dark bg + dim animated tile pattern + centered hero object
*/
.game-thumb {
  height: 130px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050308;
}
/* Objects.png — subtle tomb texture */
.gt-pattern {
  position: absolute; inset: 0;
  background-image: url('../assets/PNG/Objects.png');
  background-repeat: repeat;
  background-size: 96px 96px;
  image-rendering: pixelated;
  opacity: 0.07;
  filter: brightness(0.55) saturate(0.7);
}
/* Radial vignette over pattern */
.gt-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 20%, #050308 88%);
}
/* Main centered hero object */
.gt-hero {
  position: relative; z-index: 2;
  width: 72px; height: 72px;
  object-fit: contain;
  image-rendering: pixelated;
  transition: transform 0.3s ease, filter 0.3s ease;
  display: block;
  filter: var(--asset-filter) drop-shadow(0 0 8px rgba(74,40,104,0.35));
}
.game-card:hover .gt-hero {
  transform: translateY(-4px) scale(1.06);
  filter: brightness(0.78) saturate(0.9) drop-shadow(0 0 10px rgba(166,61,87,0.35));
}
/* MP badge */
.gt-badge {
  position: absolute; top: 9px; right: 9px; z-index: 3;
  background: rgba(4,3,10,0.82);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.72rem; font-weight: 700;
}
/* Difficulty crystals bottom-left */
.gt-diff {
  position: absolute; bottom: 8px; left: 9px; z-index: 3;
  display: flex; align-items: center; gap: 3px;
}
.gt-diff img {
  width: 12px; height: 12px;
  object-fit: contain; image-rendering: pixelated;
}

/* Game thumbnail full-image (legacy fallback) */
.game-thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  display: block;
}

/* Atmospheric dead-tree corner decorations */
.atmo-corner {
  position: absolute;
  pointer-events: none;
  opacity: 0.28;
  image-rendering: pixelated;
  filter: var(--asset-filter);
}
.atmo-corner.tl { top: 0; left: 0; transform: scaleX(-1); }
.atmo-corner.tr { top: 0; right: 0; }
.atmo-corner.bl { bottom: 0; left: 0; transform: scaleX(-1); }
.atmo-corner.br { bottom: 0; right: 0; }

/* Mine scene overlay */
.mine-objects-strip {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  justify-content: center;
  padding: 16px 0 8px;
  border-top: 1px solid rgba(56,50,65,0.5);
  margin-top: 16px;
}
.mine-objects-strip img {
  image-rendering: pixelated;
  opacity: 0.5;
  filter: var(--asset-filter) drop-shadow(0 2px 6px rgba(0,0,0,0.8));
}

/* Subtle relic pulse — no neon */
@keyframes crystal-pulse {
  0%,100% { filter: brightness(0.68) saturate(0.82) drop-shadow(0 0 4px rgba(166,61,87,0.35)); }
  50%      { filter: brightness(0.74) saturate(0.88) drop-shadow(0 0 10px rgba(166,61,87,0.5)); }
}
@keyframes crystal-pulse-gold {
  0%,100% { filter: brightness(0.68) saturate(0.82) drop-shadow(0 0 4px rgba(139,105,20,0.35)); }
  50%      { filter: brightness(0.74) saturate(0.88) drop-shadow(0 0 10px rgba(139,105,20,0.5)); }
}
@keyframes crystal-pulse-purple {
  0%,100% { filter: brightness(0.68) saturate(0.82) drop-shadow(0 0 4px rgba(74,40,104,0.4)); }
  50%      { filter: brightness(0.74) saturate(0.88) drop-shadow(0 0 10px rgba(74,40,104,0.55)); }
}
.glow-crystal        { animation: crystal-pulse 4s ease-in-out infinite; }
.glow-crystal-gold   { animation: crystal-pulse-gold 4s ease-in-out infinite; }
.glow-crystal-purple { animation: crystal-pulse-purple 4s ease-in-out infinite; }

/* Water coast divider */
.water-divider {
  width: 100%;
  height: 48px;
  background-image: url('../assets/PNG/Water_coasts.png');
  background-size: auto 48px;
  background-repeat: repeat-x;
  opacity: 0.06;
  filter: brightness(0.4) saturate(0.5);
  pointer-events: none;
}

/* Objects.png spritesheet background panel */
.mine-bg-panel {
  background-image: url('../assets/PNG/Objects.png');
  background-size: 320px auto;
  background-repeat: repeat;
  opacity: 0.05;
  filter: brightness(0.45) saturate(0.65);
  position: absolute; inset: 0;
  pointer-events: none;
}

/* Sidebar icon images */
.s-img { width: 18px; height: 18px; object-fit: contain; image-rendering: pixelated; flex-shrink: 0; }

/* Stat card icon image */
.stat-icon-img { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }

/* ── Bilingual i18n (EN + 中文 always visible) ── */
[data-i18n] {
  display: inline-block;
  line-height: 1.35;
}
[data-i18n] .i18n-primary {
  display: block;
  font-family: var(--font-display);
}
[data-i18n] .i18n-secondary {
  display: block;
  font-family: var(--font-body);
  font-size: 0.72em;
  color: var(--text2);
  font-weight: 500;
  letter-spacing: 0.02em;
  margin-top: 2px;
}
.lang-zh-primary [data-i18n] .i18n-primary { font-family: var(--font-body); }
.lang-zh-primary [data-i18n] .i18n-secondary { font-family: var(--font-body); font-size: 0.68em; }

/* Compact bilingual in nav / buttons */
.navbar .nav-links [data-i18n],
.mobile-menu [data-i18n],
.btn[data-i18n],
.badge[data-i18n],
.filter-tab[data-i18n],
.sidebar-item [data-i18n],
.bsc-badge [data-i18n],
.live-badge [data-i18n] {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 5px;
  line-height: 1.25;
}
.navbar .nav-links [data-i18n] .i18n-primary,
.navbar .nav-links [data-i18n] .i18n-secondary,
.mobile-menu [data-i18n] .i18n-primary,
.mobile-menu [data-i18n] .i18n-secondary,
.btn[data-i18n] .i18n-primary,
.btn[data-i18n] .i18n-secondary,
.filter-tab[data-i18n] .i18n-primary,
.filter-tab[data-i18n] .i18n-secondary {
  display: inline;
  font-size: inherit;
  margin-top: 0;
}
.navbar .nav-links [data-i18n] .i18n-secondary::before,
.mobile-menu [data-i18n] .i18n-secondary::before,
.btn[data-i18n] .i18n-secondary::before,
.filter-tab[data-i18n] .i18n-secondary::before {
  content: '·';
  margin: 0 4px 0 2px;
  opacity: 0.55;
}

/* Section titles — stacked bilingual */
.section-title[data-i18n] { display: block; text-align: center; }
.section-title[data-i18n] .i18n-secondary { font-size: 0.58em; margin-top: 6px; }
.section-sub[data-i18n] { display: block; text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.section-sub[data-i18n] .i18n-secondary { font-size: 0.88em; margin-top: 8px; }

.hero-tagline[data-i18n] { display: block; }
.hero-tagline[data-i18n] .i18n-secondary { font-size: 0.85em; letter-spacing: 0.12em; margin-top: 4px; }
.hero h1 .brand-title[data-i18n-single],
.hero h1 [data-i18n-single] { display: block; }

.stats-strip-lbl[data-i18n],
.strip-lbl[data-i18n],
.token-legend [data-i18n] {
  display: block;
  text-align: center;
}
.strip-lbl[data-i18n] .i18n-secondary,
.stats-strip-item [data-i18n] .i18n-secondary { font-size: 0.65em; }

/* ── Extra utilities ── */
.section-bg { background: var(--bg2); }
.gold-color { color: var(--gold); }
.success-color { color: var(--success); }
.mt-14 { margin-top: 14px; }
.mb-14 { margin-bottom: 14px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.mt-16 { margin-top: 16px !important; }
.mt-20 { margin-top: 20px; }
.font-mono { font-family: monospace; }

/* ── Scroll reveal base ── */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ── Tiled background helper ── */
.bg-rocks {
  background-image: url('../assets/PNG/Ground_rocks.png');
  background-size: 220px;
  background-repeat: repeat;
}

/* ── Crystal glow variants ── */
.crystal-glow-teal   { filter: var(--asset-filter) drop-shadow(0 0 6px rgba(166,61,87,0.45)); }
.crystal-glow-purple { filter: var(--asset-filter) drop-shadow(0 0 6px rgba(74,40,104,0.5)); }
.crystal-glow-gold   { filter: var(--asset-filter) drop-shadow(0 0 6px rgba(139,105,20,0.45)); }

/* Page atmosphere — shared across HTML pages */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('../assets/PNG/Ground_rocks.png');
  background-size: 240px 240px;
  background-repeat: repeat;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
  filter: brightness(0.5) contrast(1.1);
}
body > * { position: relative; z-index: 1; }
.teal-color { color: var(--vein); }
.vein-color { color: var(--vein); }
