/* ==========================================================================
   UX Trader - Landing Page Design System
   Modern Dark Theme • Glassmorphism • Trading Aesthetics
   ========================================================================== */

:root {
  --bg-main: #060912;
  --bg-surface: #0c101a;
  --bg-card: rgba(16, 22, 34, 0.75);
  --bg-card-hover: rgba(22, 30, 48, 0.85);

  --primary: #26a69a;
  --primary-glow: rgba(38, 166, 154, 0.4);
  --primary-gradient: linear-gradient(135deg, #26a69a 0%, #1f8e83 100%);

  --accent-blue: #1f6feb;
  --accent-cyan: #38bdf8;
  --accent-red: #ef5350;

  --text-main: #f0f4f8;
  --text-muted: #8b949e;
  --text-light: #c9d1d9;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(38, 166, 154, 0.4);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
}

/* Global Reset & Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

section[id],
div[id].ticker-tape-wrapper {
  scroll-margin-top: 96px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: #4db6ac;
}

/* Ambient Background Lights */
.ambient-glow-1 {
  position: absolute;
  top: -100px;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(38, 166, 154, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

.ambient-glow-2 {
  position: absolute;
  top: 400px;
  right: 5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(31, 111, 235, 0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(80px);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.ux-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  padding: 16px 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  background: transparent;
}

.ux-navbar.scrolled {
  background: rgba(6, 9, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.navbar-brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.navbar-brand-logo img {
  height: 32px;
  width: 32px;
  border-radius: 8px;
  box-shadow: 0 0 12px var(--primary-glow);
}

.nav-link-custom {
  color: var(--text-light) !important;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 14px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  letter-spacing: 0.2px;
}

.nav-link-custom:hover {
  color: #ffffff !important;
}

.nav-link-custom.active,
.ux-navbar .navbar-nav .nav-link.active {
  color: var(--primary) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 14px rgba(38, 166, 154, 0.55);
}

.nav-link-custom.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 12px;
  right: 12px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 4px;
  box-shadow: 0 0 12px var(--primary-glow), 0 0 4px var(--primary);
}

/* Language Dropdown */
.lang-dropdown-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-light);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.lang-dropdown-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.dropdown-menu-dark-custom {
  background: #101622;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  padding: 6px;
  min-width: 140px;
}

.dropdown-item-custom {
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.dropdown-item-custom:hover,
.dropdown-item-custom.active {
  background: rgba(38, 166, 154, 0.15);
  color: var(--primary);
}

/* Primary CTA Button */
.btn-trading-primary {
  background: var(--primary-gradient);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px var(--primary-glow);
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-trading-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(38, 166, 154, 0.6);
  color: #ffffff;
}

.btn-trading-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 22px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-trading-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 140px 0 80px;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(38, 166, 154, 0.1);
  border: 1px solid rgba(38, 166, 154, 0.25);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  margin-bottom: 24px;
}

.hero-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
}

.hero-title {
  font-size: clamp(2.3rem, 5vw, 3.8rem);
  line-height: 1.15;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #ffffff 30%, #b0bac9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 34px;
  max-width: 580px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.stat-item h3 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}

.stat-item p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

/* Hero Terminal Mockup Card */
.terminal-preview-card {
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(38, 166, 154, 0.15);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease;
}

.terminal-preview-card:hover {
  transform: translateY(-4px);
}

.terminal-header {
  background: #080c14;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dot.red {
  background: #ff5f56;
}

.window-dot.yellow {
  background: #ffbd2e;
}

.window-dot.green {
  background: #27c93f;
}

.terminal-symbol-tag {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-symbol-tag .tag-badge {
  background: rgba(38, 166, 154, 0.15);
  color: var(--primary);
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 4px;
}

.terminal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chart-canvas-container {
  height: 200px;
  width: 100%;
  position: relative;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.chart-live-price-float {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(14, 20, 30, 0.8);
  border: 1px solid var(--border-active);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.terminal-trade-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-mock-sell {
  background: rgba(239, 83, 80, 0.15);
  border: 1px solid rgba(239, 83, 80, 0.4);
  color: #ef5350;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.btn-mock-sell:hover {
  background: rgba(239, 83, 80, 0.25);
}

.btn-mock-buy {
  background: rgba(38, 166, 154, 0.15);
  border: 1px solid rgba(38, 166, 154, 0.4);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.btn-mock-buy:hover {
  background: rgba(38, 166, 154, 0.25);
}

.demo-order-notice {
  display: none;
  align-items: center;
  gap: 8px;
  background: rgba(18, 26, 40, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.78rem;
  color: #cdd3dc;
  animation: fadeInNotice 0.3s ease;
}

.demo-order-notice.show {
  display: flex;
}

@keyframes fadeInNotice {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Ticker Tape (Marquee en Vivo)
   ========================================================================== */
.ticker-tape-wrapper {
  background: #090d16;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  gap: 40px;
  width: max-content;
  animation: marqueeScroll 35s linear infinite;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.ticker-sym {
  color: #ffffff;
}

.ticker-price {
  font-family: monospace;
  color: var(--text-light);
  transition: color 0.3s;
}

.ticker-price.flash-up {
  color: #26a69a !important;
}

.ticker-price.flash-down {
  color: #ef5350 !important;
}

.ticker-change {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}

.ticker-change.up {
  background: rgba(38, 166, 154, 0.15);
  color: #26a69a;
}

.ticker-change.down {
  background: rgba(239, 83, 80, 0.15);
  color: #ef5350;
}

/* ==========================================================================
   Sección de Mercados Globales
   ========================================================================== */
.markets-section {
  padding: 60px 0 80px;
  position: relative;
}

.market-tabs-wrapper {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.market-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.market-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.market-filter-btn.active {
  background: rgba(38, 166, 154, 0.15);
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow);
}

.market-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.market-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 20px rgba(38, 166, 154, 0.1);
}

.market-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.market-card-sym {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.market-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.market-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  border: 1px solid var(--border-subtle);
}

.market-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 10px 0 14px;
}

.market-card-price {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: monospace;
  color: #ffffff;
  transition: color 0.3s;
}

.market-card-price.flash-up {
  color: #26a69a !important;
}

.market-card-price.flash-down {
  color: #ef5350 !important;
}

.market-card-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 14px;
}

.spec-item {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.spec-item strong {
  display: block;
  font-size: 0.82rem;
  color: var(--text-light);
}

.market-card-action {
  margin-top: auto;
}

.btn-market-trade {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  background: rgba(38, 166, 154, 0.1);
  border: 1px solid rgba(38, 166, 154, 0.3);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-market-trade:hover {
  background: var(--primary);
  color: #060912;
  box-shadow: 0 0 12px var(--primary-glow);
}

/* ==========================================================================
   Feature Cards
   ========================================================================== */
.section-tag {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
  display: inline-block;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto 50px;
}

.feature-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 32px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4), 0 0 20px rgba(38, 166, 154, 0.1);
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(38, 166, 154, 0.1);
  border: 1px solid rgba(38, 166, 154, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 20px;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon-wrapper {
  transform: scale(1.1);
  box-shadow: 0 0 15px var(--primary-glow);
}

.feature-card h4 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ==========================================================================
   Terminal Deep Dive Section
   ========================================================================== */
.terminal-section {
  padding: 100px 0;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(13, 20, 32, 0.6) 0%, transparent 80%);
}

.check-feature-list {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.check-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
  color: var(--text-light);
}

.check-feature-list li i {
  color: var(--primary);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   B2B & White Label Section
   ========================================================================== */
.b2b-section {
  padding: 90px 0;
  background: #090e18;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.b2b-card {
  background: rgba(16, 22, 34, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  gap: 16px;
  transition: border-color 0.2s;
}

.b2b-card:hover {
  border-color: rgba(31, 111, 235, 0.5);
}

.b2b-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(31, 111, 235, 0.15);
  border: 1px solid rgba(31, 111, 235, 0.3);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ==========================================================================
   FAQ Section (Accordion)
   ========================================================================== */
.faq-section {
  padding: 100px 0;
}

.accordion-item-custom {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px !important;
  margin-bottom: 14px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.accordion-button-custom {
  background: transparent !important;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 20px 24px;
  box-shadow: none !important;
}

.accordion-button-custom::after {
  filter: invert(1);
}

.accordion-body-custom {
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 0 24px 20px;
  line-height: 1.65;
}

/* ==========================================================================
   Final CTA Banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(135deg, rgba(38, 166, 154, 0.15) 0%, rgba(31, 111, 235, 0.12) 100%);
  border: 1px solid var(--border-active);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.ux-footer {
  background: #04060c;
  border-top: 1px solid var(--border-subtle);
  padding: 60px 0 30px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-risk-warning {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 16px;
  font-size: 0.78rem;
  color: #717b88;
  line-height: 1.5;
  margin-top: 40px;
}

/* Reveal Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Utilities & Mobile Enhancements */
@media (max-width: 991.98px) {

  /* Mobile / Tablet Collapsible Navbar */
  .navbar-collapse {
    background: rgba(12, 16, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 20px;
    margin-top: 14px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
  }

  .nav-link-custom {
    padding: 12px 16px !important;
    border-radius: 8px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: block;
  }

  .nav-link-custom.active,
  .ux-navbar .navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background: rgba(38, 166, 154, 0.12) !important;
    border-left: 3px solid var(--primary) !important;
    padding-left: 20px !important;
    font-weight: 700 !important;
    box-shadow: inset 0 0 15px rgba(38, 166, 154, 0.08);
  }

  .nav-link-custom.active::after {
    display: none;
  }

  .navbar-collapse .header-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
  }

  .navbar-collapse .header-actions .lang-dropdown-btn,
  .navbar-collapse .header-actions .btn-trading-primary {
    width: 100%;
    justify-content: center;
  }

  .hero-section {
    padding: 120px 0 60px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-stats {
    justify-content: center;
    gap: 24px;
  }

  .terminal-preview-card {
    margin-top: 36px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 767.98px) {
  .hero-title {
    font-size: 2.15rem;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    justify-content: center;
  }

  .stat-item {
    min-width: 0;
  }

  .stat-item h3 {
    font-size: 1.35rem;
  }

  .cta-banner {
    padding: 40px 20px;
  }

  .feature-card {
    padding: 24px 18px;
  }

  .market-tabs-wrapper {
    gap: 6px;
  }

  .market-filter-btn {
    font-size: 0.8rem;
    padding: 6px 14px;
  }
}

@media (max-width: 575.98px) {
  .hero-section {
    padding: 100px 0 40px;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.2;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero-stats .stat-item {
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group a,
  .btn-trading-primary,
  .btn-trading-outline {
    width: 100%;
    justify-content: center;
  }

  .chart-canvas-container {
    height: 170px;
  }

  .terminal-trade-bar {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .btn-mock-sell,
  .btn-mock-buy {
    font-size: 0.78rem;
    padding: 8px;
  }

  .navbar-brand-logo {
    font-size: 1.1rem;
  }

  .navbar-brand-logo img {
    height: 28px;
    width: 28px;
  }

  .ticker-track {
    gap: 24px;
  }

  .market-card {
    padding: 16px;
  }

  .market-card-price {
    font-size: 1.25rem;
  }

  .footer-risk-warning {
    font-size: 0.72rem;
    padding: 12px;
  }
}

/* ==========================================================================
   Legal Pages (Términos, Privacidad, Riesgo)
   ========================================================================== */

.legal-header {
  padding-top: 130px;
  padding-bottom: 50px;
  background: radial-gradient(circle at 50% 0%, rgba(38, 166, 154, 0.12) 0%, transparent 60%);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(38, 166, 154, 0.1);
  border: 1px solid rgba(38, 166, 154, 0.3);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.legal-badge.warning {
  background: rgba(255, 179, 0, 0.1);
  border-color: rgba(255, 179, 0, 0.35);
  color: #ffb300;
}

.legal-badge.danger {
  background: rgba(239, 83, 80, 0.1);
  border-color: rgba(239, 83, 80, 0.35);
  color: var(--accent-red);
}

.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 12px;
}

.legal-sidebar {
  position: sticky;
  top: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.legal-sidebar-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: var(--text-light);
  font-size: 0.88rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.legal-nav-link:hover,
.legal-nav-link.active {
  background: rgba(38, 166, 154, 0.12);
  color: var(--primary);
  transform: translateX(4px);
}

.legal-other-docs {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.legal-content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 36px 40px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.legal-section {
  margin-bottom: 40px;
  scroll-margin-top: 120px;
}

.legal-section:last-child {
  margin-bottom: 0;
}

.legal-section-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(38, 166, 154, 0.15);
  color: var(--primary);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
}

.legal-text {
  color: #c9d1d9;
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-list {
  padding-left: 20px;
  margin-bottom: 16px;
  color: #c9d1d9;
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-list li {
  margin-bottom: 8px;
}

.legal-alert {
  background: rgba(38, 166, 154, 0.08);
  border: 1px solid rgba(38, 166, 154, 0.25);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  color: #e6edf3;
  font-size: 0.92rem;
  line-height: 1.65;
}

.legal-alert.danger {
  background: rgba(239, 83, 80, 0.08);
  border: 1px solid rgba(239, 83, 80, 0.25);
  border-left: 4px solid var(--accent-red);
}

.legal-alert.warning {
  background: rgba(255, 179, 0, 0.08);
  border: 1px solid rgba(255, 179, 0, 0.25);
  border-left: 4px solid #ffb300;
}

@media (max-width: 991px) {
  .legal-content-card {
    padding: 24px 20px;
  }

  .legal-sidebar {
    position: static;
    margin-bottom: 30px;
  }
}

/* ==========================================================================
   Demo & Public Solicitud Modal Styles
   ========================================================================== */
.demo-modal-content {
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(38, 166, 154, 0.12);
  color: #fff;
}

.demo-input {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-size: 0.92rem;
  padding: 10px 14px;
  transition: all 0.25s ease;
}

.demo-input:focus {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 14px var(--primary-glow) !important;
  color: #fff !important;
}

.demo-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.demo-modal-content .input-group-text {
  border-radius: 10px 0 0 10px !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  border-right: none !important;
}

.demo-modal-content .input-group .demo-input {
  border-radius: 0 10px 10px 0 !important;
}

.demo-modal-content .input-group .country-select {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  border-right: none !important;
}

.demo-modal-content .input-group .country-select + input,
.demo-modal-content .input-group .custom-select-compact + input {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.demo-modal-content .input-group .custom-select-compact .custom-search-select-btn {
  border-top-left-radius: 10px !important;
  border-bottom-left-radius: 10px !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-right: none !important;
}

.demo-modal-content .input-group .custom-select-flex-fill .custom-search-select-btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: 10px !important;
  border-bottom-right-radius: 10px !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.demo-modal-content .form-select,
.demo-modal-content .custom-search-select-btn {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='rgba%28255,255,255,0.6%29' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
  background-position: right 0.75rem center !important;
  background-size: 13px 9px !important;
  background-repeat: no-repeat !important;
  padding-right: 2rem !important;
}

.demo-modal-content select.demo-input option {
  background-color: #0e1526;
  color: #ffffff;
  padding: 8px 12px;
}

/* ==========================================================================
   Custom Search Select Component (Bootstrap 5 & Dark Theme Integration)
   ========================================================================== */
.custom-search-select-wrapper {
  position: relative;
}

.custom-search-select-wrapper.custom-select-compact {
  max-width: 120px !important;
  width: 120px !important;
  flex: 0 0 120px !important;
}

.custom-search-select-wrapper.custom-select-flex-fill {
  flex: 1 1 auto !important;
  width: 1% !important;
  min-width: 0 !important;
}

.custom-search-select-btn {
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}

.custom-select-dropdown {
  background: rgba(13, 20, 36, 0.98) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(38, 166, 154, 0.15) !important;
  padding: 8px !important;
  margin-top: 6px !important;
  color: #fff !important;
  z-index: 1085 !important;
}

.custom-select-search-container {
  position: sticky;
  top: 0;
  background: rgba(13, 20, 36, 0.98);
  padding: 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.custom-select-search-input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 7px 11px;
  font-size: 0.85rem;
}

.custom-select-search-input:focus {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 10px var(--primary-glow) !important;
  color: #fff !important;
}

.custom-select-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.custom-select-options-list {
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.custom-select-options-list::-webkit-scrollbar {
  width: 5px;
}
.custom-select-options-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
}
.custom-select-options-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.custom-select-options-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.custom-select-item {
  display: block;
  width: 100%;
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  font-size: 0.88rem;
  border-radius: 8px;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: normal;
  line-height: 1.35;
}

.custom-select-item:hover,
.custom-select-item:focus {
  background: rgba(38, 166, 154, 0.18) !important;
  color: #fff !important;
}

.custom-select-item.is-selected {
  background: rgba(38, 166, 154, 0.28) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.custom-select-empty {
  text-align: center;
  padding: 16px 8px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.84rem;
}

/* ==========================================================================
   Cookie Consent Banner (Diseño Cinematic Dark idéntico a UpdatePWA)
   ========================================================================== */
.cookie-consent-container {
  position: fixed;
  z-index: 999999;
  bottom: 24px;
  right: 24px;
  max-width: 420px;
  width: calc(100vw - 32px);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  animation: cookieSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.cookie-consent-container.cookie-consent-exit {
  animation: cookieSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media (max-width: 768px) {
  .cookie-consent-container {
    bottom: 20px;
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    margin: 0 auto;
  }
}

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cookieSlideDown {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
}

@keyframes cookiePulseGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(38, 166, 154, 0.4);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(38, 166, 154, 0);
  }
}

.cookie-consent-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.96) 0%, rgba(10, 14, 22, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(38, 166, 154, 0.3);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(38, 166, 154, 0.15);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  color: #f0f3f8;
}

.cookie-card-glow {
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38, 166, 154, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.cookie-orbital-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(38, 166, 154, 0.2) 0%, rgba(33, 150, 243, 0.15) 100%);
  border: 1px solid rgba(38, 166, 154, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #26a69a;
  font-size: 20px;
  animation: cookiePulseGlow 2.5s infinite;
  flex-shrink: 0;
}

.cookie-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #26a69a;
  box-shadow: 0 0 8px #26a69a;
}

.cookie-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #26a69a;
  text-transform: uppercase;
}

.cookie-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #f0f3f8;
}

.cookie-desc {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #9aa2b1;
}

.cookie-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 2px;
}

.cookie-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #26a69a 0%, #1e8e84 100%);
  color: #ffffff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(38, 166, 154, 0.35);
}

.cookie-btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(38, 166, 154, 0.5);
}

.cookie-btn-essential {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 500;
}

.cookie-btn-essential:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.22);
}

.cookie-footer-link {
  text-align: center;
  font-size: 11px;
  margin-top: -2px;
}

.cookie-footer-link a {
  color: #6e7681;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cookie-footer-link a:hover {
  color: #26a69a;
  text-decoration: underline;
}