/* ==============================================================================
   KIWIDO — Home Screen / Landing Page Styles (Inspired by 02ee.jpg)
   Theme: Deep Royal Purple / Cosmic Indigo with Neon Spotlight Glows
   ============================================================================== */

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

:root {
  --home-bg: #000000;
  --home-card-bg: rgba(11, 7, 24, 0.90);
  --home-card-border: rgba(192, 132, 252, 0.30);
  --home-text-primary: #FFFFFF;
  --home-text-secondary: #CBD5E1;
  --home-text-muted: #94A3B8;
  --home-purple-primary: #A855F7;
  --home-purple-light: #C084FC;
  --home-purple-vibrant: #D8B4FE;
  --home-purple-glow: rgba(192, 132, 252, 0.55);
  --home-font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --home-font-display: 'Outfit', sans-serif;
  --home-font-mono: 'JetBrains Mono', monospace;
}

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

body.home-page {
  background-color: #020005;
  color: var(--home-text-primary);
  font-family: var(--home-font-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ==============================================================================
   Luminous Light Purple & Pure Black Looping Animated Background
   ============================================================================== */
.bg-animated-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #020005;
}

/* 1. Procedural 60fps Light Purple Smoke & Stardust Canvas */
.bg-smoke-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
  opacity: 0.95;
  mix-blend-mode: screen;
}

/* 2. Primary Luminous Light Purple Smoke Layer (Looping Drift & Breath) */
.smoke-layer-primary {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: url('/static/images/purple_smoke_bg.png') center center / cover no-repeat;
  mix-blend-mode: screen;
  opacity: 0.85;
  z-index: 2;
  will-change: transform, opacity;
  animation: purpleSmokeFlow1 22s ease-in-out infinite alternate;
}

/* 3. Secondary Counter-Drifting Purple Smoke Layer (Morphing Swirl) */
.smoke-layer-secondary {
  position: absolute;
  top: -15%;
  left: -15%;
  width: 130%;
  height: 130%;
  background: url('/static/images/purple_smoke_bg.png') 60% 40% / cover no-repeat;
  transform: scaleX(-1) rotate(180deg);
  mix-blend-mode: lighten;
  opacity: 0.45;
  z-index: 3;
  will-change: transform, opacity;
  animation: purpleSmokeFlow2 30s ease-in-out infinite alternate;
}

/* 4. Ambient Floating Light Purple, Lavender & Lilac Glowing Orbs */
.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px);
  will-change: transform, opacity;
  pointer-events: none;
}

.ambient-orb-1 {
  top: -10%;
  right: 5%;
  width: 760px;
  height: 760px;
  background: radial-gradient(circle, rgba(192, 132, 252, 0.45) 0%, rgba(168, 85, 247, 0.22) 40%, rgba(126, 34, 206, 0.05) 70%, transparent 80%);
  z-index: 4;
  animation: orbFloat1 18s ease-in-out infinite alternate;
}

.ambient-orb-2 {
  bottom: -15%;
  left: 5%;
  width: 860px;
  height: 860px;
  background: radial-gradient(circle, rgba(216, 180, 254, 0.38) 0%, rgba(147, 51, 234, 0.20) 45%, rgba(88, 28, 135, 0.05) 70%, transparent 80%);
  z-index: 4;
  animation: orbFloat2 24s ease-in-out infinite alternate;
}

.ambient-orb-3 {
  top: 32%;
  left: 45%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(232, 121, 249, 0.28) 0%, rgba(192, 132, 252, 0.14) 40%, transparent 70%);
  z-index: 4;
  animation: orbFloat3 16s ease-in-out infinite alternate;
}

/* 5. Pure Black Vignette Frame (Guarantees Pitch Black Edges & Contrast) */
.vignette-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse 90% 85% at 50% 50%, transparent 40%, rgba(2, 0, 5, 0.45) 72%, rgba(0, 0, 0, 0.88) 100%);
  z-index: 5;
  pointer-events: none;
}

/* Infinite Looping Animations */
@keyframes purpleSmokeFlow1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
    opacity: 0.75;
  }
  50% {
    transform: translate3d(24px, -18px, 0) scale(1.08) rotate(1.4deg);
    opacity: 0.95;
  }
  100% {
    transform: translate3d(-20px, 16px, 0) scale(1.04) rotate(-1deg);
    opacity: 0.80;
  }
}

@keyframes purpleSmokeFlow2 {
  0% {
    transform: translate3d(0, 0, 0) scaleX(-1) rotate(180deg) scale(1);
    opacity: 0.35;
  }
  50% {
    transform: translate3d(-32px, 22px, 0) scaleX(-1) rotate(182deg) scale(1.10);
    opacity: 0.58;
  }
  100% {
    transform: translate3d(22px, -24px, 0) scaleX(-1) rotate(178deg) scale(1.03);
    opacity: 0.40;
  }
}

@keyframes orbFloat1 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate3d(-55px, 45px, 0) scale(1.15);
    opacity: 1;
  }
  100% {
    transform: translate3d(35px, -28px, 0) scale(0.92);
    opacity: 0.7;
  }
}

@keyframes orbFloat2 {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate3d(65px, -40px, 0) scale(1.18);
    opacity: 0.95;
  }
  100% {
    transform: translate3d(-45px, 28px, 0) scale(0.95);
    opacity: 0.65;
  }
}

@keyframes orbFloat3 {
  0% {
    transform: translate3d(0, 0, 0) scale(0.9);
    opacity: 0.5;
  }
  50% {
    transform: translate3d(-35px, -25px, 0) scale(1.22);
    opacity: 0.85;
  }
  100% {
    transform: translate3d(28px, 35px, 0) scale(1);
    opacity: 0.55;
  }
}

/* Completely disabled skewed side beams that cause ghosting & blotchy patches */
.spotlight-beam-left,
.spotlight-beam-right {
  display: none !important;
}

/* Navbar */
.landing-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px;
}

.nav-brand-badge-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.nav-logo-badge-img {
  height: 48px;
  width: auto;
  max-width: 175px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.6)) drop-shadow(0 0 8px rgba(56, 189, 248, 0.5));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease;
}

.nav-brand-badge-link:hover .nav-logo-badge-img {
  transform: scale(1.06) translateY(-1px);
  filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.85)) drop-shadow(0 0 14px rgba(56, 189, 248, 0.75));
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #FFFFFF;
}

.nav-logo-icon-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.6)) drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.nav-brand:hover .nav-logo-icon-img {
  transform: scale(1.08);
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.85)) drop-shadow(0 0 10px rgba(56, 189, 248, 0.7));
}

.nav-brand-text-wrap {
  display: flex;
  flex-direction: column;
}

.nav-brand-text {
  font-family: var(--home-font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, #FFFFFF 60%, #C4B5FD 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.nav-brand-subtext {
  font-family: var(--home-font-main);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #A5B4FC;
  opacity: 0.85;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #FFFFFF;
  text-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-demo-pill {
  padding: 10px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-demo-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  margin: 32px auto 0 auto;
  padding: 0 20px;
}

.trending-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 30px;
  background: rgba(26, 18, 51, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-size: 12px;
  color: #C4B5FD;
  margin-bottom: 24px;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.trending-pill-tag {
  color: #94A3B8;
  font-weight: 600;
}

.hero-title {
  font-family: var(--home-font-display);
  font-size: 56px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: #FFFFFF;
  margin-bottom: 18px;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: 16px;
  color: #94A3B8;
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.btn-hero-demo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.btn-hero-demo:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.btn-hero-start {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, #7C3AED, #A855F7);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.45);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hero-start:hover {
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.7);
  transform: translateY(-2px);
}

/* Floating AI Central Glow Badge */
.floating-ai-badge-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  margin-bottom: -28px;
  z-index: 30;
}

.floating-ai-badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(145deg, #130B24, #080414);
  border: 1.5px solid rgba(134, 68, 198, 0.48);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--home-font-display);
  font-weight: 800;
  font-size: 18px;
  color: #FFFFFF;
  box-shadow: 0 0 22px rgba(134, 68, 198, 0.45), inset 0 0 8px rgba(134, 68, 198, 0.28);
  animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(134, 68, 198, 0.4), inset 0 0 8px rgba(134, 68, 198, 0.24); }
  50% { box-shadow: 0 0 32px rgba(134, 68, 198, 0.65), inset 0 0 12px rgba(134, 68, 198, 0.45); }
}

/* Embedded Console Preview Container */
.preview-console-wrapper {
  position: relative;
  z-index: 20;
  max-width: 1240px;
  margin: 0 auto 60px auto;
  padding: 0 16px;
}

.preview-console-card {
  background: rgba(6, 4, 14, 0.94);
  border: 1px solid rgba(147, 51, 234, 0.24);
  border-radius: 24px;
  box-shadow: 0 25px 70px -10px rgba(0, 0, 0, 0.98), 0 0 40px rgba(134, 68, 198, 0.16);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  z-index: 10;
}

/* Console Top Header */
.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(12, 8, 25, 0.70);
}

.console-header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.console-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--home-font-display);
  font-weight: 800;
  font-size: 16px;
  color: #FFFFFF;
}

.console-logo-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6)) drop-shadow(0 0 4px rgba(56, 189, 248, 0.5));
}

.console-nav-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.console-nav-tabs a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.console-nav-tabs a:hover,
.console-nav-tabs a.active {
  color: #FFFFFF;
  font-weight: 600;
}

.console-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #94A3B8;
}

.console-chip {
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.console-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8644C6, #BE185D);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #FFFFFF;
}

/* Console Ticker Chips Strip */
.console-tickers-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: rgba(4, 2, 10, 0.80);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow-x: auto;
}

.ticker-mini-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-family: var(--home-font-mono);
  white-space: nowrap;
}

.ticker-mini-chip .chip-name {
  color: #CBD5E1;
}

.ticker-mini-chip .chip-change.green {
  color: #10B981;
}

.ticker-mini-chip .chip-change.red {
  color: #F43F5E;
}

/* Console Main Body Grid */
.console-body-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 520px;
}

/* Left Sidebar */
.console-sidebar {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(6, 4, 16, 0.55);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.console-search-box {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
  font-size: 12px;
  outline: none;
}

.console-search-box::placeholder {
  color: #64748B;
}

.console-menu-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.console-menu-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748B;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.console-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 6px;
  color: #94A3B8;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.console-menu-item:hover,
.console-menu-item.active {
  background: rgba(124, 58, 237, 0.10);
  color: #FFFFFF;
}

/* Console Workspace Canvas */
.console-workspace {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(4, 2, 10, 0.35);
}

/* Account Summary Banner */
.account-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0E0921;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 16px;
  padding: 18px 24px;
}

.summary-metric-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.metric-label {
  font-size: 11px;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-val {
  font-family: var(--home-font-mono);
  font-size: 24px;
  font-weight: 800;
  color: #FFFFFF;
}

.metric-badge {
  font-size: 11px;
  font-weight: 700;
  color: #10B981;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* 4-Mode AGI Smart Trading Presets (Image Buttons) */
.home-presets-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: center;
}

.home-preset-img-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.85;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s ease, opacity 0.25s ease;
}

.home-preset-img-btn:hover {
  opacity: 1;
  transform: translateY(-3px) scale(1.03);
  filter: drop-shadow(0 10px 22px rgba(168, 85, 247, 0.6)) brightness(1.06);
}

.home-preset-img-btn.active {
  opacity: 1;
  transform: translateY(-2px) scale(1.03);
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.85)) drop-shadow(0 6px 16px rgba(134, 68, 198, 0.45));
}

.home-preset-graphic {
  width: 100%;
  max-width: 210px;
  height: auto;
  display: block;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

@media (max-width: 900px) {
  .home-presets-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Portfolio Tabs & Timeframe Bar */
.portfolio-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.portfolio-tabs {
  display: flex;
  gap: 20px;
  list-style: none;
}

.portfolio-tab-btn {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding-bottom: 8px;
  position: relative;
  transition: color 0.2s ease;
}

.portfolio-tab-btn.active {
  color: #FFFFFF;
}

.portfolio-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  right: 0;
  height: 2px;
  background: #8644C6;
  border-radius: 2px;
  box-shadow: 0 0 6px #8644C6;
}

.timeframe-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.025);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.tf-btn {
  background: none;
  border: none;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tf-btn.active {
  background: rgba(124, 58, 237, 0.22);
  color: #FFFFFF;
}

/* Interactive Performance Area Chart */
.chart-card {
  position: relative;
  height: 240px;
  width: 100%;
}

#landingChartCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .console-body-grid {
    grid-template-columns: 1fr;
  }
  .console-sidebar {
    display: none;
  }
  .hero-title {
    font-size: 40px;
  }
}
