/* ==========================================================================
   MOONLIST DESIGN SYSTEM - PROFESSIONAL FINTECH & CRYPTO PROTOCOL
   (DEFAULT: LIGHT MODE | CLEAN SOLID PALETTE | NO GRADIENTS | MOBILE OPTIMIZED)
   ========================================================================== */

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

/* ==========================================================================
   THEME VARIABLES - DEFAULT: LIGHT MODE
   ========================================================================== */
:root {
    /* Brand Colors */
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --primary-border: #C7D2FE;
    
    --accent: #059669;
    --accent-light: #ECFDF5;
    --accent-border: #A7F3D0;
    
    --cyan: #0284C7;
    --cyan-light: #F0F9FF;
    --cyan-border: #BAE6FD;
    
    --red: #E11D48;
    --red-light: #FFF1F2;
    --red-border: #FECDD3;
    
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --warning-border: #FDE68A;

    /* Light Theme Surfaces (Default) */
    --bg-page: #FFFFFF;
    --bg-page-secondary: #F8FAFC;
    --bg-elevated: #FFFFFF;
    --card-bg: #FFFFFF;
    --card-bg-hover: #F8FAFC;
    
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #64748B;
    
    --border: #E2E8F0;
    --border-hover: #CBD5E1;
    --border-active: #4F46E5;
    --navbar-bg: #FFFFFF;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
}

/* Dark Theme Overrides */
html.dark-theme, body.dark-theme {
    --primary: #6366F1;
    --primary-hover: #4F46E5;
    --primary-light: #1E1B4B;
    --primary-border: #3730A3;
    
    --accent: #10B981;
    --accent-light: #064E3B;
    --accent-border: #047857;
    
    --cyan: #38BDF8;
    --cyan-light: #082F49;
    --cyan-border: #0369A1;
    
    --red: #F43F5E;
    --red-light: #4C0519;
    --red-border: #9F1239;
    
    --warning: #F59E0B;
    --warning-light: #451A03;
    --warning-border: #92400E;

    --bg-page: #0B0F19;
    --bg-page-secondary: #111827;
    --bg-elevated: #161F30;
    --card-bg: #111827;
    --card-bg-hover: #161F30;
    
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --border: #1F2937;
    --border-hover: #374151;
    --border-active: #6366F1;
    --navbar-bg: #0B0F19;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
}

body.dark-theme {
    color-scheme: dark;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 15px;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   AMBIENT BACKGROUND CANVAS & ANIMATIONS
   ========================================================================== */
.bg-animation-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

#crypto-bg-canvas {
    width: 100%;
    height: 100%;
    display: block;
    opacity: 0.7;
}

@keyframes crossDrift1 {
    0%, 100% { transform: translate(0, 0); opacity: 0.3; }
    50% { transform: translate(12px, -18px); opacity: 0.7; }
}

@keyframes crossDrift2 {
    0%, 100% { transform: translate(0, 0); opacity: 0.35; }
    50% { transform: translate(-18px, 20px); opacity: 0.75; }
}

/* Pulsing Solid Particle Nodes */
.bg-node {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.3;
}

.node-1 {
    top: 28%;
    left: 45%;
    animation: nodePulse 5s ease-in-out infinite;
}

.node-2 {
    top: 58%;
    right: 35%;
    background: var(--accent);
    animation: nodePulse 6s ease-in-out infinite 1.5s;
}

.node-3 {
    top: 78%;
    left: 15%;
    background: var(--cyan);
    animation: nodePulse 7s ease-in-out infinite 3s;
}

@keyframes nodePulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.6); opacity: 0.6; }
}

/* Clean Structured Card */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

body.dark-theme .glass-card {
    background: rgba(17, 24, 39, 0.82);
}

.glass-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

/* Offline Banner */
.offline-indicator {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--warning-light);
    color: var(--warning);
    border-bottom: 1px solid var(--warning-border);
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 6px;
    z-index: 3000;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar {
    padding: 14px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 2000;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.dark-theme .navbar {
    background: rgba(11, 15, 25, 0.88);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    border-radius: 6px;
}

.logo .moon {
    color: var(--text-primary);
    font-weight: 800;
}

.logo .list {
    color: var(--primary);
    font-weight: 800;
}

/* Center Links */
.nav-center-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-item:hover {
    color: var(--text-primary);
}

.nav-pill-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary-border);
}

/* Section Switcher in Navbar */
.nav-section-switcher {
    display: flex;
    gap: 3px;
    padding: 3px;
    background: var(--bg-page-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.section-chip {
    padding: 5px 12px;
    border-radius: 4px;
    background: transparent;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.section-chip:hover {
    color: var(--text-primary);
}

.section-chip.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-toggle {
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    color: var(--primary);
}

.theme-toggle svg {
    width: 17px;
    height: 17px;
}

/* Theme icon toggling */
body.dark-theme .sun-icon { display: block; }
body.dark-theme .moon-icon { display: none; }
body:not(.dark-theme) .sun-icon { display: none; }
body:not(.dark-theme) .moon-icon { display: block; }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--bg-page-secondary);
}

.btn-primary-sm {
    background: var(--primary);
    color: #FFFFFF;
    padding: 7px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--primary);
    transition: all 0.15s ease;
}

.btn-primary-sm:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    z-index: 2100;
    gap: 4px;
}

.menu-toggle .bar {
    width: 16px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: 0.2s ease;
}

.menu-toggle.active .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.active .bar:nth-child(2) { opacity: 0; }
.menu-toggle.active .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile Menu */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2040;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.nav-menu {
    position: fixed;
    top: 70px;
    right: -110%;
    width: 280px;
    max-height: calc(100vh - 90px);
    background: var(--bg-elevated);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 2050;
    transition: 0.25s ease;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.nav-menu.active {
    right: 16px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
}

.nav-link:hover {
    background: var(--primary-light);
    border-color: var(--primary-border);
    color: var(--primary);
}

/* ==========================================================================
   BUTTONS & CTAs
   ========================================================================== */
.btn-primary {
    background: var(--primary);
    color: #FFFFFF;
    border: 1px solid var(--primary);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14.5px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--card-bg-hover);
    border-color: var(--border-hover);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    padding: 120px 0 70px;
    position: relative;
    background: transparent;
    border-bottom: 1px solid var(--border);
}

.hero .container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 48px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.035em;
    margin-bottom: 18px;
    color: var(--text-primary);
}

.hero-highlight-text {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 16.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 540px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

/* Hero Key Investor Metrics Bar */
.hero-stats-panel {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 3px;
}

.stat-value.highlight {
    color: var(--accent);
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ==========================================================================
   HERO INTENT SOLVER & TERMINAL VISUAL
   ========================================================================== */
.hero-visual-container {
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
}

.intent-terminal-card {
    width: 100%;
    max-width: 440px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

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

.terminal-dots {
    display: flex;
    gap: 5px;
}

.terminal-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dot-red { background: #EF4444; }
.dot-yellow { background: #F59E0B; }
.dot-green { background: #10B981; }

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.terminal-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 4px;
    border: 1px solid var(--primary-border);
}

.terminal-body {
    padding: 20px;
}

/* Intent Input Box */
.intent-prompt-box {
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prompt-icon {
    color: var(--primary);
    font-size: 16px;
}

.prompt-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-primary);
    flex: 1;
    word-break: break-word;
}

.prompt-cursor {
    display: inline-block;
    width: 6px;
    height: 13px;
    background: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Solver Route Flow */
.route-solver-flow {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    position: relative;
}

.solver-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-page);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 500;
    gap: 8px;
}

.solver-node.active {
    border-color: var(--accent-border);
    background: var(--accent-light);
}

.node-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.node-icon-circle {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 13px;
}

.node-icon-circle.emerald {
    color: var(--accent);
}

.node-right {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
}

.route-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -4px 0;
    color: var(--text-muted);
    font-size: 10px;
}

/* Terminal Footer Meta */
.terminal-footer-meta {
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shield-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent);
}

.execution-time {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
}

/* Floating metric pills */
.floating-metric-card {
    position: absolute;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    z-index: 3;
}

.float-top-right {
    top: -12px;
    right: -16px;
}

.float-bottom-left {
    bottom: -12px;
    left: -16px;
}

.metric-pill-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.metric-pill-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   INSTITUTIONAL PARTNERS ECOSYSTEM MATRIX
   ========================================================================== */
.ecosystem-section {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.ecosystem-header {
    text-align: center;
    margin-bottom: 20px;
}

.ecosystem-tag {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.ecosystem-marquee {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.eco-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.eco-item:hover {
    border-color: var(--border-hover);
}

.eco-item img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.eco-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================================
   BENTO GRID - CORE CAPABILITIES
   ========================================================================== */
.bento-section {
    padding: 80px 0 60px;
    position: relative;
    background: transparent;
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 44px;
}

.section-headline {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-secondary);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bento-card {
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.bento-card.col-span-2 {
    grid-column: span 2;
}

.bento-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 16px;
}

.bento-icon-box.cyan {
    background: var(--cyan-light);
    border-color: var(--cyan-border);
    color: var(--cyan);
}

.bento-icon-box.emerald {
    background: var(--accent-light);
    border-color: var(--accent-border);
    color: var(--accent);
}

.bento-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.bento-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.bento-preview-widget {
    margin-top: 18px;
    padding: 12px 14px;
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   ARCHITECTURE SECTION
   ========================================================================== */
.architecture-section {
    padding: 70px 0;
    background: transparent;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.arch-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 28px;
}

.arch-step-card {
    padding: 20px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    z-index: 1;
    transition: all 0.2s ease;
}

body.dark-theme .arch-step-card {
    background: rgba(22, 31, 48, 0.78);
}

.arch-step-card:hover {
    border-color: var(--border-hover);
}

.arch-step-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 10px;
}

.arch-step-card h4 {
    font-size: 15.5px;
    font-weight: 700;
    margin-bottom: 6px;
}

.arch-step-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ==========================================================================
   AI SWAP & INTENT DEMO SECTION
   ========================================================================== */
.ai-swap-section {
    padding: 80px 0;
    position: relative;
    background: transparent;
}

.ai-swap-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 44px;
    align-items: center;
}

.ai-swap-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.ai-swap-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 26px;
}

.ai-swap-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ai-swap-feat-item {
    display: flex;
    gap: 12px;
}

.ai-swap-feat-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
}

.ai-swap-feat-text h5 {
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ai-swap-feat-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Swap Card */
.ai-swap-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.swap-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.swap-header-title {
    font-weight: 700;
    font-size: 16px;
}

.swap-input-group {
    background: var(--bg-page-secondary);
    border-radius: var(--radius-md);
    padding: 14px;
    border: 1px solid var(--border);
}

.swap-label {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: block;
    font-weight: 600;
}

.swap-val-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.swap-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.swap-token {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-elevated);
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--text-primary);
}

.swap-arrow {
    width: 32px;
    height: 32px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -12px auto;
    position: relative;
    z-index: 2;
    border: 1px solid var(--border);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.swap-arrow:hover {
    border-color: var(--border-hover);
    color: var(--primary);
}

.ai-status-bar {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

/* ==========================================================================
   LIVE MARKET INTELLIGENCE HUB
   ========================================================================== */
.market-preview {
    padding: 70px 0 60px;
    position: relative;
    background: transparent;
    border-top: 1px solid var(--border);
}

.trending-dashboard {
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

body.dark-theme .trending-dashboard {
    background: rgba(17, 24, 39, 0.76);
}

.trending-scroll-container {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.trending-scroll-container::-webkit-scrollbar { display: none; }

.trending-grid {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    width: 100%;
}

.trending-grid.animate {
    animation: scroll-left 32s linear infinite;
    width: max-content;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.trending-card {
    min-width: 95px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.trending-card:hover {
    border-color: var(--border-hover);
}

.trending-card img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

/* Market Table */
.market-table {
    padding: 12px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    min-height: 500px;
    position: relative;
    z-index: 1;
}

body.dark-theme .market-table {
    background: rgba(17, 24, 39, 0.8);
}

.table-header, .table-row {
    display: grid;
    grid-template-columns: 45px 2.2fr 1.2fr 1.2fr 1.4fr;
    padding: 12px 14px;
    align-items: center;
}

.table-header {
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-row {
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: var(--radius-sm);
}

.table-row:hover {
    background: var(--bg-page-secondary);
}

.table-row .token {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-info-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.token-info-text strong {
    font-size: 13.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.token-info-text small {
    color: var(--text-muted);
    font-size: 11.5px;
}

.price {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 13px;
}

.change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 600;
}

.up { color: var(--accent); }
.down { color: var(--red); }

@keyframes flashGreen { 0% { color: var(--accent); } 100% { color: var(--text-primary); } }
@keyframes flashRed { 0% { color: var(--red); } 100% { color: var(--text-primary); } }
.flash-green { animation: flashGreen 0.8s ease-out; }
.flash-red { animation: flashRed 0.8s ease-out; }

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   DEVELOPER & INSTITUTIONAL API CTA
   ========================================================================== */
.dev-banner-section {
    padding: 60px 0;
    background: transparent;
}

.dev-cta-card {
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 32px;
    align-items: center;
}

.dev-cta-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.code-snippet-card {
    background: #0B0F19;
    border: 1px solid #1F2937;
    border-radius: var(--radius-md);
    padding: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11.5px;
    color: #94A3B8;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.code-snippet-card .keyword { color: #F43F5E; }
.code-snippet-card .fn { color: #38BDF8; }
.code-snippet-card .str { color: #34D399; }

/* ==========================================================================
   MODALS, AUTH & MOON VOYAGER CARD
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2999;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.auth-modal, .token-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.96);
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    width: 95%;
    max-width: 400px;
    padding: 28px 24px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.auth-modal.active, .token-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: 0.15s ease;
    z-index: 10;
}

.modal-close:hover {
    border-color: var(--border-hover);
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-group input, .form-group select, #ai-chat-input {
    width: 100%;
    background: var(--bg-page-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    color: var(--text-primary);
    outline: none;
    font-size: 14.5px;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

.form-group input:focus, #ai-chat-input:focus {
    border-color: var(--primary);
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    background: #FFFFFF;
    color: #1E293B;
    border: 1px solid #CBD5E1;
    transition: all 0.15s ease;
}

.google-btn:hover {
    background: #F8FAFC;
    border-color: #94A3B8;
}

/* Voyager ID Card */
.moon-card {
    background: #0F172A;
    border: 1px solid #334155;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    color: #FFFFFF;
    text-align: left;
}

.moon-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.moon-card .card-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13px;
}

.moon-card .card-logo img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.verified-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
}

.moon-card .mission-status {
    font-size: 9.5px;
    color: #94A3B8;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.moon-card h2 {
    font-size: 17px;
    font-weight: 800;
    margin-bottom: 14px;
}

.moon-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #1E293B;
    padding-top: 10px;
}

.moon-id-box .label {
    display: block;
    font-size: 9px;
    color: #64748B;
}

.moon-id-box .value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
    font-weight: 700;
}

.card-brand-footer {
    font-size: 9.5px;
    color: #64748B;
}

/* ==========================================================================
   AI HUB & CHAT OVERLAY
   ========================================================================== */
.ai-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--primary);
    border: 1px solid var(--primary);
    cursor: pointer;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: 0.15s ease;
}

.ai-fab:hover {
    background: var(--primary-hover);
}

.ai-chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
}

.ai-chat-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ai-chat-card {
    width: 100%;
    max-width: 480px;
    height: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.ai-chat-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg-page-secondary);
}

.ai-message, .user-message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    line-height: 1.5;
}

.ai-message {
    background: var(--bg-elevated);
    align-self: flex-start;
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 2px;
}

.user-message {
    background: var(--primary);
    align-self: flex-end;
    color: #FFFFFF;
    border-bottom-right-radius: 2px;
}

.ai-chat-actions {
    padding: 8px 18px;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.ai-chat-actions::-webkit-scrollbar { display: none; }

.ai-quick-btn {
    white-space: nowrap;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ai-quick-btn:hover {
    color: var(--text-primary);
    border-color: var(--primary);
}

.ai-chat-input-container {
    padding: 14px 18px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    padding: 60px 0 32px;
    border-top: 1px solid var(--border);
    background: var(--bg-page-secondary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
    max-width: 280px;
}

.footer-col h4 {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* ==========================================================================
   VIEW CONTROLLER
   ========================================================================== */
html.route-coin #market, 
html.route-coin #features, 
html.route-coin .hero, 
html.route-coin .why-moonlist,
html.route-coin .ecosystem-section,
html.route-coin .bento-section,
html.route-coin .architecture-section,
html.route-coin .ai-swap-section,
html.route-coin .dev-banner-section,
body.on-coin-page #market, 
body.on-coin-page #features, 
body.on-coin-page .hero, 
body.on-coin-page .why-moonlist,
body.on-coin-page .ecosystem-section,
body.on-coin-page .bento-section,
body.on-coin-page .architecture-section,
body.on-coin-page .ai-swap-section,
body.on-coin-page .dev-banner-section {
    display: none !important;
}

html.route-market #coin-page, 
body.on-market-page #coin-page {
    display: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE & TABLET EXCELLENCE)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 36px;
    }
    
    .hero-content {
        align-items: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 28px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bento-card.col-span-2 {
        grid-column: span 2;
    }
    
    .arch-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ai-swap-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .dev-cta-card {
        grid-template-columns: 1fr;
        padding: 32px 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .menu-toggle { display: flex; }
    
    .navbar {
        padding: 8px 0;
    }
    .logo {
        font-size: 16px;
        gap: 6px;
    }
    .logo img {
        width: 24px;
        height: 24px;
    }
    .nav-actions {
        gap: 6px;
    }
    .theme-toggle {
        width: 32px;
        height: 32px;
    }
    .theme-toggle svg {
        width: 15px;
        height: 15px;
    }
    .menu-toggle {
        width: 32px;
        height: 32px;
    }
    .menu-toggle .bar {
        width: 15px;
    }
    .btn-primary-sm {
        padding: 6px 12px;
        font-size: 12px;
    }
    .btn-ghost {
        padding: 6px 10px;
        font-size: 13px;
    }
    .nav-menu {
        top: 54px;
        width: 260px;
    }

    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 72px 0 40px;
    }
    
    .hero-title {
        font-size: 32px;
        line-height: 1.18;
    }
    
    .hero-subtitle {
        font-size: 15px;
    }
    
    .hero-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .hero-stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 14px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .floating-metric-card {
        display: none;
    }
    
    .bento-section,
    .architecture-section,
    .ai-swap-section,
    .market-preview,
    .dev-banner-section {
        padding: 48px 0;
    }
    
    .section-headline,
    .ai-swap-title,
    .dev-cta-title {
        font-size: 26px;
    }
    
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    .bento-card.col-span-2 {
        grid-column: span 1;
    }
    
    .bento-card {
        padding: 20px 16px;
    }
    
    .arch-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .arch-step-card {
        padding: 16px;
    }
    
    .ai-swap-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .ai-swap-card {
        padding: 18px 16px;
    }
    
    .swap-val {
        font-size: 18px;
    }
    
    .table-header, .table-row {
        grid-template-columns: 28px 1.8fr 1fr 1fr;
        padding: 10px 8px;
    }
    
    .table-header span:last-child, 
    .table-row span:last-child {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
