/* =====================================================================
   OMNIA COSTA — Master Futuristic 3D, Cyber-HUD & AI Visual Styling
   "Out of the World" Graphics, Holographic Glare & Interactive AI
   ===================================================================== */

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

:root {
  --primary-dark: #030712;
  --primary-navy: #070F26;
  --primary-surface: #0B1936;
  --accent-gold: #FFB703;
  --accent-gold-light: #FFE082;
  --accent-cyan: #00F5D4;
  --accent-neon-blue: #00BBF9;
  --accent-purple: #9D4EDD;
  --accent-emerald: #10B981;
  --text-primary: #F8FAFC;
  --text-muted: #94A3B8;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 245, 212, 0.4);
  --glass-bg: rgba(7, 15, 38, 0.72);
  --glass-border: rgba(0, 245, 212, 0.18);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--primary-dark);
  color: var(--text-primary);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-font {
  font-family: 'Outfit', sans-serif;
}

.mono-font {
  font-family: 'JetBrains Mono', monospace;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #030712;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #00F5D4 0%, #FFB703 100%);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #00F5D4;
}

/* Futuristic Cyber Grid Background */
.cyber-grid {
  background-image: 
    linear-gradient(rgba(0, 245, 212, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 212, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: -1px -1px;
}

/* Ambient Deep Space Nebulas */
.ambient-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(150px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  transition: all 0.8s ease;
}

.glow-blue {
  background: radial-gradient(circle, #0077b6 0%, transparent 70%);
}
.glow-gold {
  background: radial-gradient(circle, #FFB703 0%, transparent 70%);
}
.glow-cyan {
  background: radial-gradient(circle, #00F5D4 0%, transparent 70%);
}
.glow-purple {
  background: radial-gradient(circle, #9D4EDD 0%, transparent 70%);
}

/* 3D Holographic Glassmorphism */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 30px rgba(0, 245, 212, 0.08);
}

.glass-card {
  background: rgba(11, 25, 54, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  transform-style: preserve-3d;
}

.glass-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(0, 245, 212, 0.5);
  box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 245, 212, 0.25);
}

/* 3D Hologram Glare & Tilt Perspective Container */
.tilt-card {
  transition: transform 0.15s ease-out, box-shadow 0.25s ease-out;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-card-inner {
  transform: translateZ(30px);
}

/* Laser Scanline Beam Effect */
.laser-scanline {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00F5D4, #FFB703, transparent);
  box-shadow: 0 0 15px #00F5D4, 0 0 30px #00F5D4;
  opacity: 0.8;
  animation: laserScan 4s linear infinite;
  pointer-events: none;
}

@keyframes laserScan {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 0.9; }
  90% { opacity: 0.9; }
  100% { top: 100%; opacity: 0; }
}

/* Futuristic HUD Corner Brackets */
.hud-corner {
  position: relative;
}
.hud-corner::before,
.hud-corner::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  border-color: var(--accent-cyan);
  opacity: 0.75;
}
.hud-corner::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid;
  border-left: 2px solid;
}
.hud-corner::after {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid;
  border-right: 2px solid;
}

/* Glowing Neon Gradients */
.text-gradient-gold {
  background: linear-gradient(135deg, #FFF099 0%, #FFB703 50%, #DAA520 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #FFFFFF 0%, #00F5D4 60%, #00BBF9 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-holo {
  background: linear-gradient(135deg, #00F5D4 0%, #00BBF9 40%, #9D4EDD 70%, #FFB703 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 3D Earth Globe Canvas Viewport */
#globe3dCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

/* Floating AI Copilot Orb & Widget */
#aiCopilotOrb {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#aiCopilotOrb:hover {
  transform: scale(1.08) translateY(-4px);
}

.ai-pulse-core {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #00F5D4 0%, #0077B6 60%, #0B1936 100%);
  box-shadow: 0 0 25px #00F5D4, 0 0 50px rgba(0, 245, 212, 0.4), inset 0 0 15px rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.ai-pulse-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed #00F5D4;
  opacity: 0.7;
  animation: spin 16s linear infinite;
}

.ai-pulse-ring-outer {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 183, 3, 0.4);
  animation: spinReverse 22s linear infinite;
}

@keyframes spinReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

/* AI Copilot Drawer / Window */
#aiCopilotWindow {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 580px;
  max-height: calc(100vh - 130px);
  z-index: 1000;
  display: none !important;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 245, 212, 0.25);
  animation: aiWindowPop 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Sector Detail Modal (Strictly Hidden on page load) */
#sectorModal {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#sectorModal.open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.modal-content {
  transform: scale(0.92) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#sectorModal.open .modal-content {
  transform: scale(1) translateY(0);
}

@keyframes aiWindowPop {
  0% { opacity: 0; transform: translateY(20px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat bubble styling */
.chat-msg-user {
  background: linear-gradient(135deg, #0077b6 0%, #00bbf9 100%);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
  box-shadow: 0 4px 15px rgba(0, 187, 249, 0.3);
}

.chat-msg-ai {
  background: rgba(15, 30, 60, 0.85);
  border: 1px solid rgba(0, 245, 212, 0.3);
  color: #E2E8F0;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Hologram Shimmer Ribbon */
.holo-ribbon {
  background: linear-gradient(90deg, #FFB703, #00F5D4, #9D4EDD, #00BBF9, #FFB703);
  background-size: 300% 100%;
  animation: holoGradient 6s linear infinite;
}

@keyframes holoGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* 3D Card Hover Depth */
.depth-layer-1 {
  transform: translateZ(15px);
}
.depth-layer-2 {
  transform: translateZ(30px);
}

/* Glow Border Rotate */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.5px;
  background: linear-gradient(90deg, #00F5D4, #FFB703, #9D4EDD, #00F5D4);
  background-size: 300% 100%;
  animation: holoGradient 4s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.8;
  pointer-events: none;
}

/* Responsive tweaks */
@media (max-width: 640px) {
  #aiCopilotWindow {
    right: 16px;
    bottom: 90px;
    width: calc(100vw - 32px);
    height: 520px;
  }
}

/* 3D Flip Card Container & Faces */
.mini-card-scene {
  perspective: 1200px;
}
.mini-card-flipper {
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  cursor: pointer;
}
.mini-card-flipper.flipped {
  transform: rotateY(180deg);
}
.mini-card-face {
  backface-visibility: hidden;
  border-radius: 20px;
}
.mini-card-back {
  transform: rotateY(180deg);
}

