/* ==========================================================================
   FX ARENA — Modern Gradient Design System & Core UI Components (fx-ui.css)
   Brand Colors:
   - Primary Green: #00e6a8
   - Dark: #0a0b10
   - Card: #131722
   - Inner: #1a1e2e
   - Border: #1e2230
   - Text White: #ffffff
   - Text Dim: #9CA3AF
   - Up-Green: #00cc44
   - Down-Red: #ff6b6b
   - Warn-Orange: #ffa500
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root,
[data-theme="dark"],
body.dark {
  /* Brand Palette — Sep 2026 rebrand: dark green + dodger blue + white */
  --fx-primary: #1E90FF;
  --fx-primary-hover: #0f7ae6;
  --fx-primary-glow: rgba(30, 144, 255, 0.35);
  --fx-primary-rgba: rgba(30, 144, 255, 0.12);
  --fx-secondary: #0B3D2E;
  --fx-secondary-glow: rgba(11, 61, 46, 0.35);
  --fx-accent-yellowgreen: #b4d65a;

  --fx-dark: #0a0b10;
  --fx-card: #131722;
  --fx-card-hover: #191f2d;
  --fx-inner: #1a1e2e;
  --fx-border: #1e2230;
  --fx-border-highlight: rgba(30, 144, 255, 0.3);

  --fx-text: #ffffff;
  --fx-text-dim: #9CA3AF;
  --fx-text-faint: #6B7280;

  --fx-up-green: #00cc44;
  --fx-down-red: #ff6b6b;
  --fx-warn-orange: #ffa500;
  --fx-info-blue: #3b82f6;
  --fx-purple: #a855f7;
  --fx-pink: #ec4899;

  /* Typography */
  --fx-font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fx-font-mono: 'JetBrains Mono', 'SF Mono', Courier, monospace;

  /* Shadows & Glassmorphism */
  --fx-glass-bg: rgba(19, 23, 34, 0.75);
  --fx-glass-border: rgba(255, 255, 255, 0.08);
  --fx-glass-blur: blur(16px);
  --fx-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --fx-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --fx-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --fx-glow-primary: 0 0 20px rgba(30, 144, 255, 0.25);

  /* Backwards compatibility aliases for existing dash.css / style.css */
  --main-bg-color: var(--fx-dark);
  --bg-overlay: var(--fx-dark);
  --bg-light: var(--fx-inner);
  --bg-card: var(--fx-card);
  --bg-card-hover: var(--fx-card-hover);
  --header-bg: rgba(10, 11, 16, 0.85);
  --highlight-color: var(--fx-primary);
  --highlight-rgba: var(--fx-primary-rgba);
  --border-color: var(--fx-border);
  --text-color: var(--fx-text);
  --text-dim: var(--fx-text-dim);
  --text-faint: var(--fx-text-faint);
  --up-color: var(--fx-up-green);
  --down-color: var(--fx-down-red);
  --warn-color: var(--fx-warn-orange);
  --font-body: var(--fx-font-sans);
  --font-mono: var(--fx-font-mono);
}

/* Light Mode — Distinct, Vibrant, High Visibility */
[data-theme="light"],
body.light,
body.light-mode {
  --fx-dark: #f0f3f8;
  --fx-card: #ffffff;
  --fx-card-hover: #f8fafc;
  --fx-inner: #f1f5f9;
  --fx-border: #cbd5e1;
  --fx-border-highlight: rgba(30, 144, 255, 0.4);

  --fx-text: #0f172a;
  --fx-text-dim: #475569;
  --fx-text-faint: #64748b;

  --fx-primary: #0B78E3;
  --fx-primary-hover: #0862bd;
  --fx-primary-glow: rgba(11, 120, 227, 0.25);
  --fx-primary-rgba: rgba(11, 120, 227, 0.12);
  --fx-secondary: #0B3D2E;
  --fx-secondary-glow: rgba(11, 61, 46, 0.25);
  --fx-accent-yellowgreen: #8fae3a;

  --fx-up-green: #16a34a;
  --fx-down-red: #dc2626;
  --fx-warn-orange: #d97706;
  --fx-info-blue: #2563eb;
  --fx-purple: #9333ea;
  --fx-pink: #db2777;

  --fx-glass-bg: rgba(255, 255, 255, 0.88);
  --fx-glass-border: rgba(15, 23, 42, 0.12);
  --fx-glass-blur: blur(12px);
  --fx-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --fx-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.10);
  --fx-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.15);
  --fx-glow-primary: 0 0 20px rgba(11, 120, 227, 0.2);

  /* Backwards compatibility aliases */
  --main-bg-color: var(--fx-dark);
  --bg-overlay: #ffffff;
  --bg-light: var(--fx-inner);
  --bg-card: var(--fx-card);
  --bg-card-hover: var(--fx-card-hover);
  --header-bg: rgba(255, 255, 255, 0.92);
  --highlight-color: var(--fx-primary);
  --highlight-rgba: var(--fx-primary-rgba);
  --border-color: var(--fx-border);
  --text-color: var(--fx-text);
  --text-dim: var(--fx-text-dim);
  --text-faint: var(--fx-text-faint);
  --up-color: var(--fx-up-green);
  --down-color: var(--fx-down-red);
  --warn-color: var(--fx-warn-orange);
}

/* Base resets & body background gradient */
body {
  font-family: var(--fx-font-sans);
  background-color: var(--fx-dark);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(30, 144, 255, 0.09) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(11, 61, 46, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(180, 214, 90, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(10, 11, 16, 0.5) 0%, var(--fx-dark) 100%);
  background-attachment: fixed;
  color: var(--fx-text);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

[data-theme="light"] body,
body.light-mode {
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(11, 120, 227, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(11, 61, 46, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(143, 174, 58, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(240, 243, 248, 0.8) 0%, var(--fx-dark) 100%);
}

/* Custom Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--fx-dark); }
::-webkit-scrollbar-thumb { background: var(--fx-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--fx-primary); }

/* ==========================================================================
   1. BUTTON SYSTEM
   ========================================================================== */
.fx-btn, button, a.btn, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--fx-font-sans);
  font-weight: 700;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
}

.fx-btn:hover, button:hover, a.btn:hover, input[type="submit"]:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.fx-btn:active, button:active, a.btn:active, input[type="submit"]:active {
  transform: translateY(0);
}

/* Primary Gradient Button */
.fx-btn-primary, button.primary, .btn-primary {
  background: linear-gradient(135deg, #00e6a8 0%, #00b884 100%);
  color: #0a0b10 !important;
  box-shadow: 0 4px 15px var(--fx-primary-glow);
  border: none;
}
.fx-btn-primary:hover, button.primary:hover, .btn-primary:hover {
  background: linear-gradient(135deg, #00f0b4 0%, #00c88f 100%);
  box-shadow: 0 6px 20px rgba(0, 230, 168, 0.45);
}

/* Secondary Button */
.fx-btn-secondary {
  background: var(--fx-inner);
  color: var(--fx-text);
  border: 1px solid var(--fx-border);
}
.fx-btn-secondary:hover {
  background: var(--fx-card-hover);
  border-color: var(--fx-primary);
  color: var(--fx-primary);
}

/* Outline Button */
.fx-btn-outline, .btn-outline {
  background: transparent;
  color: var(--fx-primary);
  border: 1.5px solid var(--fx-primary);
}
.fx-btn-outline:hover, .btn-outline:hover {
  background: var(--fx-primary-rgba);
  box-shadow: var(--fx-glow-primary);
}

/* Danger Button */
.fx-btn-danger, .btn-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #dc2626 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.fx-btn-danger:hover, .btn-danger:hover {
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

/* Success Button */
.fx-btn-success, .btn-success {
  background: linear-gradient(135deg, #00cc44 0%, #059669 100%);
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 204, 68, 0.3);
}

/* Button Sizes */
.fx-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.fx-btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 14px; }
.fx-btn-block { width: 100%; display: flex; }

/* Disabled State */
.fx-btn:disabled, button:disabled, [disabled] {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Loading Dots Inside Buttons (Circling Dots) */
.fx-dots-loader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  position: relative;
  vertical-align: middle;
}

.fx-dots-loader .dot {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: currentColor;
  border-radius: 50%;
  animation: fxDotOrbit 1.2s infinite ease-in-out;
}

.fx-dots-loader .dot:nth-child(1) { transform: rotate(0deg) translate(8px); animation-delay: -1.1s; }
.fx-dots-loader .dot:nth-child(2) { transform: rotate(60deg) translate(8px); animation-delay: -0.9s; }
.fx-dots-loader .dot:nth-child(3) { transform: rotate(120deg) translate(8px); animation-delay: -0.7s; }
.fx-dots-loader .dot:nth-child(4) { transform: rotate(180deg) translate(8px); animation-delay: -0.5s; }
.fx-dots-loader .dot:nth-child(5) { transform: rotate(240deg) translate(8px); animation-delay: -0.3s; }
.fx-dots-loader .dot:nth-child(6) { transform: rotate(300deg) translate(8px); animation-delay: -0.1s; }

@keyframes fxDotOrbit {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.6) rotate(var(--angle, 0deg)) translate(8px); }
  40% { opacity: 1; transform: scale(1.2) rotate(var(--angle, 0deg)) translate(8px); }
}

/* ==========================================================================
   2. CARD & GLASSMORPHISM SYSTEM
   ========================================================================== */
.fx-card, .wallet-card, .package-card, .inv-item, .stat-box {
  background: var(--fx-card);
  border: 1px solid var(--fx-border);
  border-radius: 16px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--fx-shadow-sm);
}

.fx-card:hover {
  border-color: var(--fx-border-highlight);
  box-shadow: var(--fx-shadow-md);
}

.fx-card-glass {
  background: var(--fx-glass-bg);
  border: 1px solid var(--fx-glass-border);
  backdrop-filter: var(--fx-glass-blur);
  -webkit-backdrop-filter: var(--fx-glass-blur);
  border-radius: 18px;
}

.fx-card-inner {
  background: var(--fx-inner);
  border: 1px solid var(--fx-border);
  border-radius: 12px;
  padding: 14px;
}

.fx-card-gradient {
  background: linear-gradient(135deg, rgba(0, 230, 168, 0.15) 0%, rgba(19, 23, 34, 0.95) 100%);
  border: 1px solid var(--fx-primary-glow);
}

/* Specific Wallet / Balance Cards */
.balance-card {
  background: linear-gradient(135deg, #00e6a8 0%, #008f5d 100%) !important;
  color: #0a0b10 !important;
  border-radius: 20px !important;
  padding: 24px !important;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 230, 168, 0.3) !important;
}
.balance-card .label { color: rgba(10, 11, 16, 0.75) !important; font-weight: 600; }
.balance-card .amount { color: #0a0b10 !important; font-family: var(--fx-font-mono) !important; }

/* Referral Gradient Card */
.referral-card {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
  color: #ffffff !important;
  border-radius: 20px !important;
  padding: 24px !important;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3) !important;
}

/* ==========================================================================
   3. INPUTS & FORM CONTROLS
   ========================================================================== */
.fx-input, .fx-select, .fx-textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
textarea, select {
  width: 100%;
  background: var(--fx-inner);
  border: 1.5px solid var(--fx-border);
  color: var(--fx-text);
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-family: var(--fx-font-sans);
  transition: all 0.25s ease;
  outline: none;
}

.fx-input:focus, .fx-select:focus, .fx-textarea:focus,
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="number"]:focus, textarea:focus, select:focus {
  border-color: var(--fx-primary) !important;
  box-shadow: 0 0 0 4px var(--fx-primary-rgba) !important;
  background: var(--fx-card);
}

.fx-label, label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fx-text-dim);
  margin-bottom: 6px;
}

.fx-form-group, .form-group {
  margin-bottom: 18px;
}

/* Light mode explicitly dark form controls text */
[data-theme="light"] input, [data-theme="light"] select, [data-theme="light"] textarea,
body.light-mode input, body.light-mode select, body.light-mode textarea {
  color: #0f172a !important;
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
}

/* ==========================================================================
   4. MODALS SYSTEM
   ========================================================================== */
.fx-modal-overlay, .staking-modal-overlay, .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 16, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fx-modal-overlay.open, .staking-modal-overlay.open, .modal-overlay.open {
  display: flex !important;
  opacity: 1 !important;
}

.fx-modal-content, .staking-modal, .modal-box {
  background: var(--fx-card);
  border: 1px solid var(--fx-border-highlight);
  border-radius: 20px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--fx-shadow-lg);
  position: relative;
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--fx-text);
}

.fx-modal-overlay.open .fx-modal-content,
.staking-modal-overlay.open .staking-modal,
.modal-overlay.open .modal-box {
  transform: scale(1);
}

.fx-modal-close, .modal-close-x {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--fx-inner);
  border: 1px solid var(--fx-border);
  color: var(--fx-text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.fx-modal-close:hover, .modal-close-x:hover {
  color: var(--fx-down-red);
  border-color: var(--fx-down-red);
  transform: rotate(90deg);
}

/* ==========================================================================
   5. BADGES & TABLES SYSTEM
   ========================================================================== */
.fx-badge, .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fx-badge-primary { background: var(--fx-primary-rgba); color: var(--fx-primary); border: 1px solid var(--fx-primary-glow); }
.fx-badge-success { background: rgba(0, 204, 68, 0.15); color: var(--fx-up-green); border: 1px solid rgba(0, 204, 68, 0.3); }
.fx-badge-danger { background: rgba(255, 107, 107, 0.15); color: var(--fx-down-red); border: 1px solid rgba(255, 107, 107, 0.3); }
.fx-badge-warning { background: rgba(255, 165, 0, 0.15); color: var(--fx-warn-orange); border: 1px solid rgba(255, 165, 0, 0.3); }
.fx-badge-demo { background: rgba(255, 165, 0, 0.2); color: #ffa500; border: 1px solid #ffa500; font-weight: 800; }

.fx-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--fx-border);
  background: var(--fx-card);
}

.fx-table, table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.fx-table th, table th {
  background: var(--fx-inner);
  color: var(--fx-text-dim);
  padding: 14px 16px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--fx-border);
}

.fx-table td, table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--fx-border);
  color: var(--fx-text);
}

.fx-table tr:hover td, table tr:hover td {
  background: var(--fx-card-hover);
}

/* ==========================================================================
   6. TOP NAVIGATION & BRANDING
   ========================================================================== */
.fx-top-nav, nav.top-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: 64px;
  background: var(--fx-glass-bg);
  backdrop-filter: var(--fx-glass-blur);
  -webkit-backdrop-filter: var(--fx-glass-blur);
  border-bottom: 1px solid var(--fx-glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
}

/* Circled+ Menu Button (Coin Bulge & Rotate Animation) */
@keyframes fxCoinBulgeRotate {
  0% {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 0 10px rgba(0, 230, 168, 0.4);
  }
  50% {
    transform: scale(1.18) rotate(180deg);
    box-shadow: 0 0 22px rgba(0, 230, 168, 0.85), 0 0 35px rgba(0, 230, 168, 0.4);
  }
  100% {
    transform: scale(1) rotate(360deg);
    box-shadow: 0 0 10px rgba(0, 230, 168, 0.4);
  }
}

.fx-circled-plus-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00e6a8 0%, #00b884 100%);
  color: #0a0b10;
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  cursor: pointer;
  animation: fxCoinBulgeRotate 2s infinite ease-in-out;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  outline: none;
}

.fx-circled-plus-btn:hover {
  animation-play-state: paused;
  transform: scale(1.22) rotate(15deg);
  box-shadow: 0 0 25px rgba(0, 230, 168, 0.9);
}

/* Center Logo Styling */
.fx-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.fx-nav-logo .logo-badge {
  background: linear-gradient(135deg, #00e6a8 0%, #00b884 100%);
  color: #0a0b10;
  font-weight: 900;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 10px;
  box-shadow: 0 4px 12px var(--fx-primary-glow);
  letter-spacing: 1px;
}

.fx-nav-logo .logo-title {
  font-weight: 800;
  font-size: 18px;
  color: var(--fx-text);
  letter-spacing: 0.5px;
}

.fx-nav-logo .logo-title span {
  color: var(--fx-primary);
}

/* Nav Right Actions */
.fx-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Balance Display in Top Nav */
.fx-nav-balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: var(--fx-inner);
  border: 1px solid var(--fx-border);
  padding: 6px 12px;
  border-radius: 10px;
}
.fx-nav-balance .bal-label { font-size: 10px; color: var(--fx-text-dim); text-transform: uppercase; font-weight: 600; }
.fx-nav-balance .bal-val { font-size: 13px; font-weight: 800; color: var(--fx-primary); font-family: var(--fx-font-mono); }

/* Notification Bell */
.fx-notif-bell-wrap {
  position: relative;
}

.fx-notif-bell-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--fx-inner);
  border: 1px solid var(--fx-border);
  color: var(--fx-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.fx-notif-bell-btn:hover {
  border-color: var(--fx-primary);
  color: var(--fx-primary);
}

.fx-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--fx-down-red);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--fx-dark);
  transition: transform 0.2s ease;
}

.fx-notif-badge.hidden {
  display: none !important;
}

/* Notification Dropdown Panel */
.fx-notif-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  width: 320px;
  background: var(--fx-card);
  border: 1px solid var(--fx-border-highlight);
  border-radius: 16px;
  box-shadow: var(--fx-shadow-lg);
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: fxSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.fx-notif-dropdown.open {
  display: block !important;
}

.fx-notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--fx-inner);
  border-bottom: 1px solid var(--fx-border);
  font-size: 13px;
  font-weight: 700;
  color: var(--fx-text);
}

.fx-notif-clear-btn {
  background: none;
  border: none;
  color: var(--fx-text-dim);
  font-size: 11px;
  cursor: pointer;
  padding: 0;
}
.fx-notif-clear-btn:hover { color: var(--fx-primary); }

.fx-notif-list {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px;
}

.fx-notif-item {
  padding: 10px 12px;
  border-radius: 10px;
  border-bottom: 1px solid var(--fx-border);
  font-size: 12px;
  transition: background 0.2s ease;
}
.fx-notif-item:last-child { border-bottom: none; }
.fx-notif-item:hover { background: var(--fx-inner); }
.fx-notif-item .title { font-weight: 700; color: var(--fx-text); margin-bottom: 2px; }
.fx-notif-item .msg { color: var(--fx-text-dim); font-size: 11px; }
.fx-notif-item .time { color: var(--fx-text-faint); font-size: 9px; margin-top: 4px; }
.fx-notif-empty { text-align: center; padding: 24px; color: var(--fx-text-dim); font-size: 12px; }

/* Dark/Light Mode Toggle Button */
.fx-theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--fx-inner);
  border: 1px solid var(--fx-border);
  color: var(--fx-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fx-theme-toggle-btn:hover {
  border-color: var(--fx-warn-orange);
  color: var(--fx-warn-orange);
  transform: rotate(15deg);
}

/* ==========================================================================
   7. SLIDE-IN MENU (HALF-CIRCLE / PROTRACTOR PANEL)
   ========================================================================== */
.fx-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 11, 16, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fx-menu-overlay.open {
  display: block !important;
  opacity: 1 !important;
}

/* Protractor / Half-Circle Arched Drawer Panel (Slide Right-to-Left) */
.fx-slide-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: linear-gradient(165deg, #131722 0%, #0a0b10 100%);
  border-left: 2px solid var(--fx-primary-glow);
  /* Half-Circle / Protractor Arched Curved Boundary */
  border-top-left-radius: 180px 45%;
  border-bottom-left-radius: 180px 45%;
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.8), -2px 0 10px var(--fx-primary-glow);
  z-index: 9999;
  transform: translateX(110%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .fx-slide-menu-panel,
body.light-mode .fx-slide-menu-panel {
  background: linear-gradient(165deg, #ffffff 0%, #f0f3f8 100%);
  border-left: 2px solid var(--fx-primary);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.15);
}

.fx-slide-menu-panel.open {
  transform: translateX(0) !important;
}

.fx-slide-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--fx-border);
}

.fx-slide-menu-header .menu-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--fx-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.fx-slide-menu-header .close-btn {
  background: var(--fx-inner);
  border: 1px solid var(--fx-border);
  color: var(--fx-text-dim);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.fx-slide-menu-header .close-btn:hover {
  color: var(--fx-down-red);
  border-color: var(--fx-down-red);
  transform: rotate(90deg);
}

.fx-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.fx-menu-list a, .fx-menu-list button.logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--fx-text-dim);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s ease;
  background: transparent;
  border: none;
  width: 100%;
  cursor: pointer;
}

.fx-menu-list a i, .fx-menu-list button.logout-btn i {
  width: 24px;
  font-size: 16px;
  color: var(--fx-primary);
  text-align: center;
}

.fx-menu-list a:hover, .fx-menu-list button.logout-btn:hover {
  background: var(--fx-inner);
  color: var(--fx-primary);
  transform: translateX(-4px);
}

.fx-menu-list li.divider {
  height: 1px;
  background: var(--fx-border);
  margin: 10px 0;
}

/* ==========================================================================
   8. BOTTOM NAVIGATION BAR (TRANSPARENT & COLORED CIRCLE ITEMS)
   ========================================================================== */
.fx-bottom-nav, nav.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 900;
  background: transparent !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 12px 12px;
}

[data-theme="light"] .fx-bottom-nav,
body.light-mode .fx-bottom-nav {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.fx-bottom-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: 100%;
  max-width: 600px;
  justify-content: space-around;
  align-items: center;
}

.fx-bottom-nav li {
  margin: 0;
  padding: 0;
}

.fx-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--fx-text-dim);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

/* Circle Icon Container for Each Item */
.fx-bottom-nav .nav-circle-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Beautiful Individual Colors for items */
.fx-bottom-nav li:nth-child(1) .nav-circle-icon { color: #00e6a8; border-color: rgba(0, 230, 168, 0.3); }
.fx-bottom-nav li:nth-child(2) .nav-circle-icon { color: #a855f7; border-color: rgba(168, 85, 247, 0.3); }
.fx-bottom-nav li:nth-child(3) .nav-circle-icon { color: #3b82f6; border-color: rgba(59, 130, 246, 0.3); }
.fx-bottom-nav li:nth-child(4) .nav-circle-icon { color: #ffa500; border-color: rgba(255, 165, 0, 0.3); }
.fx-bottom-nav li:nth-child(5) .nav-circle-icon { color: #ec4899; border-color: rgba(236, 72, 153, 0.3); }

/* Bulge Effect when Clicked or Active */
.fx-bottom-nav a.active,
.fx-bottom-nav a:active,
.fx-bottom-nav a.bulge {
  transform: translateY(-8px) scale(1.1);
  color: var(--fx-text) !important;
}

.fx-bottom-nav a.active .nav-circle-icon,
.fx-bottom-nav a.bulge .nav-circle-icon {
  transform: scale(1.15);
  box-shadow: 0 0 20px currentColor, 0 8px 16px rgba(0, 0, 0, 0.4);
  background: rgba(255, 255, 255, 0.15);
  border-width: 2px;
}

/* ==========================================================================
   9. TRADE RESULT POPUPS (PROFIT / LOSS AUTO-VANISH)
   ========================================================================== */
.fx-trade-popup-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.fx-trade-popup {
  pointer-events: auto;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--fx-shadow-lg);
  position: relative;
  overflow: hidden;
  animation: fxPopupSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fx-trade-popup.profit {
  background: linear-gradient(135deg, #008f5d 0%, #00cc44 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.fx-trade-popup.loss {
  background: linear-gradient(135deg, #b91c1c 0%, #ff6b6b 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.fx-trade-popup .popup-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fx-trade-popup .popup-close {
  color: #ffffff;
  opacity: 0.8;
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.fx-trade-popup .popup-close:hover { opacity: 1; text-decoration: none; }

.fx-trade-popup .popup-timer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.7);
  width: 100%;
  animation: fxTimerProgress 2s linear forwards;
}

@keyframes fxTimerProgress {
  from { width: 100%; }
  to { width: 0%; }
}

@keyframes fxPopupSlideIn {
  from { transform: translateX(100%) scale(0.8); opacity: 0; }
  to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes fxSlideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 768px) {
  .fx-top-nav, nav.top-nav { padding: 0 12px; }
  .fx-nav-logo .logo-title { font-size: 15px; }
  .fx-slide-menu-panel { width: 290px; border-top-left-radius: 120px 40%; border-bottom-left-radius: 120px 40%; }
  .fx-bottom-nav .nav-circle-icon { width: 36px; height: 36px; font-size: 14px; }
  .fx-bottom-nav a { font-size: 10px; }
}

@media (max-width: 480px) {
  .fx-top-nav, nav.top-nav { height: 56px; }
  .fx-circled-plus-btn { width: 38px; height: 38px; font-size: 22px; }
  .fx-notif-bell-btn, .fx-theme-toggle-btn { width: 36px; height: 36px; font-size: 14px; }
}

/* ═══════════════ FX Finance Modal (Deposit / Withdraw popup) ═══════════════ */
.fx-finance-modal { position: fixed; inset: 0; z-index: 12000; display: none; align-items: center; justify-content: center; padding: 18px; }
.fx-finance-modal.open { display: flex; }
.fx-finance-backdrop { position: absolute; inset: 0; background: rgba(4,6,10,0.66); backdrop-filter: blur(6px); }
.fx-finance-card {
  position: relative; width: 100%; max-width: 420px; border-radius: 14px;
  background: var(--fx-bg, #12161c); border: 1px solid var(--fx-border, rgba(255,255,255,0.09));
  box-shadow: 0 24px 70px rgba(0,0,0,0.55); overflow: hidden;
  animation: fxFadeSlide .22s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="light"] .fx-finance-card, body.light-mode .fx-finance-card { background: #fff; border-color: rgba(0,0,0,0.1); }
@keyframes fxFadeSlide { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }

.fx-finance-x {
  position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid var(--fx-border, rgba(255,255,255,0.09)); background: transparent;
  color: var(--fx-text, #e8ecf1); font-size: 15px; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .15s;
}
.fx-finance-x:hover { background: rgba(255,80,80,0.12); color: #ff5c5c; transform: rotate(90deg); }

.fx-finance-tabs { display: flex; gap: 6px; padding: 14px 14px 0; }
.fx-fin-tab {
  flex: 1; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--fx-border, rgba(255,255,255,0.09));
  background: transparent; color: var(--fx-text, #e8ecf1); font-size: 13px; font-weight: 700;
  cursor: pointer; transition: all .18s; display: flex; align-items: center; justify-content: center; gap: 7px;
}
.fx-fin-tab.active { background: rgba(0,230,168,0.12); border-color: rgba(0,230,168,0.45); color: #00e6a8; }
[data-theme="light"] .fx-fin-tab.active { background: rgba(0,170,110,0.08); color: #00996b; }

.fx-finance-balance { padding: 10px 16px 0; font-size: 12px; color: var(--fx-dim, #9aa3ad); }
.fx-finance-balance b { color: #00e6a8; font-family: var(--font-mono, monospace); }

.fx-finance-body { padding: 12px 16px 18px; }
.fx-fin-pane { animation: fxFadeSlide .18s ease; }
.fx-fin-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fx-fin-phone-row {
  margin-bottom: 12px; padding: 10px 12px; border-radius: 10px;
  border: 1px dashed var(--fx-border, rgba(255,255,255,0.14)); background: rgba(255,255,255,0.03);
}
[data-theme="light"] .fx-fin-phone-row { background: rgba(0,0,0,0.03); }
.fx-fin-mask { font-family: var(--font-mono, monospace); font-weight: 700; font-size: 15px; letter-spacing: 2px; color: var(--fx-text, #e8ecf1); }
.fx-fin-edit { background: none; border: none; color: #00e6a8; font-size: 12px; font-weight: 700; cursor: pointer; }
.fx-fin-edit:hover { text-decoration: underline; }

.fx-fin-label { font-size: 12px; font-weight: 600; color: var(--fx-dim, #9aa3ad); margin-bottom: 6px; }
.fx-fin-input {
  width: 100%; box-sizing: border-box; padding: 12px; border-radius: 10px;
  border: 1px solid var(--fx-border, rgba(255,255,255,0.12)); background: rgba(255,255,255,0.04);
  color: var(--fx-text, #e8ecf1); font-size: 15px; outline: none; margin-bottom: 10px;
}
.fx-fin-input:focus { border-color: rgba(0,230,168,0.5); box-shadow: 0 0 0 3px rgba(0,230,168,0.12); }
[data-theme="light"] .fx-fin-input { background: #fff; color: #111; border-color: rgba(0,0,0,0.15); }

.fx-fin-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fx-fin-chip {
  padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer;
  border: 1px solid var(--fx-border, rgba(255,255,255,0.12)); background: transparent; color: var(--fx-text, #e8ecf1);
  transition: all .15s;
}
.fx-fin-chip:hover { border-color: rgba(0,230,168,0.5); }
.fx-fin-chip.on { background: rgba(0,230,168,0.14); border-color: rgba(0,230,168,0.5); color: #00e6a8; }

.fx-fin-note { font-size: 11px; line-height: 1.5; color: var(--fx-dim, #9aa3ad); margin-bottom: 12px; }

.fx-fin-submit {
  position: relative; width: 100%; padding: 13px; border: none; border-radius: 10px; cursor: pointer;
  background: linear-gradient(135deg, #00e6a8, #00b389); color: #052018; font-size: 14px; font-weight: 800;
  transition: transform .12s, filter .15s; display: flex; align-items: center; justify-content: center;
}
.fx-fin-submit:active { transform: scale(0.97); }
.fx-fin-submit:disabled { filter: saturate(0.5) brightness(0.9); cursor: wait; }
.fx-fin-submit-w { background: linear-gradient(135deg, #4f8cff, #3b6fe0); color: #fff; }

.fx-fin-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(0,0,0,0.25); border-top-color: currentColor;
  animation: fxSpin .7s linear infinite;
}
@keyframes fxSpin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   TRADING VIEW LAYER (v3.3.4) — per the supplied trading-screen reference:
   near-black canvas (#0a0c09), crimson-red + green accents, micro PnL badges
   pinned over the chart corner.
   ═══════════════════════════════════════════════════════════════════════════ */

.fx-market-switcher {
  margin: 14px 0;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, #0d100d 0%, #0a0c09 100%);
  overflow: hidden;
}
.fx-ms-groups { display: flex; gap: 4px; padding: 8px 10px 0; }
.fx-ms-group {
  padding: 7px 14px; border: none; border-radius: 999px 999px 0 0; cursor: pointer;
  background: transparent; color: var(--fx-dim, #9aa3ad); font-size: 11px; font-weight: 800;
  letter-spacing: 1.2px; text-transform: uppercase; transition: color .15s, background .15s;
}
.fx-ms-group:hover { color: #e8ecf1; }
.fx-ms-group.on { color: #bfe8c2; background: rgba(64,160,64,0.10); }

.fx-ms-pairs { padding: 8px 10px 12px; }
.fx-ms-row { display: none; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.fx-ms-row.on { display: flex; }
.fx-ms-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color: var(--fx-text, #e8ecf1); transition: all .15s; white-space: nowrap;
}
.fx-ms-chip .fx-ms-dot { width: 6px; height: 6px; border-radius: 50%; background: #56605a; transition: background .15s, box-shadow .15s; }
.fx-ms-chip:hover { border-color: rgba(64,160,64,0.45); transform: translateY(-1px); }
.fx-ms-chip.on { background: rgba(64,160,64,0.14); border-color: rgba(64,192,64,0.55); color: #bfe8c2; }
.fx-ms-chip.on .fx-ms-dot { background: #40c040; box-shadow: 0 0 8px rgba(64,192,64,0.8); }

/* chart wrap: reference-canvas deep black */
.tv-chart-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.07);
  background: #0a0c09;
  box-shadow: 0 18px 44px rgba(0,0,0,0.4);
}

/* x-small PnL micro badges over the chart corner */
.fx-pnl-stack {
  position: absolute; top: 10px; right: 10px; z-index: 30;
  display: flex; flex-direction: column; gap: 5px; align-items: flex-end;
  pointer-events: none; max-width: 62%;
}
.fx-pnl-badge {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-size: 10px; font-weight: 700; line-height: 1;
  padding: 5px 9px; border-radius: 6px;
  backdrop-filter: blur(6px);
  border: 1px solid;
  animation: fxFadeSlide .18s ease;
  white-space: nowrap;
}
.fx-pnl-badge b { font-size: 10px; }
.fx-pnl-badge i { font-style: normal; font-weight: 600; opacity: 0.75; font-size: 9px; }
.fx-pnl-badge.up {
  background: rgba(64,160,64,0.16); border-color: rgba(64,192,64,0.5); color: #8fd88f;
  box-shadow: 0 2px 10px rgba(64,160,64,0.25);
}
.fx-pnl-badge.down {
  background: rgba(192,32,64,0.16); border-color: rgba(224,64,64,0.55); color: #ef8f9f;
  box-shadow: 0 2px 10px rgba(192,32,64,0.3);
}

/* buy-sell page chip bar: match the switcher language */
.chips { gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.chip {
  flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.08); background: rgba(255,255,255,0.03);
  color: var(--fx-text, #e8ecf1); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.chip.active, .chip.on {
  background: rgba(64,160,64,0.14); border-color: rgba(64,192,64,0.55); color: #bfe8c2;
}

/* light mode keeps the same accent structure on light surfaces */
body.light-mode .fx-market-switcher, [data-theme="light"] .fx-market-switcher {
  background: linear-gradient(180deg, #fbfcfa 0%, #f4f6f2 100%);
  border-color: rgba(0,0,0,0.09);
}
body.light-mode .fx-ms-group.on, [data-theme="light"] .fx-ms-group.on { color: #2f7d58; background: rgba(78,140,83,0.12); }
body.light-mode .fx-ms-chip, [data-theme="light"] .fx-ms-chip {
  border-color: rgba(0,0,0,0.10); background: #fff; color: #222;
}
body.light-mode .fx-ms-chip.on, [data-theme="light"] .fx-ms-chip.on {
  background: rgba(78,140,83,0.14); border-color: rgba(78,140,83,0.5); color: #2f7d58;
}
