/* ==========================================================================
   TradOpiax Trading Platform — Liquid Glassmorphism Core Design System
   Architecture: Ultra-Modern Fintech, Liquid Glass, Vibrant Glow & Animations
   ========================================================================== */

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

:root {
  /* Font Families */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette - Vibrant Dark Mode */
  --color-bg-main: #030712;
  --color-bg-surface: #0b0f19;
  --color-bg-card: rgba(15, 23, 42, 0.55);
  --color-bg-card-hover: rgba(20, 30, 55, 0.7);

  /* Primary Neon Accent Colors */
  --color-emerald: #00e676;
  --color-emerald-rgb: 0, 230, 118;
  --color-cyan: #00e5ff;
  --color-cyan-rgb: 0, 229, 255;
  --color-purple: #9c5fff;
  --color-purple-rgb: 156, 95, 255;
  --color-rose: #ff2a6d;
  --color-rose-rgb: 255, 42, 109;
  --color-amber: #ffb703;
  --color-amber-rgb: 255, 183, 3;

  /* Text Colors */
  --color-text-title: #ffffff;
  --color-text-body: #e2e8f0;
  --color-text-muted: #94a3b8;
  --color-text-dim: #64748b;

  /* Liquid Glass Borders */
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-light: rgba(255, 255, 255, 0.2);
  --glass-border-emerald: rgba(0, 230, 118, 0.35);
  --glass-border-cyan: rgba(0, 229, 255, 0.35);
  --glass-border-purple: rgba(156, 95, 255, 0.35);

  /* Glassmorphism Backdrops & Shadows */
  --glass-blur: blur(24px) saturate(180%);
  --glass-blur-dense: blur(36px) saturate(200%);
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  --glass-shadow-hover: 0 30px 60px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.3);

  /* Neon Glow Effects */
  --glow-emerald: 0 0 30px rgba(0, 230, 118, 0.35), 0 0 60px rgba(0, 230, 118, 0.15);
  --glow-cyan: 0 0 30px rgba(0, 229, 255, 0.35), 0 0 60px rgba(0, 229, 255, 0.15);
  --glow-purple: 0 0 30px rgba(156, 95, 255, 0.35), 0 0 60px rgba(156, 95, 255, 0.15);
  --glow-rose: 0 0 30px rgba(255, 42, 109, 0.35);

  /* Radius System */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ==========================================================================
   Global Resets & Base Canvas Styling
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-main);
  color: var(--color-text-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Animated Liquid Background Mesh */
.liquid-mesh-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.liquid-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: liquidMeshFloat 18s ease-in-out infinite alternate;
}

.liquid-orb-1 {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, var(--color-emerald) 0%, rgba(0, 230, 118, 0) 70%);
  top: -150px;
  left: -150px;
  animation-duration: 22s;
}

.liquid-orb-2 {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--color-cyan) 0%, rgba(0, 229, 255, 0) 70%);
  top: 40%;
  right: -100px;
  animation-duration: 18s;
  animation-delay: -5s;
}

.liquid-orb-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-purple) 0%, rgba(156, 95, 255, 0) 70%);
  bottom: -100px;
  left: 25%;
  animation-duration: 25s;
  animation-delay: -10s;
}

@keyframes liquidMeshFloat {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(60px, 40px) scale(1.1) rotate(180deg); }
  100% { transform: translate(-40px, 80px) scale(0.95) rotate(360deg); }
}

/* Liquid Grid Background Pattern */
.liquid-grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 40px 40px, 80px 80px;
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 90%);
}

/* ==========================================================================
   Liquid Glass Components
   ========================================================================== */

/* Glass Card Component */
.liquid-glass-card {
  position: relative;
  background: var(--color-bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  overflow: hidden;
  transition: var(--transition-normal);
}

.liquid-glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.liquid-glass-card:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--glass-border-light);
  box-shadow: var(--glass-shadow-hover);
  transform: translateY(-4px);
}

/* Glass Card Accent Variants */
.liquid-glass-card.emerald-accent:hover {
  border-color: var(--glass-border-emerald);
  box-shadow: var(--glass-shadow-hover), var(--glow-emerald);
}

.liquid-glass-card.cyan-accent:hover {
  border-color: var(--glass-border-cyan);
  box-shadow: var(--glass-shadow-hover), var(--glow-cyan);
}

.liquid-glass-card.purple-accent:hover {
  border-color: var(--glass-border-purple);
  box-shadow: var(--glass-shadow-hover), var(--glow-purple);
}

/* Floating Glass Badges & Pills */
.liquid-glass-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: var(--transition-fast);
}

.liquid-glass-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-emerald);
  box-shadow: 0 0 10px var(--color-emerald);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* Dynamic Liquid Buttons */
.liquid-glass-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  outline: none;
  transition: var(--transition-normal);
  text-decoration: none;
  overflow: hidden;
  z-index: 1;
}

.liquid-glass-btn-emerald {
  background: linear-gradient(135deg, var(--color-emerald) 0%, #00b0ff 100%);
  color: #030a16;
  box-shadow: var(--glow-emerald);
}

.liquid-glass-btn-emerald:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 40px rgba(0, 230, 118, 0.6);
}

.liquid-glass-btn-cyan {
  background: linear-gradient(135deg, var(--color-cyan) 0%, #0091ea 100%);
  color: #030a16;
  box-shadow: var(--glow-cyan);
}

.liquid-glass-btn-cyan:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.6);
}

.liquid-glass-btn-outline {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border-light);
  color: #ffffff;
}

.liquid-glass-btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
}

/* Button Shimmer Effect */
.liquid-glass-btn::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    60deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: rotate(30deg) translateY(-100%);
  transition: transform 0.8s ease;
}

.liquid-glass-btn:hover::after {
  transform: rotate(30deg) translateY(100%);
}

/* Liquid Inputs & Form Controls */
.liquid-glass-input-group {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.liquid-glass-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-body);
  letter-spacing: 0.3px;
}

.liquid-glass-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.liquid-glass-input-icon {
  position: absolute;
  left: 16px;
  font-size: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: 2;
}

.liquid-glass-input, .liquid-glass-select {
  width: 100%;
  padding: 16px 16px 16px 48px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  outline: none;
  transition: var(--transition-normal);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.liquid-glass-input::placeholder {
  color: var(--color-text-dim);
}

.liquid-glass-input:focus, .liquid-glass-select:focus {
  border-color: var(--color-emerald);
  background: rgba(0, 230, 118, 0.05);
  box-shadow: 0 0 0 4px rgba(0, 230, 118, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.liquid-glass-input-wrapper:focus-within .liquid-glass-input-icon {
  color: var(--color-emerald);
  transform: scale(1.1);
}

.liquid-glass-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2300e676' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  cursor: pointer;
}

.liquid-glass-select option {
  background: #0d1322;
  color: #ffffff;
  padding: 12px;
}

/* Password Toggle Button */
.liquid-glass-pwd-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 18px;
  transition: var(--transition-fast);
  z-index: 2;
}

.liquid-glass-pwd-toggle:hover {
  color: var(--color-emerald);
  transform: scale(1.1);
}

/* Micro-interaction Hover Cards */
.liquid-hover-lift {
  transition: var(--transition-normal);
}

.liquid-hover-lift:hover {
  transform: translateY(-8px) scale(1.01);
}

/* Animated Shimmer Line */
@keyframes shimmerReflection {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(200%) rotate(45deg); }
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  :root {
    --radius-lg: 20px;
    --radius-xl: 24px;
  }
}

@media (max-width: 768px) {
  .liquid-glass-card {
    border-radius: var(--radius-md);
  }
  .liquid-glass-btn {
    padding: 12px 22px;
    font-size: 14px;
  }
}
