/* ==============================================================================
   HIGGSFIELD KINETIC UI SYSTEM OVERLAY - CLEAN GLOBE STAGE & FULL-WIDTH POSITIONS
   ============================================================================== */

:root {
  --hf-bg-base:        #030712;
  --hf-bg-surface-1:   rgba(8, 14, 28, 0.85);
  --hf-bg-surface-2:   rgba(14, 22, 42, 0.75);
  --hf-bg-glass:       rgba(6, 11, 24, 0.70);
  
  --hf-neon-green:     #00f090;
  --hf-neon-cyan:      #00d4ff;
  --hf-neon-purple:    #a855f7;
  --hf-neon-gold:      #fbbf24;
  --hf-neon-rose:      #f43f5e;

  --hf-border-glass:   1px solid rgba(255, 255, 255, 0.08);
  --hf-border-active:  1px solid rgba(0, 212, 255, 0.45);
  --hf-border-glow:    0 0 16px rgba(0, 212, 255, 0.25);
  
  --hf-shadow-glass:   0 12px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --hf-ease-spring:    cubic-bezier(0.16, 1, 0.3, 1);
}

/* 1. Global Polish & Cyber Scrollbar */
body {
  background-color: #030712 !important;
  color: #f1f5f9;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(3, 7, 18, 0.85);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.35);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 144, 0.6);
  box-shadow: 0 0 10px rgba(0, 240, 144, 0.5);
}

/* 2. Top Header Glassmorphism & Micro-Glow */
.nc-top-header, .tsm-trade-header, .adm-header, .sa-header {
  background: rgba(3, 7, 18, 0.85) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

.tsm-trade-brand-text {
  letter-spacing: -0.3px;
}
.tsm-trade-brand-text strong {
  background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tsm-trade-brand-text span {
  color: var(--hf-neon-green) !important;
  text-shadow: 0 0 12px rgba(0, 240, 144, 0.45);
}

/* 3. Pure 3D Globe Stage: Center stage expands to full view width */
.nc-cockpit-grid {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  gap: 18px !important;
}

.nc-brain-center-stage {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  width: 100% !important;
  min-height: 540px !important;
  background: radial-gradient(circle at center, rgba(6, 20, 48, 0.7) 0%, rgba(3, 7, 18, 0.85) 65%, transparent 100%) !important;
  border: 1px solid rgba(0, 212, 255, 0.22) !important;
  border-radius: 20px !important;
  box-shadow: 0 0 50px rgba(0, 212, 255, 0.12), inset 0 0 35px rgba(0, 240, 144, 0.06) !important;
  overflow: hidden !important;
}

.nc-brain-container {
  width: 100% !important;
  height: 520px !important;
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#agent3dCanvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  filter: drop-shadow(0 0 45px rgba(0, 240, 144, 0.55)) drop-shadow(0 0 25px rgba(0, 212, 255, 0.4)) !important;
}

/* Fullscreen Mode for 3D Globe */
.nc-brain-container.globe-fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  background: radial-gradient(circle at center, rgba(6, 20, 42, 0.98) 0%, rgba(2, 6, 17, 0.99) 100%) !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.globe-fs-controls {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
}

.globe-fs-btn {
  background: rgba(8, 20, 38, 0.85);
  border: 1px solid rgba(0, 212, 255, 0.45);
  color: #00d4ff;
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(0, 212, 255, 0.2);
  backdrop-filter: blur(8px);
  transition: all 0.2s var(--hf-ease-spring);
}

.globe-fs-btn:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: #00f090;
  color: #00f090;
  box-shadow: 0 0 20px rgba(0, 240, 144, 0.4);
  transform: translateY(-2px);
}

/* 4. Full Width Live Active Positions Section */
.nc-positions-bar {
  margin-top: 18px !important;
  width: 100% !important;
}

.nc-positions-bar.full-width {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.open-positions-scroll-wrap, .tsm-table-wrap {
  overflow-x: auto !important;
  overflow-y: auto !important;
  max-height: 440px !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(3, 7, 18, 0.75);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.open-positions-scroll-wrap::-webkit-scrollbar,
.tsm-table-wrap::-webkit-scrollbar {
  width: 8px !important;
  height: 8px !important;
}

.open-positions-scroll-wrap::-webkit-scrollbar-track,
.tsm-table-wrap::-webkit-scrollbar-track {
  background: rgba(6, 11, 24, 0.9) !important;
  border-radius: 4px;
}

.open-positions-scroll-wrap::-webkit-scrollbar-thumb,
.tsm-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00d4ff 0%, #00f090 100%) !important;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 240, 144, 0.4) !important;
}

.open-positions-scroll-wrap::-webkit-scrollbar-thumb:hover,
.tsm-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #00f090 0%, #ffd700 100%) !important;
}

/* 5. Expanded Kinetic Order Flow Visualizer Ribbon */
.order-flow-container {
  margin-top: 8px;
  width: 100%;
  background: rgba(4, 9, 20, 0.85);
  border: 1.5px solid rgba(0, 212, 255, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 0 25px rgba(0, 212, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.order-flow-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.8px;
}

.order-flow-stream {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.flow-ticket {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 22, 42, 0.7);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  animation: flowTicketSlide 0.35s ease forwards;
}

.flow-ticket.buy {
  border-color: rgba(0, 240, 144, 0.4);
  background: rgba(0, 240, 144, 0.1);
  color: #00f090;
  box-shadow: 0 0 14px rgba(0, 240, 144, 0.2);
}

.flow-ticket.sell {
  border-color: rgba(244, 63, 94, 0.4);
  background: rgba(244, 63, 94, 0.1);
  color: #f43f5e;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.2);
}

@keyframes flowTicketSlide {
  from { opacity: 0; transform: translateX(-20px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

/* 6. Kinetic Buttons, Glass Panels & Glow Physics */
.tsm-btn-nav-signin,
.tsm-btn-nav-getstarted,
.tsm-btn-hero-primary,
.tsm-btn-hero-secondary,
.nc-btn-admin,
.adm-btn,
.sa-btn,
.globe-fs-btn {
  transition: all 0.22s var(--hf-ease-spring) !important;
}

.tsm-panel, .adm-card, .sa-card, .broker-card, .crm-stat-card, .tsm-hero-3d-character-wrapper {
  background: rgba(11, 19, 38, 0.7) !important;
  backdrop-filter: blur(16px) saturate(160%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.09) !important;
}

.pulse-dot, .live-pulse-dot, .tsm-live-dot, .nc-dot-live-matrix {
  animation: hfKineticPulse 2s infinite ease-in-out !important;
}

@keyframes hfKineticPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 240, 144, 0.55);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 14px 4px rgba(0, 240, 144, 0.35);
  }
}
