/*
===============================================
POLYMATIC V3 - GLASSMORPHISM EDITION
Intelligent Trading Infrastructure Styles
===============================================
*/

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Primary Color Palette */
  --primary-600: #4f46e5;
  --primary-500: #6366f1;
  --primary-400: #818cf8;
  --primary-300: #a5b4fc;
  --primary-200: #c7d2fe;
  --primary-100: #e0e7ff;
  --primary-50: #eef2ff;
  
  /* Secondary Colors */
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --purple-50: #faf5ff;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-200: #a7f3d0;
  --emerald-100: #d1fae5;
  --emerald-600: #059669;
  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-200: #fecdd3;
  --rose-100: #ffe4e6;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;
  --amber-200: #fde68a;
  
  /* Neutral Colors */
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  
  /* Background Colors */
  --bg-primary: #fafbff;
  --bg-secondary: #f0f2ff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.1);
  --bg-glass-dark: rgba(0, 0, 0, 0.05);
  
  /* Text Colors */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-500);
  --text-accent: var(--primary-600);
  
  /* Border & Effects */
  --border-primary: rgba(79, 70, 229, 0.2);
  --border-secondary: rgba(0, 0, 0, 0.1);
  --border-light: rgba(0, 0, 0, 0.05);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
  
  /* Layout */
  --container-max: 1280px;
  --container-padding: 2rem;
  --section-spacing: 8rem;
  --section-spacing-mobile: 4rem;
  
  /* Design System */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  
  /* Transitions */
  --transition-quick: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Glass Effects */
  --glass-background: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-backdrop: blur(16px);
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-elevated: 10;
  --z-sticky: 100;
  --z-fixed: 1000;
  --z-modal: 10000;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  line-height: 1.15;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ===== BACKGROUND EFFECTS ===== */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  top: 10%;
  left: 10%;
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-400), var(--purple-400));
  animation-delay: 0s;
}

.orb-2 {
  top: 60%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, var(--purple-400), var(--primary-400));
  animation-delay: 7s;
}

.orb-3 {
  bottom: 10%;
  left: 50%;
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, var(--emerald-400), var(--primary-400));
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ===== UTILITY CLASSES ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.glass-card {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(250, 251, 255, 0.8);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo img {
  width: 32px;
  height: 32px;
}

.brand-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald-500);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--emerald-500);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-cta {
  background: var(--primary-600);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-quick);
  box-shadow: var(--shadow-sm);
}

.nav-cta:hover {
  background: #3730a3;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-mobile {
  display: none;
}

.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: var(--z-modal);
}

.mobile-menu-btn span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition-quick);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 251, 255, 0.95);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  z-index: calc(var(--z-fixed) - 1);
  animation: fadeIn 0.3s ease;
  padding: 2rem 1rem;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 2rem;
  
  position: relative;
}

.mobile-menu-content::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  max-width: 90%;
  height: 120px;
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-2xl);
  z-index: -1;
}

.mobile-menu-cta {
  background: var(--primary-600);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-quick);
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
}

.mobile-menu-cta:hover {
  background: #3730a3;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* ===== HERO SECTION ===== */
.hero {
  padding: 10rem 0 8rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 0.5rem 1rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.label-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-600);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

.label-pulse {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(79, 70, 229, 0.1), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.title-highlight {
  background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 90%;
}

.hero-metrics {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.metric-item {
  text-align: left;
}

.metric-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-600);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.metric-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-quick);
  position: relative;
  overflow: hidden;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-600);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: #3730a3;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.btn-icon {
  width: 16px;
  height: 16px;
  transition: var(--transition-quick);
}

.btn:hover .btn-icon {
  transform: translateX(2px);
}

/* ===== ORDER BOOK VISUALIZER ===== */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.order-book-container {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
  width: 100%;
  max-width: 480px;
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: var(--transition-smooth);
}

.order-book-container:hover {
  transform: perspective(1000px) rotateY(-2deg) rotateX(2deg);
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.5);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.title-icon {
  font-size: 1.125rem;
}

.header-controls {
  display: flex;
  gap: 0.5rem;
}

.control-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-secondary);
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-quick);
}

.control-btn.active,
.control-btn:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: white;
}

.order-book {
  padding: 1.5rem;
}

/* ===== POLYMARKET-STYLE ORDER BOOK ===== */
.book-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
}

.book-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-quick);
}

.book-tab.active {
  color: var(--primary-600);
  border-bottom-color: var(--primary-600);
}

.book-headers {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  gap: 1rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.5rem;
}

.book-headers span:first-child {
  text-align: left;
}

.book-headers span:nth-child(2) {
  text-align: center;
}

.book-headers span:last-child {
  text-align: right;
}

.book-section {
  position: relative;
  margin-bottom: 1rem;
}

.order-levels {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.order-level {
  display: grid;
  grid-template-columns: 80px 1fr 80px;
  gap: 1rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  border-radius: var(--radius-xs);
  transition: var(--transition-quick);
}

.order-level .price-cents {
  text-align: left;
  font-weight: 700;
}

.order-level .shares-value {
  text-align: center;
  color: var(--text-primary);
  font-weight: 500;
}

.order-level .total-value {
  text-align: right;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Asks styling (red) */
.asks-section .order-level {
  color: var(--rose-600);
}

.asks-section .order-level:hover {
  background: rgba(244, 63, 94, 0.05);
}

.asks-section .price-cents {
  color: var(--rose-600);
}

/* Bids styling (green) */
.bids-section .order-level {
  color: var(--emerald-600);
}

.bids-section .order-level:hover {
  background: rgba(16, 185, 129, 0.05);
}

.bids-section .price-cents {
  color: var(--emerald-600);
}

.market-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1rem;
  margin: 1rem 0;
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-md);
}

.market-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ===== SECTIONS ===== */
section {
  padding: var(--section-spacing) 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto;
}

/* ===== PROBLEM-SOLUTION SECTION ===== */
.problem-solution {
  background: var(--bg-secondary);
}

.comparison-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 4rem;
}

.comparison-side {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.comparison-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.header-icon {
  font-size: 1.5rem;
}

.comparison-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.problem-list,
.solution-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.problem-item,
.solution-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.problem-icon,
.solution-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.problem-text,
.solution-text {
  flex: 1;
}

.problem-text strong,
.solution-text strong {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.problem-text p,
.solution-text p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.comparison-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.divider-line {
  width: 2px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--primary-600), transparent);
}

.divider-icon {
  font-size: 2rem;
  color: var(--primary-600);
  font-weight: bold;
}

/* ===== FEATURES SECTION ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
  border-color: var(--primary-300);
}

.feature-card.primary {
  background: linear-gradient(135deg, var(--primary-50), var(--purple-50));
  border-color: var(--primary-200);
}

.card-header {
  margin-bottom: 1.5rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-600);
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.detail-icon {
  color: var(--primary-600);
  font-weight: bold;
}

/* ===== DEMO SECTION ===== */
.demo {
  background: var(--bg-secondary);
}

.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 4rem;
}

.demo-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.demo-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.demo-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.demo-feature {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.feature-bullet {
  width: 6px;
  height: 6px;
  background: var(--primary-600);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== WAITLIST SECTION ===== */
.waitlist {
  background: var(--bg-secondary);
  padding: 6rem 0;
}

.waitlist-content {
  max-width: 800px;
  margin: 0 auto;
}

.waitlist-header {
  text-align: center;
  margin-bottom: 3rem;
}

.waitlist-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.waitlist-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.waitlist-form {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow: var(--shadow-2xl);
}

.form-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.form-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-select {
  padding: 1rem;
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: var(--transition-quick);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-submit {
  text-align: center;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== SUCCESS MESSAGE ===== */
.waitlist-success {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--emerald-200);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--shadow-2xl);
}

.success-animation {
  margin-bottom: 2rem;
}

.success-checkmark {
  display: inline-block;
  animation: checkmarkBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  margin-bottom: 2rem;
}

@keyframes checkmarkBounce {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(360deg);
  }
}

.success-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--emerald-600);
  margin-bottom: 1rem;
}

.success-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.success-next-steps {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid var(--emerald-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
}

.success-next-steps h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.next-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--emerald-500);
  color: white;
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* ===== DEBUG PANEL ===== */
.debug-panel {
  background: var(--glass-background);
  backdrop-filter: var(--glass-backdrop);
  -webkit-backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2rem;
}

.debug-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.debug-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.debug-actions {
  display: flex;
  gap: 0.5rem;
}

.debug-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-secondary);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  font-family: var(--font-primary);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-quick);
}

.debug-btn:hover {
  border-color: var(--primary-600);
  color: var(--primary-600);
}

.debug-btn.danger {
  border-color: var(--rose-300);
  color: var(--rose-600);
}

.debug-btn.danger:hover {
  background: var(--rose-50);
  border-color: var(--rose-400);
}

.debug-content {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  max-height: 300px;
  overflow-y: auto;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border-light);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.brand-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-tagline {
  color: var(--text-secondary);
  line-height: 1.5;
  font-size: 0.875rem;
}

.footer-newsletter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.newsletter-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.875rem;
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--primary-600);
}

.newsletter-btn {
  padding: 0.75rem 1rem;
  background: var(--primary-600);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-quick);
}

.newsletter-btn:hover {
  background: #3730a3;
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.system-status .status-indicator {
  width: 6px;
  height: 6px;
}

/* ===== PORTFOLIO RISK ANALYSIS WIDGET ===== */
.risk-analysis-widget {
    margin-top: 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
}

.risk-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1rem;
}

.risk-widget-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

.risk-score-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--amber-300);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    min-width: 45px;
}

.risk-score-number {
    font-size: 1rem;
    font-weight: 700;
    color: var(--amber-600);
    line-height: 1;
}

.risk-score-text {
    font-size: 0.6rem;
    color: var(--amber-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

.risk-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.risk-metric-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.risk-metric-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: var(--font-primary);
}

.risk-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.risk-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.risk-progress-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.market-risk-fill {
    background: var(--amber-500);
}

.liquidity-risk-fill {
    background: var(--emerald-500);
}

.concentration-risk-fill {
    background: var(--rose-500);
}

.correlation-risk-fill {
    background: var(--primary-500);
}

.risk-percentage-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 35px;
    text-align: right;
}

.risk-summary-panel {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid var(--primary-200);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.risk-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.risk-summary-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-primary);
}

.risk-summary-amount {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.var-amount {
    color: var(--rose-600);
}

.position-amount {
    color: var(--amber-600);
}

.risk-alerts-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.risk-alert-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-family: var(--font-primary);
}

.warning-risk-alert {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--amber-200);
    color: var(--amber-700);
}

.danger-risk-alert {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid var(--rose-200);
    color: var(--rose-700);
}

.risk-alert-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.warning-risk-alert .risk-alert-indicator {
    background: var(--amber-500);
    animation: pulse 2s infinite;
}

.danger-risk-alert .risk-alert-indicator {
    background: var(--rose-500);
    animation: pulse 2s infinite;
}

.risk-alert-text {
    font-weight: 500;
    flex: 1;
}

/* ===== EXECUTION SIMULATOR - IMPROVED STYLES ===== */
.exec-simulator {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.exec-simulator__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.exec-simulator__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__restart {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.exec-simulator__restart:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #f0f2ff;
}

.exec-simulator__restart svg {
    transition: transform 0.3s ease;
}

.exec-simulator__restart:hover svg {
    transform: rotate(180deg);
}

.exec-simulator__scenario {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.exec-simulator__order-info {
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.exec-simulator__order-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.exec-simulator__order-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.exec-simulator__order-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__order-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.exec-simulator__status-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.exec-simulator__status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exec-simulator__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.exec-simulator__status-dot--running {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: exec-pulse 2s infinite;
}

.exec-simulator__status-dot--completed {
    background: #4f46e5;
    animation: none;
}

.exec-simulator__status-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__time-remaining {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.exec-simulator__time-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__time-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #4f46e5;
}

@keyframes exec-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

.exec-simulator__algorithms {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.exec-simulator__algo {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.exec-simulator__algo:hover {
    border-color: rgba(79, 70, 229, 0.3);
    background: rgba(255, 255, 255, 0.8);
}

.exec-simulator__algo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.exec-simulator__algo-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.exec-simulator__algo-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.exec-simulator__algo-badge--twap {
    background: #e0e7ff;
    color: #3730a3;
}

.exec-simulator__algo-badge--vwap {
    background: #f3e8ff;
    color: #581c87;
}

.exec-simulator__algo-badge--iceberg {
    background: #d1fae5;
    color: #065f46;
}

.exec-simulator__algo-name {
    font-size: 0.875rem;
    color: #6b7280;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__algo-metrics {
    display: flex;
    gap: 1rem;
}

.exec-simulator__metric {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.exec-simulator__metric-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__metric-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.exec-simulator__metric-value--slippage {
    color: #10b981;
}

.exec-simulator__algo-progress {
    margin-top: 0.75rem;
}

.exec-simulator__progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.exec-simulator__progress-label {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__progress-percentage {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
}

.exec-simulator__progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.exec-simulator__progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
    position: relative;
}

.exec-simulator__progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: exec-shimmer 2s infinite;
}

@keyframes exec-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.exec-simulator__progress-fill--twap {
    background: linear-gradient(90deg, #4f46e5, #6366f1);
}

.exec-simulator__progress-fill--vwap {
    background: linear-gradient(90deg, #7c3aed, #8b5cf6);
}

.exec-simulator__progress-fill--iceberg {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.exec-simulator__progress-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exec-simulator__filled {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
}

.exec-simulator__remaining {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    color: #6b7280;
}

.exec-simulator__chart {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
}

.exec-simulator__chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.exec-simulator__chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__chart-legend {
    display: flex;
    gap: 1rem;
}

.exec-simulator__legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exec-simulator__legend-color {
    width: 12px;
    height: 3px;
    border-radius: 2px;
}

.exec-simulator__legend-color--baseline {
    background: #9ca3af;
}

.exec-simulator__legend-color--current {
    background: #4f46e5;
}

.exec-simulator__legend-item span {
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'Inter', sans-serif;
}

.exec-simulator__chart-container {
    height: 120px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
    margin-bottom: 0.5rem;
}

#execMarketChart {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.exec-simulator__chart-timeline {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    font-family: 'JetBrains Mono', monospace;
}

/* MOBILE ADAPTATIONS */
@media (max-width: 768px) {
  .exec-simulator {
    padding: 1.25rem;
    margin: 0;
  }
  
  .exec-simulator__header {
    flex-direction: row;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }
  
  .exec-simulator__title {
    font-size: 1rem;
  }
  
  .exec-simulator__restart {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  
  .exec-simulator__scenario {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
  }
  
  .exec-simulator__order-details {
    display: flex;
    justify-content: space-between;
    text-align: center;
  }
  
  .exec-simulator__order-item {
    flex: 1;
  }
  
  .exec-simulator__order-label {
    font-size: 0.7rem;
  }
  
  .exec-simulator__order-value {
    font-size: 0.8rem;
  }
  
  .exec-simulator__status-card {
    text-align: center;
  }
  
  .exec-simulator__status-indicator {
    justify-content: center;
    margin-bottom: 0.75rem;
  }
  
  .exec-simulator__time-remaining {
    align-items: center;
  }
  
  .exec-simulator__algorithms {
    margin-bottom: 1.25rem;
  }
  
  .exec-simulator__algo:not(:first-child) {
    display: none;
  }
  
  .exec-simulator__algo-header {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
  }
  
  .exec-simulator__algo-metrics {
    justify-content: center;
    gap: 1.5rem;
  }
  
  .exec-simulator__metric {
    text-align: center;
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .exec-simulator__chart-header {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
  }
  
  .exec-simulator__chart-title {
    font-size: 0.875rem;
  }
  
  .exec-simulator__chart-container {
    height: 100px;
  }
  
  .exec-simulator__chart-timeline {
    font-size: 0.7rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .exec-simulator {
    padding: 1rem;
    margin: 0 0.5rem;
  }
  
  .exec-simulator__order-details {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .exec-simulator__order-item {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
  }
  
  .exec-simulator__chart-container {
    height: 80px;
  }
}

/* ===== PORTFOLIO ANALYTICS NEW SECTION ===== */
.portfolio-analytics-new {
    background: var(--bg-primary);
    padding: 6rem 0;
}

.portfolio-header {
    text-align: center;
    margin-bottom: 4rem;
}

.portfolio-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.portfolio-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

.portfolio-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.portfolio-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.portfolio-stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--glass-background);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.portfolio-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-400), transparent);
    opacity: 0;
    transition: var(--transition-smooth);
}

.portfolio-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-300);
}

.portfolio-stat-card:hover::before {
    opacity: 1;
}

.portfolio-stat-card.primary {
    background: linear-gradient(135deg, var(--primary-50), var(--purple-50));
    border-color: var(--primary-200);
}

.portfolio-stat-card.primary::before {
    background: linear-gradient(90deg, var(--primary-600), var(--purple-600));
    opacity: 1;
}

.stat-icon-wrapper {
    flex-shrink: 0;
}

.stat-icon-bg {
    width: 60px;
    height: 60px;
    background: var(--primary-600);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    position: relative;
    box-shadow: var(--shadow-md);
}

.portfolio-stat-card.primary .stat-icon-bg {
    background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.3);
}

.stat-details {
    flex: 1;
    min-width: 0;
}

.stat-value-large {
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label-large {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.stat-change-positive,
.stat-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-change-positive {
    color: var(--emerald-600);
}

.stat-meta {
    color: var(--text-muted);
}

.change-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--emerald-100);
    border-radius: 50%;
    font-size: 0.75rem;
}

.portfolio-allocation-panel {
    background: var(--glass-background);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.allocation-header {
    text-align: center;
    margin-bottom: 2rem;
}

.allocation-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.allocation-total {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.allocation-chart-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    position: relative;
}

.allocation-chart {
    position: relative;
}

.portfolio-donut {
    max-width: 280px;
    height: auto;
    filter: drop-shadow(0 4px 20px rgba(79, 70, 229, 0.15));
}

.donut-segment {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    cursor: pointer;
}

.donut-segment:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.allocation-legend {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.legend-item-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    transition: var(--transition-quick);
    cursor: pointer;
}

.legend-item-new:hover {
    background: rgba(79, 70, 229, 0.05);
    border-color: var(--primary-300);
    transform: translateX(4px);
}

.legend-item-new.highlighted {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--primary-400);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.legend-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.legend-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.legend-name {
    font-size: 0.975rem;
    font-weight: 600;
    color: var(--text-primary);
}

.legend-values {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.legend-amount {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.legend-percentage {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.5rem;
    --section-spacing: 6rem;
  }
  
  .hero-grid {
    gap: 3rem;
  }
  
  .comparison-grid {
    gap: 2rem;
  }
  
  .demo-grid {
    gap: 3rem;
  }
  
  .portfolio-dashboard {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --container-padding: 1rem;
    --section-spacing: var(--section-spacing-mobile);
  }

    /* DEMO FEATURES CENTER ALIGNMENT */
  .demo-features {
    align-items: center;
    text-align: center;
  }

  .hero-description {
    text-align: center;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  
  .demo-feature {
    justify-content: center;
    text-align: center;
    max-width: 280px; /* Ограничиваем ширину для лучшего вида */
    margin: 0 auto;
  }
  
  .nav-menu {
    display: none;
  }
  
  .nav-mobile {
    display: block;
  }
  
  .brand-status {
    display: none;
  }
  
  .hero {
    padding: 8rem 0 6rem;
    min-height: auto;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-visual {
    order: 2;
  }

  .hero-content {
    order: 1;
  }
  
  .order-book-container {
    transform: none;
    max-width: 100%;
  }
  
  .order-book-container:hover {
    transform: none;
  }
  
  .widget-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }
  
  .header-title {
    justify-content: center;
  }
  
  .header-controls {
    justify-content: center;
  }
  
  .order-book {
    padding: 1rem;
  }
  
  .book-headers {
    font-size: 0.7rem;
    padding: 0.375rem 0.75rem;
    grid-template-columns: 70px 1fr 70px;
  }
  
  .order-level {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    grid-template-columns: 70px 1fr 70px;
  }
  
  .market-info {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .hero-metrics {
    justify-content: center;
    gap: 1.5rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .comparison-divider {
    order: 2;
  }
  
  .comparison-side.after {
    order: 3;
  }
  
  .divider-line {
    width: 100px;
    height: 2px;
  }
  
  .divider-icon {
    transform: rotate(90deg);
  }
  
  /* DEMO SECTION */
  .demo-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .demo-content {
    order: 1;
  }
  
  .demo-visual {
    order: 2;
  }
  
  .demo-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .demo-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .portfolio-dashboard {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .portfolio-stats {
    gap: 1.5rem;
  }
  
  .portfolio-stat-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
  }
  
  .stat-details {
    text-align: center;
  }
  
  .form-section {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-meta {
    justify-content: center;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  /* Risk Analysis Widget Mobile */
  .risk-metric-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  .risk-bar-wrapper {
    justify-content: space-between;
  }
  
  .risk-summary-panel {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .risk-summary-item {
    flex-direction: row;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .hero-metrics {
    flex-direction: column;
    gap: 1rem;
  }
  
  .metric-item {
    text-align: center;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    text-align: left;
  }
  
  .legend-item-new {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .legend-values {
    align-items: center;
  }
  
  .portfolio-stat-card {
    padding: 1.5rem;
  }
  
  .stat-value-large {
    font-size: 1.875rem;
  }
  
  .stat-icon-bg {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .portfolio-allocation-panel {
    padding: 1.5rem;
  }
  
  .waitlist-form {
    padding: 2rem;
  }
}

/* ===== MOBILE MENU ANIMATIONS ===== */
.mobile-menu-btn.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay.open {
  display: block;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .ambient-orb {
    animation: none;
  }
  
  .label-pulse {
    animation: none;
  }
  
  .status-dot {
    animation: none;
  }
}

/* ===== FOCUS STYLES ===== */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-600);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* ===== LOADING STATES ===== */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--primary-200);
  border-top: 2px solid var(--primary-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== ERROR STATES ===== */
.error {
  border-color: var(--rose-500) !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.1) !important;
}

.success {
  border-color: var(--emerald-500) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* ===== PRINT STYLES ===== */
@media print {
  .bg-ambient,
  .navbar,
  .hero-visual,
  .waitlist,
  .footer,
  .debug-panel,
  .mobile-menu-overlay {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .section-title,
  .hero-title {
    color: black;
  }
  
  .hero {
    padding: 2rem 0;
    min-height: auto;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .demo-grid {
    grid-template-columns: 1fr;
  }
  
  .feature-card,
  .comparison-side,
  .portfolio-stat-card {
    break-inside: avoid;
    margin-bottom: 1rem;
  }
}

/* ===== UTILITY ANIMATIONS ===== */
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(10px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) var(--gray-100);
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
  :root {
    --glass-background: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(0, 0, 0, 0.3);
    --border-light: rgba(0, 0, 0, 0.2);
    --text-muted: var(--gray-700);
  }
  
  .ambient-orb {
    opacity: 0.1;
  }
}

/* ===== DARK MODE PREPARATION ===== */
@media (prefers-color-scheme: dark) {
  /* This would be implemented if dark mode is needed */
  /* For now, we maintain light theme */
}

/* ===== SELECTION STYLING ===== */
::selection {
  background: var(--primary-200);
  color: var(--primary-900);
}

::-moz-selection {
  background: var(--primary-200);
  color: var(--primary-900);
}

/* ===== FORM VALIDATION STYLES ===== */
.field-error {
  color: var(--rose-500);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  animation: fadeIn 0.3s ease;
}

.form-error {
  color: var(--rose-500);
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid var(--rose-500);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
  animation: shake 0.5s ease;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* Use hardware acceleration for animations */
.order-book-container,
.feature-card,
.portfolio-stat-card,
.exec-simulator {
  transform: translateZ(0);
}

/* ===== SAFE AREA INSETS FOR MOBILE ===== */
@supports (padding: max(0px)) {
  .container {
    padding-left: max(var(--container-padding), env(safe-area-inset-left));
    padding-right: max(var(--container-padding), env(safe-area-inset-right));
  }
  
  .navbar {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* ===== REDUCED DATA MODE ===== */
@media (prefers-reduced-data: reduce) {
  .ambient-orb {
    display: none;
  }
  
  .exec-simulator__progress-fill::after {
    display: none;
  }
}

/* ===== BROWSER SPECIFIC FIXES ===== */
/* Safari iOS specific */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }
  
  .form-input,
  .form-select {
    font-size: 16px; /* Prevents zoom on focus */
  }
}

/* Edge/IE specific */
@supports (-ms-ime-align: auto) {
  .glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: none;
  }
}

/* ===== FALLBACK STYLES ===== */
.no-js .hero-label .label-pulse {
  display: none;
}

.no-js .ambient-orb {
  display: none;
}

.fallback-mode {
  filter: grayscale(0.3);
}

.fallback-mode::before {
  content: "Some interactive features may be limited";
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--amber-500);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  z-index: 1000;
}

/* ===== COMPONENT VARIATIONS ===== */
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
}

.btn-ghost:hover {
  background: var(--bg-glass);
  border-color: var(--primary-600);
  color: var(--primary-600);
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary-600), var(--purple-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

/* ===== GRID UTILITIES ===== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* ===== SPACING UTILITIES ===== */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

/* ===== VISIBILITY UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none;
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none;
  }
}

@media (min-width: 769px) {
  .hidden-desktop {
    display: none;
  }
}

/* ===== FINAL OPTIMIZATIONS ===== */
.optimized-rendering {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.smooth-rendering {
  image-rendering: auto;
}

/* Ensure all interactive elements have proper cursor */
button,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn {
  cursor: pointer;
}

button:disabled,
[role="button"][aria-disabled="true"],
input:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* Improve text rendering */
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Social Links Styles */
.nav-social {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-right: 24px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #4f46e5;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    opacity: 0.7;
    text-decoration: none;
}

.social-link svg {
    display: block;
}

.mobile-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 0 auto 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(79, 70, 229, 0.2);
    max-width: 200px;
}

.mobile-social .social-link {
    width: 44px;
    height: 44px;
}

/* Footer Social Links */
.footer-social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 16px auto;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #4f46e5;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.footer-social-link:hover {
    opacity: 0.7;
    text-decoration: none;
}

.footer-social-link svg {
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-social {
        display: none;
    }
    
    .mobile-social {
        display: flex;
    }
}

@media (min-width: 769px) {
    .mobile-social {
        display: none;
    }
}

/* End of CSS */