/* ==========================================
   NEXORA CAPITAL - Global Styles
========================================== */
:root {
  --gold: #c9a84c;
  --gold-light: #e8d5a3;
  --gold-dark: #a8893a;
  --gold-glow: rgba(201,168,76,0.12);
  --bg: #0f0f1a;
  --card: #1a1a2e;
  --input: rgba(255,255,255,0.04);
  --text: #ffffff;
  --text-secondary: rgba(255,255,255,0.7);
  --text-muted: rgba(255,255,255,0.4);
  --border: rgba(255,255,255,0.06);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--gold-light);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 10px; }

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 5%;
  background: rgba(15,15,26,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
}
.nav .brand .icon { color: var(--gold); font-size: 1.6rem; }
.nav .brand span { color: var(--gold); }

.nav .links {
  display: flex;
  gap: 20px;
  align-items: center;
}
.nav .links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}
.nav .links a:hover { color: var(--text); }
.nav .links a.active { color: var(--gold); }

.nav .menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px 5%;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav .links {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 16px 0;
  }
  .nav .links.open { display: flex; }
  .nav .menu-btn { display: block; }
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  color: #0f0f1a;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: var(--shadow);
  animation: toastIn 0.4s ease;
  max-width: 90%;
  text-align: center;
}
.toast.success { background: var(--gold); }
.toast.error { background: #e74c3c; color: white; }
.toast.info { background: #4A9AF5; color: white; }

@keyframes toastIn {
  from { opacity:0; transform:translateX(-50%) translateY(20px) scale(0.95); }
  to { opacity:1; transform:translateX(-50%) translateY(0) scale(1); }
}

/* ===== Spinner ===== */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================
   GLASSMORPHISM & ENHANCEMENTS
   ========================================== */

/* Glass card base */
.glass-card {
  background: rgba(26, 26, 46, 0.55);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
              0 0 0 1px rgba(201, 168, 76, 0.05) inset;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.glass-card:hover {
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: 0 12px 48px rgba(201, 168, 76, 0.08),
              0 0 0 1px rgba(201, 168, 76, 0.15) inset;
  transform: translateY(-4px);
}

/* Gold glow on cards */
.glass-card.gold-glow {
  border-color: rgba(201, 168, 76, 0.3);
  box-shadow: 0 0 40px rgba(201, 168, 76, 0.05),
              0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Animated gold border shimmer (subtle) */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.glass-card.shimmer {
  background-image: linear-gradient(
    90deg,
    rgba(201, 168, 76, 0) 0%,
    rgba(201, 168, 76, 0.05) 25%,
    rgba(201, 168, 76, 0.1) 50%,
    rgba(201, 168, 76, 0.05) 75%,
    rgba(201, 168, 76, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 6s infinite linear;
}

/* Stats grid improvement */
.stats-grid .stat-card {
  background: rgba(26, 26, 46, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(201, 168, 76, 0.12) !important;
  border-radius: var(--radius) !important;
  padding: 20px !important;
  transition: all 0.3s ease !important;
}

.stats-grid .stat-card:hover {
  border-color: rgba(201, 168, 76, 0.3) !important;
  transform: translateY(-6px) !important;
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.06) !important;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Plan cards glass */
.plan-card {
  background: rgba(26, 26, 46, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(201, 168, 76, 0.15) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
  transition: all 0.3s ease !important;
}

.plan-card:hover {
  border-color: var(--gold) !important;
  transform: translateX(6px) scale(1.01) !important;
  box-shadow: 0 8px 40px rgba(201, 168, 76, 0.1) !important;
}

/* Referral card glass */
.referral-card {
  background: rgba(26, 26, 46, 0.5) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(201, 168, 76, 0.15) !important;
}

/* Balance card special */
.balance-card {
  background: rgba(26, 26, 46, 0.45) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(201, 168, 76, 0.2) !important;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5),
              0 0 0 1px rgba(201, 168, 76, 0.05) inset !important;
  transition: all 0.4s ease !important;
}

.balance-card:hover {
  border-color: rgba(201, 168, 76, 0.4) !important;
  box-shadow: 0 12px 56px rgba(201, 168, 76, 0.08),
              0 0 0 1px rgba(201, 168, 76, 0.1) inset !important;
  transform: translateY(-2px) scale(1.005);
}

/* Gold gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Toast & spinner (already in style.css, ensure they exist) */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  color: #0f0f1a;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: var(--shadow);
  animation: toastIn 0.4s ease;
  max-width: 90%;
  text-align: center;
}
.toast.success { background: var(--gold); }
.toast.error { background: #e74c3c; color: white; }
.toast.info { background: #4A9AF5; color: white; }

@keyframes toastIn {
  from { opacity:0; transform:translateX(-50%) translateY(20px) scale(0.95); }
  to { opacity:1; transform:translateX(-50%) translateY(0) scale(1); }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stats-grid .stat-card {
    padding: 14px 16px !important;
  }
  .stat-number {
    font-size: 1.5rem;
  }
}

.generate-btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--gold-glow);
    color: var(--gold);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.generate-btn:hover {
    background: var(--gold);
    color: var(--dark);
}