:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --bg-card: #151c2c;
  --bg-hover: #1c2538;
  --border: #1f2a3d;
  --text: #e8edf5;
  --text-muted: #8b9cb3;
  --text-dim: #5a6a82;
  --gold: #d4a84b;
  --gold-light: #f0d78c;
  --gold-dark: #a67c2e;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

/* ========== UTILITIES ========== */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }
.view { display: none; }
.view.active { display: block; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0e17;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: rgba(212,168,75,0.1); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text); }
.btn-danger {
  background: var(--danger);
  color: white;
}
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ========== LANDING ========== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.02em;
}
.brand-sub {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 8rem 2.5rem 4rem;
  gap: 3rem;
  background:
    radial-gradient(ellipse at 70% 30%, rgba(212,168,75,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(59,130,246,0.06) 0%, transparent 40%),
    var(--bg);
}
.hero-badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: rgba(212,168,75,0.12);
  border: 1px solid rgba(212,168,75,0.3);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.hero h1 .gold { color: var(--gold-light); }
.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 480px;
  margin-bottom: 2rem;
}
.hero-cta { display: flex; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  gap: 2.5rem;
}
.hero-stats .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-light);
}
.hero-stats .stat-label {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.hero-visual {
  position: relative;
  height: 420px;
}
.floating-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  min-width: 180px;
  animation: float 6s ease-in-out infinite;
}
.floating-card .fc-title { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.25rem; }
.floating-card .fc-value { font-size: 1.4rem; font-weight: 700; }
.floating-card .fc-value.gold { color: var(--gold-light); }
.floating-card .fc-change { font-size: 0.8rem; margin-top: 0.25rem; }
.floating-card .fc-change.positive { color: var(--success); }
.card-1 { top: 10%; left: 10%; animation-delay: 0s; }
.card-2 { top: 40%; right: 5%; animation-delay: -2s; }
.card-3 { bottom: 10%; left: 25%; animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.section {
  padding: 5rem 2.5rem;
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}
.section-header p { color: var(--text-muted); }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--gold-dark);
  transform: translateY(-4px);
}
.feature-icon {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; color: var(--text-muted); }

.markets-preview { background: var(--bg-elevated); }
.markets-table-wrap {
  max-width: 900px;
  margin: 0 auto;
  overflow-x: auto;
}
.markets-table {
  width: 100%;
  border-collapse: collapse;
}
.markets-table th, .markets-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.markets-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  font-weight: 600;
}
.markets-table td { font-size: 0.9rem; }
.positive { color: var(--success); }
.negative { color: var(--danger); }

.about {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}
.about-logo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  margin-bottom: 1.5rem;
}
.about h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.about p { color: var(--text-muted); margin-bottom: 0.75rem; }

.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--gold-light);
}
.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ========== MODAL ========== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.active { display: flex; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  z-index: 1;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.auth-tab {
  flex: 1;
  padding: 0.6rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.auth-tab.active {
  background: rgba(212,168,75,0.15);
  border-color: var(--gold);
  color: var(--gold);
}
.auth-form { display: none; }
.auth-form.active { display: block; }
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--gold);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.auth-hint {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-align: center;
}

/* ========== DASHBOARD LAYOUT ========== */
#user-dashboard,
#admin-dashboard {
  display: none;
}
#user-dashboard.active,
#admin-dashboard.active {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  color: var(--gold-light);
  font-size: 1.05rem;
}
.sidebar-brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold);
}
.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active {
  background: rgba(212,168,75,0.12);
  color: var(--gold);
}
.nav-icon { font-size: 1.1rem; width: 1.4rem; text-align: center; }
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar h2 {
  font-size: 1.2rem;
  font-weight: 600;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.balance-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.balance-pill .label { font-size: 0.7rem; color: var(--text-dim); }
.balance-pill .value { font-weight: 700; color: var(--gold-light); font-size: 1rem; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
}
.user-chip .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #0a0e17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
}
.user-chip .name { font-size: 0.85rem; font-weight: 500; }
.admin-chip .avatar { background: linear-gradient(135deg, #6366f1, #4f46e5); color: white; }

.main-content > .view {
  padding: 1.5rem 1.75rem;
  flex: 1;
  overflow-y: auto;
}

/* ========== CARDS & PANELS ========== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.stat-card .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}
.stat-card .stat-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel.full-height { height: calc(100vh - 140px); display: flex; flex-direction: column; }
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.panel-header h3 { font-size: 0.95rem; font-weight: 600; }
.panel-actions { display: flex; gap: 0.5rem; }
.panel-body { padding: 1.25rem; }
.panel.full-height .panel-body { flex: 1; overflow: hidden; position: relative; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th, .data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.data-table th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  font-weight: 600;
  background: var(--bg-elevated);
}
.data-table tr:hover td { background: var(--bg-hover); }
.data-table .empty-row td {
  text-align: center;
  color: var(--text-dim);
  padding: 2rem;
}

/* ========== 3D PORTFOLIO ========== */
.portfolio-3d-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}
.portfolio-3d {
  flex: 1;
  width: 100%;
  min-height: 400px;
  background: radial-gradient(ellipse at center, #151c2c 0%, #0a0e17 70%);
  border-radius: var(--radius-sm);
  cursor: grab;
}
.portfolio-3d:active { cursor: grabbing; }
.portfolio-3d-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 0 0;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.portfolio-3d-info {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(10,14,23,0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  max-width: 280px;
  pointer-events: none;
}

/* ========== TRADE ========== */
.trade-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.25rem;
}
.side-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.side-btn {
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.side-btn.buy.active {
  background: rgba(34,197,94,0.15);
  border-color: var(--success);
  color: var(--success);
}
.side-btn.sell.active {
  background: rgba(239,68,68,0.15);
  border-color: var(--danger);
  color: var(--danger);
}
.trade-summary {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.price-display {
  text-align: center;
  margin-bottom: 1.25rem;
}
.price-display .price-symbol {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.price-display .price-value {
  font-size: 2rem;
  font-weight: 700;
}
.price-display .price-change { font-size: 0.9rem; }

/* ========== KYC ========== */
.kyc-box {
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
}
.kyc-box.verified { border-color: var(--success); background: rgba(34,197,94,0.08); }
.kyc-box.pending { border-color: var(--warning); background: rgba(245,158,11,0.08); }
.kyc-box.rejected { border-color: var(--danger); background: rgba(239,68,68,0.08); }
.kyc-status-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}
.kyc-status-badge.verified { background: rgba(34,197,94,0.2); color: var(--success); }
.kyc-status-badge.pending { background: rgba(245,158,11,0.2); color: var(--warning); }
.kyc-status-badge.unverified { background: rgba(139,156,179,0.2); color: var(--text-muted); }
.kyc-status-badge.rejected { background: rgba(239,68,68,0.2); color: var(--danger); }

.profile-info .info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.profile-info .info-row:last-child { border-bottom: none; }
.profile-info .info-label { color: var(--text-muted); }

/* ========== SETTINGS ========== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.setting-item label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.setting-item input,
.setting-item select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  z-index: 2000;
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s;
  max-width: 360px;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding-top: 7rem; }
  .hero-visual { display: none; }
  .trade-layout { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .sidebar { width: 200px; }
}

@media (max-width: 768px) {
  .navbar { padding: 0.75rem 1rem; }
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .nav-links.mobile-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg-elevated);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .hero { padding: 6rem 1.25rem 3rem; }
  .section { padding: 3rem 1.25rem; }
  .sidebar {
    position: fixed;
    left: -240px;
    z-index: 200;
    transition: left 0.25s;
  }
  .sidebar.open { left: 0; }
  .main-content { width: 100%; }
  .topbar { padding: 0.75rem 1rem; }
  .main-content > .view { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer { flex-direction: column; align-items: flex-start; padding: 1.5rem 1.25rem; }
  .footer-links { align-items: flex-start; }
}

/* Empty state */
.empty { color: var(--text-dim); text-align: center; padding: 1.5rem; font-size: 0.9rem; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ========== LOADING SCREEN ========== */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0a0e17;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.loader-content { text-align: center; }
.loader-logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  animation: logo-roll 2s linear infinite;
  box-shadow: 0 0 40px rgba(212,168,75,0.25);
}
@keyframes logo-roll {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
.loader-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-light);
  margin: 1.25rem 0 1.5rem;
  letter-spacing: 0.04em;
}
.loader-bar {
  width: 220px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 1rem;
  overflow: hidden;
}
.loader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 4px;
  animation: load-progress 8s linear forwards;
}
@keyframes load-progress {
  0% { width: 0%; }
  100% { width: 100%; }
}
.loader-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  animation: pulse-text 1.5s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.face-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  margin: 0.5rem 0;
  display: none;
}
.face-preview.show { display: block; }

/* ========== SPLASH / LOADERS ========== */
#splash-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0a0e17;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
#splash-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-logo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  animation: logo-roll 2s linear infinite;
  box-shadow: 0 0 40px rgba(212,168,75,0.35);
}
@keyframes logo-roll {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.08); }
  100% { transform: rotate(360deg) scale(1); }
}
.splash-brand {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}
.splash-status {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.splash-bar {
  width: 200px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 1.5rem;
  overflow: hidden;
}
.splash-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light));
  border-radius: 2px;
  transition: width 0.3s;
}

#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(10,14,23,0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}
#page-loader.show {
  display: flex;
}
.page-loader-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  animation: logo-roll 1.5s linear infinite;
}
.page-loader-text {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Investment cards */
.invest-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.invest-card:hover { border-color: var(--gold-dark); }
.invest-card h4 { margin-bottom: 0.5rem; }
.invest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.5rem 0 1rem;
}
.invest-meta span {
  background: var(--bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* Advanced Live Markets */
.advanced-markets { max-width: 1100px; }
.advanced-markets .markets-table th { font-size: 0.7rem; }
.advanced-markets .markets-table td { font-variant-numeric: tabular-nums; }
.market-ticker {
  display: flex;
  gap: 2rem;
  overflow: hidden;
  margin-top: 1.5rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}
.ticker-item {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.ticker-item strong { color: var(--text); margin-right: 0.35rem; }
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Extra 3D / lively animations */
.feature-card {
  transition: border-color 0.25s, transform 0.3s cubic-bezier(0.22,1,0.36,1), box-shadow 0.3s;
}
.feature-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 40px rgba(212,168,75,0.12);
}
.stat-card {
  transition: transform 0.25s, border-color 0.25s;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(212,168,75,0.35);
}
.nav-item {
  transition: background 0.2s, color 0.2s, transform 0.15s;
}
.nav-item:hover { transform: translateX(3px); }
.btn-primary {
  transition: filter 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(212,168,75,0.35);
}
.hero-badge {
  animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,75,0.2); }
  50% { box-shadow: 0 0 0 8px rgba(212,168,75,0); }
}
.floating-card {
  transition: transform 0.3s;
}
.floating-card:hover {
  transform: translateY(-8px) scale(1.03);
}
.panel {
  transition: border-color 0.25s;
}
.data-table tr {
  transition: background 0.15s;
}

/* Portfolio page extras */
.portfolio-3d-container {
  position: relative;
}
.portfolio-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
