@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* SENKAI - RETRO PIXEL THEME */
:root {
    /* Senkai Light Mode Palette */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-elevated: #E9ECEF;

    /* Palette: Blue (#094BC5), Green (#06AE06), Cream (#FEFFF9) -> Dark Text */
    --accent-primary: #094BC5;
    /* Retro Blue */
    --accent-secondary: #06AE06;
    /* Retro Green */
    --accent-tertiary: #111111;
    /* Dark Text Accent */
    --accent-glow: rgba(9, 75, 197, 0.15);
    /* Softer glow for light mode */

    --text-primary: #111111;
    /* Dark Grey/Black */
    --text-secondary: #4B5563;
    /* Mid Grey */
    --text-muted: #6B7280;
    /* Light Grey */

    --border-subtle: #E5E7EB;
    --border-visible: #094BC5;


    --font-display: 'Press Start 2P',
        cursive;
    --font-sans: 'Inter',
        system-ui,
        sans-serif;
    --font-mono: 'JetBrains Mono',
        monospace;

    /* Easing */
    --ease-out: cubic-bezier(0.19, 1, 0.22, 1);
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.logo,
.section-title {
    font-family: var(--font-display);
    letter-spacing: -0.06em !important;
    text-transform: uppercase;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    /* Critical for mobile */
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

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

/* Grid Overlay */
.grid-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.3;
}

.hidden {
    display: none !important;
}

/* ============================================
   MOBILE MENU RESPONSIVE
   ============================================ */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* Above overlay */
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s;
}

@media (max-width: 900px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        justify-content: space-between;
    }

    /* Demo Card Optimization */
    .demo-card {
        padding: 1rem;
        min-height: auto;
    }

    .demo-content {
        height: auto;
        min-height: 300px;
    }

    /* Chat Simulation Fixes */
    .chat-message {
        padding: 0.5rem 0.8rem;
        /* Tighter padding */
        font-size: 0.85rem;
        /* Smaller font */
        margin-bottom: 0.5rem;
        max-width: 90%;
        /* Allow more width */
    }

    .chat-interface {
        height: 300px;
        /* Fixed height container for scroll */
    }

    .chat-messages {
        padding: 0.5rem;
        /* Less padding */
    }

    .chat-input-mock {
        padding: 0.6rem;
        min-height: auto;
    }

    /* Terminal Text Fixes */
    .chat-line,
    .log-entry {
        font-size: 0.75rem;
        /* Smaller monospace */
        padding: 2px 4px;
        margin-bottom: 4px;
        white-space: normal;
        /* Allow wrap */
        word-break: break-all;
    }

    .demo-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    /* Agent Command Center Mobile Fixes */
    .agent-command-center {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: auto;
        width: 100%;
        overflow: hidden;
        /* Prevent ANY child overflow */
    }

    .agent-modules {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        /* Strict 50% split */
        gap: 0.5rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .module-card:last-child {
        grid-column: span 2;
    }

    .module-card {
        width: 100%;
        min-width: 0;
        padding: 0.6rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        overflow: hidden;
    }

    .module-val {
        font-size: 0.75rem;
        white-space: normal !important;
        word-break: break-all;
        line-height: 1.1;
    }

    /* Logs fix */
    .agent-terminal {
        width: 100%;
        height: auto;
        min-height: 150px;
        overflow-y: auto;
        overflow-x: hidden;
        display: flex;
        flex-direction: column;
    }

    .term-content .log-entry {
        line-height: 1.4;
        margin-bottom: 6px;
        white-space: normal !important;
        word-wrap: break-word !important;
        word-break: break-all !important;
        width: 100%;
        max-width: 100%;
    }

    /* Copy Settings Modal Mobile */
    .copy-settings-popup {
        width: 90%;
        padding: 1rem;
    }

    .copy-settings-popup h3 {
        font-size: 1rem;
    }

    .copy-row {
        font-size: 0.9rem;
    }

    /* Crypto List/Wallet Mobile */
    .crypto-row {
        padding: 0.5rem;
    }

    .crypto-info h4 {
        font-size: 0.9rem;
    }

    .crypto-info span {
        font-size: 0.75rem;
    }

    .crypto-price {
        font-size: 0.9rem;
    }

    /* Ensure popups don't overflow */
    .wallet-popup,
    .sim-yield-popup {
        width: auto;
        min-width: auto;
        max-width: 90%;
        left: 50%;
        transform: translateX(-50%);
    }
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

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

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    width: 80%;
}

.mobile-link {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.mobile-divider {
    height: 1px;
    background: var(--border-subtle);
    width: 100%;
}

@media (max-width: 900px) {

    .nav-links,
    .nav-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav {
        justify-content: space-between;
    }
}

/* ============================================
   HEADER
   ============================================ */
.header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1140px;
    padding: 1rem 1.5rem;
    /* Revert padding */
    z-index: 100;
    border-radius: 0 !important;
    /* Force square */
    background: #FFF9E5;
    /* Retro Beige */
    border: 3px solid #000000 !important;
    /* Hard Border */
    box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 1) !important;
    /* Hard Black Shadow */
    transition: all 0.2s ease;
}

/* Title Bar - REMOVED */
/* Window Controls - REMOVED */


.header.scrolled {
    background: var(--bg-primary);
    /* Sync with body bg */
    border-color: #000000;
    box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 1) !important;
    top: 24px;
    /* Keep position */
    max-width: 1140px;
    /* Keep width, DO NOT expand */
    border-radius: 0 !important;
    padding: 1rem 1.5rem;
}

/* Pixel Texture Animation */
.pixel-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* Behind content, same level as grid */
    opacity: 0.05;
    background-image:
        radial-gradient(var(--text-primary) 1px, transparent 1px),
        radial-gradient(var(--text-primary) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    animation: pixelMove 8s infinite ease-in-out alternate;
}

@keyframes pixelMove {
    0% {
        background-position: 0 0, 30px 30px;
    }

    100% {
        background-position: 10px 10px, 40px 40px;
    }
}

.nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0;
    /* Container padding handled by header */
}

.nav-links {
    display: flex;
    gap: 2rem;
    margin: 0;
    justify-content: flex-start;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    grid-column: 2;
    margin: 0 auto;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    grid-column: 3;
    justify-content: flex-end;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.6rem;
    /* Smaller pixel text */
    font-family: var(--font-display);
    /* Pixel Font */
    text-transform: uppercase;
    transition: color 0.2s;
    letter-spacing: 0.05em;
}

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

.btn {
    padding: 0.6rem 1rem;
    /* Smaller padding */
    font-family: var(--font-display);
    /* Pixel Font */
    font-size: 0.7rem;
    /* Smaller font */
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    border: 3px solid #000000;
    /* Hard Black Border */
    background: #FFFFFF;
    color: #000000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0;
    /* Strict square */
    box-shadow: 4px 4px 0 0 #000000;
    /* Hard Shadow */
    position: relative;
    margin: 4px;
    /* Space for shadow */
}

.btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0 0 #000000;
}

.btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 #000000;
}

.btn-ghost {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: none;
}

.btn-ghost:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 4px 4px 0 0 var(--accent-primary);
    transform: translate(-1px, -1px);
}

.btn-accent {
    background: var(--accent-primary);
    color: #FFFFFF;
    border-color: #000000;
}

.btn-accent:hover {
    background: var(--accent-secondary);
    /* Gold/Green Hover */
    box-shadow: 6px 6px 0 0 #000000;
}

.btn-full {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    background: #FFFFFF;
    border: 3px solid var(--accent-primary);
    color: var(--accent-primary);
    font-family: var(--font-display);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 0;
    cursor: pointer;
    box-shadow: 6px 6px 0 0 rgba(0, 0, 0, 0.1);
    /* Lighter shadow for full width */
    transition: all 0.1s;
}

.btn-full:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 0 rgba(0, 0, 0, 0.1);
}

.btn-full:hover {
    background: var(--accent-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 74, 62, 0.2);
}

/* ============================================
   HERO
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
    /* Soften canvas pattern */
}

.hero-gradient {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: radial-gradient(circle at center, transparent 0%, var(--bg-primary) 70%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    /* User specified 48px */
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 2rem;
    color: var(--accent-primary);
    /* Deep Green */
}

.reveal-text {
    opacity: 0;
    /* Animated by GSAP */
    transform: translateY(30px);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    opacity: 0;
    /* Animated */
    transform: translateY(20px);
}

.badge {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 99px;
    color: var(--text-secondary);
}

.badge-solana {
    border-color: #9945FF;
    color: #9945FF;
    /* Darker Purple for Light BG */
    background: rgba(153, 69, 255, 0.05);
    font-weight: 600;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--border-visible);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
}

.wheel {
    width: 4px;
    height: 6px;
    background: var(--text-secondary);
    border-radius: 2px;
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(12px);
        opacity: 0;
    }
}

/* ============================================
   FEATURES (HORIZONTAL SCROLL)
   ============================================ */
/* Main Pin Container */
.scroll-pin-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
}

/* Wrapper for the scrolling content (Masked) */
.features-wrapper {
    width: 100%;
    height: 100%;
    flex: 1;
    /* Hide the slide track */
    overflow: hidden;
    /* Fade out content on the left (under the sidebar) */
    mask-image: linear-gradient(to right, transparent 0px, transparent 350px, black 500px, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0px, transparent 350px, black 500px, black 100%);
}

/* Track that moves left */
.features-track {
    display: flex;
    width: 400%;
    /* 4 Panels */
    height: 100%;
}

.feature-stepper {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 2rem;
    display: flex;
    flex-direction: column;
    /* Vertical */
    align-items: flex-start;
    gap: 0;
    /* Handled by dividers */
    width: auto;
    z-index: 50;
    pointer-events: none;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    opacity: 0.3;
    transition: all 0.5s var(--ease-out);
    padding: 1rem 0;
}

.step-item.active {
    opacity: 1;
}

/* Circles & SVGs */
.step-circle {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    position: relative;
    z-index: 2;
    color: var(--text-primary);
}

.circle-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(90deg);
    /* Rotate for flat side on left/right if needed, or 30deg */
}

.shape-active {
    stroke: var(--accent-primary);
    stroke-width: 2.5;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s var(--ease-out);
    transform-origin: center;
    fill: rgba(0, 212, 170, 0.05);
    /* Subtle fill */
}

.shape-inactive {
    stroke: #333;
    /* Darker grey for inactive */
    opacity: 1;
    transition: all 0.3s;
}

/* ============================================
   HORIZONTAL SCROLL SECTION
   ============================================ */
.horizontal-scroll-wrapper {
    position: relative;
    /* Height defined in JS or arbitrary tall height for scroll length */
    height: 500vh;
    z-index: 10;
}

.scroll-pin-container {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-primary);
}

.features-wrapper {
    position: relative;
    height: 100%;
    will-change: transform;
}

/* Active State Transformations */
/* Base States */
.shape-active {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
    transform-origin: center;
}

.shape-inactive {
    opacity: 1;
    transform: scale(1);
    transition: all 0.4s ease;
    transform-origin: center;
}

/* Active Overrides */
.step-item.active .shape-active {
    opacity: 1;
    transform: scale(1);
    filter: drop-shadow(0 0 8px rgba(0, 212, 170, 0.4));
}

.step-item.active .shape-inactive {
    opacity: 0;
}

.step-item.active .step-num {
    color: var(--accent-primary);
}

/* Labels & Info */
.step-info {
    display: none;
    flex-direction: column;
    margin-left: 0.5rem;
}

.step-item.active .step-info {
    display: flex;
    animation: fadeInRight 0.4s forwards;
}

.step-title {
    font-size: 1.4rem;
    font-weight: 700;
    /* Bold */
    line-height: 1;
    margin-bottom: 0.4rem;
    color: var(--accent-primary);
    /* Deep Green */
}

.step-dots {
    display: flex;
    gap: 4px;
    margin-bottom: 0.25rem;
}



.step-dots span {
    width: 24px;
    height: 3px;
    background: rgba(0, 0, 0, 0.3);
    /* Dark Grey for Inactive */
    border-radius: 2px;
}

.step-dots span.active {
    background: var(--accent-primary);
}

.step-count {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.step-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.step-item.active .step-label {
    display: none;
}

/* Spacers */
.step-divider {
    width: 1px;
    height: 40px;
    background: var(--border-subtle);
    margin-left: 32px;
    /* Center with 64px icon */
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

/* Track that moves left */
.features-track {
    display: flex;
    width: 400%;
    /* 4 Panels */
    height: 100%;
}

.feature-panel {
    width: 100vw;
    height: 100vh;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-subtle);
    position: relative;
}

.feature-container {
    display: flex;
    /* Switch to Flexbox for better control with earlier rules */
    /* grid-template-columns: 1fr 1fr; removed */
    gap: 4rem;
    align-items: center;
    padding-left: 350px;
    /* Clear the vertical sidebar */
    width: 100%;
}

.overline {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.body-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.feature-list {
    list-style: none;
    color: var(--text-secondary);
}

.feature-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-list li::before {
    content: '→';
    color: var(--accent-primary);
}

/* Demo Cards (Light Mode Glass) */
.demo-card {
    background: #FFFFFF;
    /* Opaque White */
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.25rem;
    /* Reduced padding for wider content */
    box-shadow: 0 12px 32px rgba(45, 74, 62, 0.08);

    /* Greenish Shadow */
    transition: transform 0.3s;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    width: 100%;
    /* Force full width, NO CAP */
}

.demo-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

/* Demo: Terminal & Tabs */
.demo-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.tab {
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s;
    text-transform: uppercase;
}

.tab.active {
    color: var(--accent-primary);
    border-bottom: 2px solid var(--accent-primary);
    margin-bottom: -0.6rem;
    /* Overlap border */
}

/* Interactive Demo Styles */
.demo-content {
    display: none;
    animation: fadeIn 0.3s ease;
    height: 350px;
    flex-direction: column;
}

.demo-content.active {
    display: flex;
}

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

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

/* Chat UI */
/* Chat UI */
.chat-interface {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
    overflow: hidden;
    transition: opacity 0.3s;
}

.chat-interface.hidden {
    display: none;
    opacity: 0;
}

.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    padding: 0 0.5rem;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.chat-messages::-webkit-scrollbar {
    display: none;
}

/* New Message Row Layout */
.message-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: 85%;
}

.message-row.user {
    align-self: flex-end;
    flex-direction: row-reverse;
    /* Avatar on right */
}

.message-row.ai {
    align-self: flex-start;
    flex-direction: row;
    /* Avatar on left */
}

/* Avatar Styling */
.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.message-row.user .message-avatar {
    background: var(--accent-primary);
    color: #000;
}

.message-row.ai .message-avatar {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
}

/* Bubble Styling */
.message-bubble {
    padding: 0.8rem 1rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message-row.user .message-bubble {
    background: var(--accent-primary);
    color: #FFFFFF;
    border: 1px solid transparent;
    border-bottom-right-radius: 4px;
}

.message-row.ai .message-bubble {
    background: rgba(45, 74, 62, 0.05);
    /* Green Tint */
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-bottom-left-radius: 4px;
}

.typing-indicator {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-style: italic;
    opacity: 0;
    transition: opacity 0.3s;
}

.typing-indicator.active {
    opacity: 1;
}

/* Dashboard UI */


.dashboard-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Working Status (Blue) */
.working-status,
.training-status {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Slightly more gap */
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1;
    /* Fix vertical alignment */
}

/* Ensure no weird margins on children */
.working-status span,
.training-status span {
    display: inline-block;
    padding-top: 1px;
    /* Micro-adjustment for visual center */
}

.text-working {
    color: #00D4AA;
    /* Cyan/Blue */
    text-shadow: 0 0 5px rgba(0, 212, 170, 0.4);
}

.loading-spinner-blue {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(0, 212, 170, 0.3);
    border-top: 2px solid #00D4AA;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Terminal Stats Footer */
.terminal-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 0.8rem;
    margin-top: auto;
    /* Push to bottom */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.75rem;
}

.stat-item {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.stat-item .label {
    color: #888;
}

.stat-item .value {
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    /* CRITICAL: Aligns digits */
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 5px var(--accent-primary);
    animation: pulse 1.5s infinite;
}

/* Social Dashboard - Prevent Overflow */
.social-dashboard {
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Virtual Cursor - Natural Movement */
.virtual-cursor {
    position: absolute;
    top: 50%;
    left: 50%;
    pointer-events: none;
    z-index: 999;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
    transition: top 0.8s cubic-bezier(0.22, 1, 0.36, 1), left 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.1s;
    /* Custom Bezier for "Human-like" ease-out */
}

/* Setup Modal - Better Centering */
.setup-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #FFFFFF;
    /* White Background */
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    border-radius: 12px;
    z-index: 100;
    width: 280px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    /* Dark Text */
}

.modal-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    /* Grey Text */
}

.modal-row span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.modal-btn {
    margin-top: 1rem;
    background: var(--accent-primary);
    color: #fff;
    padding: 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    text-transform: uppercase;
}

/* Compact Mode Tweaks */
.whale-alert.compact {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-bottom: none;
    background: transparent;
}

.whale-alert.compact .whale-icon {
    font-size: 1.2rem;
}

.whale-alert.compact .whale-action {
    font-size: 0.6rem;
    padding: 0.2rem 0.4rem;
    opacity: 0.7;
}

.terminal-mini {
    flex: 1;
    overflow-y: hidden;
    /* Prevent internal scroll bar during demo */
    background: #0F1713;
    /* Very Dark Green / Black */
    border: 1px solid var(--border-visible);
    border-radius: 8px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #0f0;
    overflow: hidden;
    position: relative;
}

.growth-stats {
    padding: 0.5rem;
    background: #131313;
    /* Dark Background */
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: #fff;
}

.growth-main {
    font-size: 1.6rem;
    margin-top: 0.2rem;
    font-weight: 800;
    /* Color will be set by JS, but default should be dark if neutral */
    color: #fff;
    text-shadow: none;
    /* Remove glow on light bg */
}

/* Stepper Pixel Font */
.step-num,
.step-label {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.step-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: -0.02em;
    /* Tighter letter spacing */
    font-size: 20px;
}

.log-line {
    margin-bottom: 4px;
    /* Increased spacing */
    white-space: nowrap;
    opacity: 1;
    /* Full opacity */
    color: #4ade80;
    /* Bright Terminal Green */
    font-family: var(--font-mono);
}

/* Social Tab */
.social-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem;
    background: #FFFFFF;
    /* White Row */
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.social-item .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-right: 0.8rem;
}

.social-item .info {
    flex: 1;
}

.growth-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.growth-row .label {
    color: var(--text-muted);
    /* Grey */
}

.growth-row .value {
    font-weight: 700;
    color: var(--text-primary);
    /* Dark / Black */
}

.btn-small {
    padding: 0.3rem 0.6rem;
    background: var(--text-primary);
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
}

/* Backtest Tab */
.backtest-graph {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.graph-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 150px;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.g-bar {
    flex: 1;
    background: var(--bg-elevated);
    border-radius: 2px;
}

.g-bar.active {
    background: var(--accent-primary);
}

.backtest-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
}

.backtest-stats .stat {
    display: flex;
    flex-direction: column;
}

.backtest-stats .val {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
    /* Dark Text for Light Mode */
}

/* Audit Text */
.audit-text {
    display: flex;
    flex-direction: column;
}

.audit-text strong {
    font-weight: 600;
    font-size: 0.9rem;
}

.audit-text small {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Demo: Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.metric-item .label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
}

.metric-item .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
    /* Deep Green */
}

.chart-mockup {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding-top: 2rem;
}

.bar {
    flex: 1;
    background: #4b5563;
    /* Dark Grey for visibility */
    /* Inactive Bar */
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: all 0.5s ease;
}

.bar.active {
    background: var(--accent-primary);
    /* Deep Green */
    box-shadow: none;
}

/* Demo: Token Swap */
.glass-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.token-swap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.token-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.token-row.highlight {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.05);
}

.token-icon {
    font-weight: 600;
}

.btn-full {
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    /* Solid Deep Green */
    color: #FFFFFF;
    border: none;
    border-radius: 12px;
    /* Smooth rounded */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-full:hover {
    background: var(--accent-secondary);
    /* Gold Hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 163, 90, 0.3);
}

/* Demo: Audit */
.audit-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audit-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(45, 74, 62, 0.05);
    /* Green Tint */
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.audit-item .icon {
    color: var(--color-primary);
}

/* ============================================
   TRAINING SIMULATION (PANEL 2)
   ============================================ */
.training-simulation {
    background: #F8F6F1;
    /* Warm Cream */
    border: 1px solid var(--accent-primary);
    /* Green Border */
    overflow: hidden;
    position: relative;
    display: flex;
    /* Ensure center alignment */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(45, 74, 62, 0.08);
}

.sim-container {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-info {
    flex: 0 0 50%;
    /* Widen to 50% */
    padding-right: 2rem;
    /* Reduce padding */
    z-index: 2;
    min-width: 400px;
}

.feature-visual {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 0;
    /* Allow flex shrink if absolutely necessary */
}

/* 1. Central AI Brain */
.sim-brain {
    position: absolute;
    z-index: 10;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brain-core {
    width: 40px;
    height: 40px;
    background: var(--accent-primary);
    /* Deep Green */
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(45, 74, 62, 0.4);
    /* Soft Green Shadow */
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.brain-aura {
    position: absolute;
    inset: -10px;
    border: 2px solid var(--accent-primary);
    /* Yellow */
    border-radius: 50%;
    opacity: 0.5;
    animation: pulseAura 2s infinite;
}

/* 2. Squad Ring */
.sim-squad-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px dashed var(--accent-primary);
    /* Green Dashed */
    opacity: 0.3;
    border-radius: 50%;
    animation: spinRing 20s linear infinite;
}

.user-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--text-muted);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    /* Distribute around circle based on index --i */
    transform: rotate(calc(var(--i) * 45deg)) translate(110px) rotate(calc(var(--i) * -45deg));
    transition: all 0.5s ease;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.2);
}

.user-dot.active {
    background: var(--accent-primary);
    /* Yellow */
    box-shadow: 0 0 15px var(--accent-primary);
    transform: rotate(calc(var(--i) * 45deg)) translate(80px) rotate(calc(var(--i) * -45deg));
    /* Move closer */
}

/* 3. Data Beams */
.sim-data-beams {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.beam {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 4px;
    background: var(--accent-primary);
    /* Deep Green */
    border-radius: 50%;
    opacity: 0;
    transform: rotate(calc(var(--i) * 90deg)) translate(100px);
}

.beam.firing {
    animation: fireBeam 0.8s forwards;
}

/* 4. Yield Wave */
.sim-yield-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    z-index: 5;
}

.sim-yield-wave.active {
    animation: shockwave 1s ease-out forwards;
}

/* 5. Overlay Text */
.sim-overlay {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.sim-status-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

.sim-yield-popup {
    position: absolute;
    top: -150px;
    /* Above brain */
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-primary);
    text-shadow: 0 0 10px var(--accent-primary);
    opacity: 0;
    transition: all 0.3s;
}

.live-cursor:nth-child(1) {
    animation: cursorBusy1 8s infinite alternate;
    color: #ff00ff;
}

.live-cursor:nth-child(2) {
    animation: cursorBusy2 10s infinite linear;
    color: #00ffff;
}

.live-cursor:nth-child(3) {
    animation: cursorBusy3 7s infinite ease-in-out;
    color: #ffff00;
}

.live-cursor:nth-child(4) {
    animation: cursorBusy4 12s infinite ease-out;
    color: #ff3333;
}

.live-cursor:nth-child(5) {
    animation: cursorBusy5 9s infinite linear;
    color: #33ff33;
}

.live-cursor:nth-child(6) {
    animation: cursorBusy1 11s infinite reverse;
    color: #ffffff;
}

@keyframes cursorBusy1 {
    0% {
        top: 10%;
        left: 10%;
    }

    25% {
        top: 40%;
        left: 80%;
    }

    50% {
        top: 80%;
        left: 20%;
    }

    75% {
        top: 30%;
        left: 60%;
    }

    100% {
        top: 10%;
        left: 10%;
    }
}

@keyframes cursorBusy2 {
    0% {
        top: 90%;
        left: 90%;
    }

    33% {
        top: 20%;
        left: 50%;
    }

    66% {
        top: 60%;
        left: 10%;
    }

    100% {
        top: 90%;
        left: 90%;
    }
}

@keyframes cursorBusy3 {
    0% {
        top: 50%;
        left: 50%;
    }

    20% {
        top: 20%;
        left: 20%;
    }

    40% {
        top: 20%;
        left: 80%;
    }

    60% {
        top: 80%;
        left: 80%;
    }

    80% {
        top: 80%;
        left: 20%;
    }

    100% {
        top: 50%;
        left: 50%;
    }
}

@keyframes cursorBusy4 {
    0% {
        top: 10%;
        left: 90%;
    }

    50% {
        top: 90%;
        left: 10%;
    }

    100% {
        top: 10%;
        left: 90%;
    }
}

@keyframes cursorBusy5 {
    0% {
        top: 30%;
        left: 10%;
    }

    50% {
        top: 30%;
        left: 90%;
    }

    100% {
        top: 30%;
        left: 10%;
    }
}



.sim-yield-popup.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

/* ANIMATIONS */
@keyframes spinRing {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseAura {
    0% {
        transform: scale(0.9);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.6;
    }

    100% {
        transform: scale(0.9);
        opacity: 0.3;
    }
}

@keyframes fireBeam {
    0% {
        opacity: 1;
        transform: rotate(calc(var(--i) * 90deg)) translate(80px) scale(1);
    }

    100% {
        opacity: 0;
        transform: rotate(calc(var(--i) * 90deg)) translate(0px) scale(0.5);
    }
}

@keyframes shockwave {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
        border-width: 5px;
    }

    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        border-width: 0px;
    }
}

.hidden {
    display: none;
}

/* ============================================
   PREMIUM REACTOR VISUAL (PANEL 3)
   ============================================ */
.reactor-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 8rem;
    /* INCREASED to 8rem to clear the pills */
    display: flex;
    align-items: center;
    justify-content: center;
}

.reactor-core {
    width: 120px;
    height: 120px;
    background: #FFFFFF;
    /* White */
    border: 1px solid var(--border-visible);
    border-radius: 50%;
    /* Subtle Shadow only */
    box-shadow: 0 8px 24px rgba(45, 74, 62, 0.08);
    z-index: 10;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    /* Remove offset to center correctly */
}

.reactor-core::after {
    content: '';
    position: absolute;
    inset: 4px;
    /* Thin gap */
    border-radius: 50%;
    border: 1px dashed var(--border-subtle);
    /* Technical look */
    background: transparent;
}

.reactor-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 2, 0.2);
    box-shadow: 0 0 10px rgba(255, 255, 2, 0.1);
}

.reactor-ring.inner {
    width: 160px;
    height: 160px;
    border-top-color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    animation: spinClockwise 8s linear infinite;
}

.reactor-ring.outer {
    width: 200px;
    height: 200px;
    border: 1px solid var(--border-subtle);
    /* Clean border */
    animation: spinCounterClockwise 20s linear infinite;
    opacity: 0.6;
}

.reactor-details {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    text-align: center;
    margin-top: -10px;
    /* Micro adjustment since ring is large */
}

.reactor-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 800;
    color: #000;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    line-height: 1;
}

.reactor-label {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(0, 0, 0, 0.7);
    margin-top: 2px;
}

/* Status Indicators */
.reactor-status {
    position: absolute;
    bottom: -60px;
    /* Push lower */
    width: 100%;
    display: flex;
    justify-content: center;
    /* Center them */
    gap: 1rem;
    /* Space between pills */
    padding: 0 10px;
}

.status-pill {
    background: #FFFFFF;
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    /* Force single line */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.status-bean {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    /* Deep Green */
    box-shadow: 0 0 0 2px rgba(45, 74, 62, 0.2);
    /* Subtle Ring */
}

@keyframes coreBreathing {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 30px var(--accent-primary);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 50px var(--accent-primary);
    }
}

@keyframes spinClockwise {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spinCounterClockwise {
    to {
        transform: rotate(-360deg);
    }
}

/* ============================================
   MARKETPLACE SIMULATION (PANEL 4)
   ============================================ */
.market-visual-wrapper {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    /* Strict containment */
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Denser 3-col grid */
    gap: 8px;
    padding: 10px;
    opacity: 0.8;
}

.model-card {
    background: #FFFFFF;
    /* White */
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    /* Softer radius */
    padding: 12px;
    transition: all 0.2s;
    position: relative;
    cursor: default;
    height: 90px;
    /* Fixed height for density */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.model-card:hover,
.model-card.active {
    background: #F0FDF4;
    /* Very Light Green */
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(45, 74, 62, 0.1);
    z-index: 10;
}

.model-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.6rem;
    color: var(--text-muted);
}

.model-name {
    font-weight: 700;
    color: var(--text-primary);
    /* Dark Text */
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-stat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--color-primary);
    /* Deep Green */
    font-weight: 600;
}

/* Simulated Cursors */
.live-cursor {
    position: absolute;
    z-index: 50;
    pointer-events: none;
    transition: margin 0.1s;
    /* Ultra-light shadow or none */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.03));
    display: flex;
    /* Align pointer and tag */
    align-items: flex-start;
    gap: 4px;
}

.cursor-pointer {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 12px solid currentColor;
    transform: rotate(-25deg);
}

.cursor-tag {
    background: #F8F6F1;
    /* Cream */
    color: #1a1a1a;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    /* Minimal Shadow */
    margin-left: -5px;
    /* Pull tag closer */
    margin-top: 10px;
}

/* Constrained Animations - Strictly Inside Box */
.live-cursor:nth-child(1) {
    animation: cursorBusy1 8s infinite alternate;
    color: #FFB3BA;
    /* Pastel Pink */
}

.live-cursor:nth-child(2) {
    animation: cursorBusy2 10s infinite linear;
    color: #BAE1FF;
    /* Pastel Blue */
}

.live-cursor:nth-child(3) {
    animation: cursorBusy3 7s infinite ease-in-out;
    color: #FFFFBA;
    /* Pastel Yellow */
}

.live-cursor:nth-child(4) {
    animation: cursorBusy4 12s infinite ease-out;
    color: #FFDFBA;
    /* Pastel Orange */
}

.live-cursor:nth-child(5) {
    animation: cursorBusy5 9s infinite linear;
    color: #BAFFC9;
    /* Pastel Green */
}

.live-cursor:nth-child(6) {
    animation: cursorBusy1 11s infinite reverse;
    color: #E2F0CB;
    /* Pastel Lime */
}

@keyframes cursorBusy1 {
    0% {
        top: 10%;
        left: 10%;
    }

    50% {
        top: 70%;
        left: 70%;
    }

    100% {
        top: 20%;
        left: 40%;
    }
}

@keyframes cursorBusy2 {
    0% {
        top: 80%;
        left: 80%;
    }

    50% {
        top: 20%;
        left: 50%;
    }

    100% {
        top: 70%;
        left: 20%;
    }
}

@keyframes cursorBusy3 {
    0% {
        top: 40%;
        left: 20%;
    }

    50% {
        top: 10%;
        left: 80%;
    }

    100% {
        top: 60%;
        left: 60%;
    }
}

@keyframes cursorBusy4 {
    0% {
        top: 10%;
        left: 70%;
    }

    50% {
        top: 80%;
        left: 10%;
    }

    100% {
        top: 30%;
        left: 80%;
    }
}

@keyframes cursorBusy5 {
    0% {
        top: 50%;
        left: 10%;
    }

    50% {
        top: 20%;
        left: 90%;
    }

    100% {
        top: 80%;
        left: 50%;
    }
}

.stats-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 2rem;
}

.stat-value {
    display: block;
    font-size: 4rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   ROADMAP
   ============================================ */
.roadmap-section {
    padding: 8rem 0;
    background: var(--bg-primary);
}

.center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.mt-20 {
    margin-top: 5rem;
}

/* Stepper Navigation */
.feature-stepper {
    position: absolute;
    top: 50%;
    left: 4vw;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    z-index: 20;
    pointer-events: none;
    /* Let clicks pass through if needed, though buttons need events */
}

/* Ensure step items allow pointer events */
.step-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.3;
    transition: all 0.4s ease;
    cursor: pointer;
    min-width: 200px;
    /* Ensure space for labels */
}

.step-item.active {
    opacity: 1;
}

.step-item:hover {
    opacity: 0.8;
}

.step-circle {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(90deg);
    /* Start from top */
    overflow: visible;
}

.step-num {
    z-index: 2;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 5rem auto 0;
}

.timeline-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: 11px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    z-index: 2;
}

.timeline-dot.active {
    border-color: var(--accent-primary);
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

.timeline-content .phase {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-secondary);
}

/* ============================================
   CTA
   ============================================ */
.cta-section {
    padding: 10rem 0;
    position: relative;
    text-align: center;
    overflow: hidden;
}

.canvas-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at center, rgba(255, 255, 2, 0.05) 0%, var(--bg-primary) 70%);
}

.cta-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-content p {
    max-width: 600px;
    margin: 1rem auto 2rem;
}

.btn-large {
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   ROADMAP GRID LAYOUT
   ============================================ */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 3rem;
    position: relative;
}

.roadmap-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.roadmap-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0.5;
    transition: all 0.3s;
}

.roadmap-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.roadmap-card:hover::before {
    opacity: 1;
    width: 6px;
}

/* ============================================
   SCROLL REVEAL ANIMATION
   ============================================ */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.5, 0, 0, 1), transform 1s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

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

.roadmap-card {
    background: var(--accent-primary);
    /* Blue Background */
    border: 2px solid #FFFFFF;
    /* High contrast border */
    padding: 2rem;
    border-radius: 12px;
    height: 100%;
    transition: transform 0.3s;
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2);
    /* Pixel depth */
}

.roadmap-card:hover {
    transform: translateY(-5px);
}

.roadmap-phase {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #FFFFFF;
    /* White for contrast on blue */
    opacity: 0.8;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: block;
}

.roadmap-card h3 {
    font-family: var(--font-display);
    /* Pixel Font */
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #FFFFFF;
    /* White Text as per new user request image? No, user said "chữ xanh" (Green Title) but image had white title? User said "Green title". Wait, user request: "phần title chữ xanh . Background xanh dương. chữ màu trắng hết" -> Title Green, BG Blue, Text White. */
    /* Let's stick to user text: Title Green. */
    color: #06AE06;
    /* Green Title */
    text-shadow: 2px 2px 0 #000000;
    /* Ensure legibility on blue */
    line-height: 1.4;
}

.roadmap-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.roadmap-card li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 0.8rem;
    color: #FFFFFF;
    /* White Text */
    font-size: 0.95rem;
    font-weight: 500;
}

.roadmap-card li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: #06AE06;
    /* Green Bullet */
}

@media (max-width: 768px) {
    .roadmap-grid {
        grid-template-columns: 1fr;
    }
}

.footer {
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border-subtle);
    background: #000000;
    /* Black Footer */
    color: #F8F6F1;
    /* Off-white text */
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-links {
    display: flex;
    justify-content: space-between;
}

.footer .logo img {
    filter: brightness(0) invert(1);
    /* Force White Logo */
}

.col h4 {
    margin-bottom: 1.5rem;
    color: #FFFFFF;
}

.col a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.2s;
}

.col a:hover {
    color: #FFFFFF;
}

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
    .feature-container {
        grid-template-columns: 1fr;
        padding-left: 0;
        padding-right: 0;
        /* Reset for mobile */
    }

    .feature-info {
        padding-left: 40px;
        /* Indented content */
        padding-right: 16px;
    }

    .feature-visual {
        padding-left: 16px;
        /* Standard padding */
        padding-right: 16px;
    }

    .features-wrapper {
        height: auto;
        display: block;
        overflow: visible;
    }

    .features-track {
        width: 100%;
        display: block;
        height: auto;
    }

    .feature-panel {
        width: 100%;
        height: auto;
        padding: 4rem 0;
        border-bottom: 1px solid var(--border-subtle);
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-title {
        font-size: 40px;
        /* Reduced by 8px from 48px */
    }

    .header {
        background: var(--bg-primary) !important;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 1200px) {

    /* Copy Settings Modal Mobile */
    .copy-settings-popup {
        width: 90%;
        padding: 1rem;
    }
}

/* ============================================
   TABLET RESPONSIVE (901px - 1280px)
   ============================================ */
@media (min-width: 901px) and (max-width: 1280px) {

    /* 1. Layout: Switch Vertical Sidebar to Horizontal Top Nav */
    .horizontal-scroll-wrapper {
        height: auto !important;
        overflow: visible !important;
    }

    .scroll-pin-container {
        height: auto !important;
        display: block;
        overflow: visible !important;
        mask-image: none !important;
        /* REMOVE FADE */
        -webkit-mask-image: none !important;
        background: transparent !important;
        /* Ensure no overlay */
    }

    .feature-stepper {
        position: sticky;
        top: 80px;
        left: 0;
        transform: none !important;
        width: 100%;
        height: auto;
        display: flex;
        flex-direction: row;
        padding: 0.8rem 1rem;
        /* Compact padding */
        background: rgba(248, 246, 241, 0.95);
        /* Cream */
        border-bottom: 1px solid var(--border-subtle);
        z-index: 50;
        gap: 1rem;
        /* Tighter gap */
        justify-content: center;
        /* Center Alignment */
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .feature-stepper::-webkit-scrollbar {
        display: none;
    }

    .step-item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.6rem;
        opacity: 0.5;
        padding: 0.4rem 0.8rem;
        /* Add touch area */
        flex-shrink: 1;
        /* Allow slight shrink if needed */
        white-space: nowrap;
        cursor: pointer;
        border-radius: 20px;
        transition: all 0.3s;
    }

    .step-item:hover {
        background: rgba(255, 255, 255, 0.05);
        opacity: 0.8;
    }

    .step-item.active {
        opacity: 1;
        transform: none !important;
        background: rgba(255, 255, 2, 0.1);
        /* Active pill bg */
    }

    .step-info {
        display: flex !important;
        /* Force flex */
        align-items: center;
        opacity: 1 !important;
        /* Force visible */
        visibility: visible !important;
    }

    .step-circle {
        width: 28px;
        /* Smaller icon */
        height: 28px;
    }

    .step-title {
        font-size: 0.9rem;
        margin: 0;
        opacity: 1 !important;
        /* Force text visible */
        color: var(--text-primary);
        /* Ensure contrast */
        display: block !important;
    }

    .step-dots,
    .step-count,
    .step-label {
        display: none;
        /* Hide extra details */
    }

    .step-circle {
        width: 40px;
        height: 40px;
    }

    /* 2. Content: Tabbed View */
    .features-track {
        display: block;
        width: 100%;
        height: auto;
    }

    .features-wrapper {
        margin-top: 2rem;
        /* Reduced from 5vh */
        width: 100%;
        height: auto;
        mask-image: none !important;
        /* REMOVE DESKTOP MASK */
        -webkit-mask-image: none !important;
    }

    .feature-panel {
        display: none;
        /* Hide default */
        width: 100%;
        max-width: 100%;
        height: auto;
        padding: 0 0 4rem 0;
        /* Remove top padding, add bottom buffer */
        opacity: 0;
        visibility: hidden;
        transform: none !important;
        border-bottom: none;
        mask-image: none !important;
        /* Remove ANY mask */
        -webkit-mask-image: none !important;
    }

    .feature-panel.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        animation: fadeIn 0.5s ease forwards;
    }

    .feature-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        padding: 0 4vw !important;
        /* Add breathing room */
        margin: 0 auto;
        width: 100%;
        max-width: 1000px;
    }

    /* Override any specific left shifts */
    .features-track {
        margin-left: 0 !important;
        padding-left: 0 !important;
        transform: none !important;
    }

    .feature-info {
        width: 42%;
        /* Slightly wider text area */
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
    }

    .feature-info .section-title {
        font-size: 2.8rem;
        /* Scale down from 4rem */
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .feature-info p {
        font-size: 0.95rem;
        /* Compact text */
        max-width: 90%;
    }

    /* Header Floating Bar (Tablet) - STRICT WRAP TO PREVENT LEAK */
    @media (max-width: 1280px) {
        .header {
            position: fixed !important;
            top: 1rem !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            width: calc(100% - 48px) !important;
            /* MARKER */
            margin: 0 !important;
            border-radius: 99px;
            box-sizing: border-box;
            z-index: 1000;
            background: rgba(248, 246, 241, 0.9);
            /* Ensure readable bg */
            backdrop-filter: blur(10px);
            border: 1px solid var(--border-subtle);
        }
    }

    .nav {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        /* Fill the header */
        max-width: 100%;
        padding: 0 1rem;
        box-sizing: border-box;
    }

    /* Restore Standard Gaps */
    .nav-links {
        display: flex;
        gap: 1.5rem;
        /* Standard comfortable gap */
        flex-shrink: 0;
    }

    .logo {
        margin: 0 1rem;
        flex-shrink: 0;
    }

    .nav-actions {
        display: flex;
        gap: 1rem;
        /* Standard */
        flex-shrink: 0;
    }

    /* Restore Button Sizes */
    .btn-secondary,
    .btn-primary {
        padding: 0.6rem 1.25rem;
        font-size: 0.9rem;
    }

    .feature-visual {
        width: 58%;
        /* Balance */
        opacity: 1 !important;
    }
}

/* Bottom Nav Base */
.bottom-nav {
    display: none;
}

@media (max-width: 900px) {

    /* HIDE OLD MOBILE MENU */
    .mobile-menu-btn,
    .mobile-menu-overlay,
    .nav-links,
    .desktop-only {
        display: none !important;
    }

    /* BOTTOM NAV VISIBLE */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 32px);
        background: rgba(248, 246, 241, 0.95);
        /* Cream */
        backdrop-filter: blur(12px);
        border: 1px solid var(--border-subtle);
        border-radius: 99px;
        padding: 0.8rem 1.5rem;
        justify-content: space-between;
        align-items: center;
        z-index: 1001;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .bottom-link {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
        transition: color 0.2s;
    }

    .bottom-link:hover,
    .bottom-link:active {
        color: var(--accent-primary);
        /* Dark Green */
    }

    /* HEADER REDESIGN (Floating Capsule) */
    .header {
        position: fixed !important;
        top: 24px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 32px) !important;
        /* 16px Side Margins */
        margin: 0 !important;
        border-radius: 99px;
        background: rgba(10, 10, 11, 0.9);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border-subtle);
        z-index: 1000;
        padding: 0 !important;
        height: auto;
    }

    .nav {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        padding: 0.5rem 1rem !important;
        grid-template-columns: none !important;
        /* Reset Grid */
    }

    .logo {
        margin: 0 !important;
        grid-column: auto !important;
    }

    .nav-actions {
        display: flex !important;
        gap: 0 !important;
    }

    /* HERO ADJUSTMENT */
    .hero-title {
        margin-top: 8rem;
        /* More space for header */
        font-size: clamp(2rem, 8vw, 3rem);
        /* Ensure readable */
        line-height: 1.1;
        padding: 0;
        word-wrap: break-word;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    /* FEATURE STEPPER (Vertical -> Horizontal Tabs) */
    .horizontal-scroll-wrapper {
        height: auto !important;
        /* Fix huge whitespace */
        overflow: visible !important;
        /* Fix Sticky */
        contain: paint;
        /* Optimization */
    }

    .scroll-pin-container {
        height: auto !important;
        display: block;
        overflow: visible !important;
        /* Critical for sticky */
        /* Disable PC Mask */
        mask-image: none !important;
        -webkit-mask-image: none !important;
        contain: none;
        /* Allow sticky escape */
    }

    /* Force visibility of scroll-reveal items on mobile to prevent blank screens */
    .features-wrapper.scroll-reveal,
    .features-wrapper,
    .feature-panel,
    .feature-container,
    .feature-info,
    .feature-visual,
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        visibility: visible !important;
        /* Ensure generic visibility */
        will-change: auto !important;
        animation: none !important;
        filter: none !important;
        clip-path: none !important;
        mask: none !important;
        -webkit-mask: none !important;
    }

    .feature-stepper {
        display: none !important;
        /* Remove on Mobile as requested */
    }

    .feature-stepper::-webkit-scrollbar {
        display: none;
    }

    .step-item {
        flex-direction: row;
        gap: 0.8rem;
        padding: 0.5rem 0;
        opacity: 0.5;
        /* Dim inactive */
    }

    .step-item.active {
        opacity: 1;
    }

    .step-item .step-circle {
        width: 32px;
        height: 32px;
    }

    .step-item .step-label {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .step-divider {
        display: none;
    }

    .step-info {
        display: none !important;
        /* Hide detailed info on mobile tabs */
    }

    /* FEATURE PANELS (Horizontal -> Vertical Stack) */
    .features-wrapper {
        height: auto;
        overflow: visible;
        margin-top: 0;
    }

    .features-track {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        overflow-anchor: none;
        /* Prevent scroll jumping when content loads */
    }

    .feature-panel {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: auto;
        padding: 2rem 1rem 4rem;
        /* Reduced top padding */
        opacity: 1 !important;
        visibility: visible !important;
        box-sizing: border-box;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        background: var(--bg-primary);
        animation: none !important;
        transform: none !important;
    }

    .feature-container {
        display: flex;
        flex-direction: column;
        /* Stack Text then Demo */
        gap: 2rem;
        /* Reduced gap */
        padding-top: 1rem;
    }

    .feature-info .section-title {
        font-size: 1.5rem;
        /* Reduced from Desktop */
        margin-bottom: 0.5rem;
    }

    .feature-info p {
        font-size: 0.85rem;
        /* Smaller body text */
        line-height: 1.5;
        opacity: 0.8;
    }

    .feature-visual {
        width: 100%;
        order: 2;
        /* Visual last */
    }

    .feature-info {
        width: 100%;
        order: 1;
        /* Info first */
    }

    /* GRID & LAYOUTS */
    .roadmap-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }

    /* FOOTER */
    .footer-links {
        flex-direction: column;
        gap: 2rem !important;
        /* Force smaller gap */
        text-align: left;
    }

    .footer-content {
        flex-direction: column;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    /* Removed .hero-title override to use 900px clamp logic */

    .roadmap-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Social Scanner & Dashboard Styles */
.social-scanner {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    height: 100%;
}

.radar-circle {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(0, 212, 170, 0.3);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 15px rgba(0, 212, 170, 0.1);
}

.radar-sweep {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, rgba(255, 255, 2, 0.5) 0%, transparent 50%);
    transform-origin: top left;
    animation: radarScan 2s infinite linear;
    border-radius: 0 0 100% 0;
}

@keyframes radarScan {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.scan-text {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 0.9rem;
    animation: pulse 1.5s infinite;
}

/* Social Dashboard Mobile Fixes */
.social-dashboard {
    padding: 1rem;
    /* 16px */
    gap: 1rem;
}

.whale-alert,
.profit-card {
    padding: 1rem !important;
    /* Force 16px */
    width: 100%;
    box-sizing: border-box;
}

.whale-icon {
    font-size: 1.2rem;
}

.whale-info h4 {
    font-size: 0.9rem;
}

.whale-info span {
    font-size: 0.8rem;
}

/* Copy Settings Modal Mobile */
.copy-settings-popup {
    width: 90%;
    padding: 1rem;
}

/* Social Dashboard */
.social-dashboard {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    gap: 1rem;
}

/* Whale Alert Card */
.whale-alert {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 2, 0.3);
    border-radius: 12px;
    padding: 0.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.whale-icon {
    font-size: 1.5rem;
}

.whale-info {
    flex: 1;
}

.whale-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: #fff;
}

.whale-stat {
    font-size: 0.75rem;
    color: #888;
}

.whale-action {
    background: var(--accent-primary);
    color: #000;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 1s infinite;
}

/* Growth Stats Box */
.growth-stats {
    background: linear-gradient(135deg, rgba(255, 255, 2, 0.1), rgba(255, 255, 2, 0.05));
    border: 1px solid rgba(255, 255, 2, 0.2);
    border-radius: 12px;
    padding: 1rem;
    margin-top: auto;
}

.growth-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.growth-main {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-top: 0.5rem;
    color: #FFFF02;
    text-shadow: 0 0 10px rgba(255, 255, 2, 0.3);
}

/* AI Agent Command Center */
.agent-command-center {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding: 1rem;
    gap: 1rem;
}

/* 1. Core Visual */
.agent-core-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 2;
    position: relative;
    min-height: 120px;
}

.agent-core {
    width: 80px;
    height: 80px;
    position: relative;
    transform-style: preserve-3d;
}

.core-inner {
    position: absolute;
    inset: 15px;
    background: radial-gradient(circle, #0F1713 0%, var(--accent-primary) 70%, transparent 100%);
    /* Dark core */
    border-radius: 50%;
    filter: blur(2px);
    /* Reduce blur */
    animation: corePulse 2s ease-in-out infinite alternate;
}

.core-outer {
    position: absolute;
    inset: 0;
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    border-left-color: transparent;
    border-right-color: transparent;
    animation: spin 4s linear infinite;
}

.core-rings {
    position: absolute;
    inset: -10px;
    border: 1px dashed var(--accent-primary);
    /* Green Rings */
    border-radius: 50%;
    animation: spinReverse 10s linear infinite;
}

.whale-stat {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    /* Prevent jitter */
}

.core-status {
    margin-top: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 2px;
    font-weight: 700;
    color: #0F1713;
    /* Dark Text */
    text-shadow: none;
    /* Remove glow for clarity */
    animation: none;
    /* Stop blinking text */
}

/* 2. Modules Grid */
.agent-modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.module-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.module-val {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-primary);
    /* Dark Text */
    font-weight: 700;
    white-space: nowrap;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #333;
}

.status-dot.active {
    background: #00FF00;
    box-shadow: 0 0 5px #00FF00;
}

.status-dot.processing {
    background: #FFD700;
    animation: blink 0.5s infinite;
}

/* 3. Terminal */
.agent-terminal {
    width: 100%;
    height: 120px;
    /* FIXED HEIGHT TO PREVENT JITTER */
    flex-shrink: 0;
    background: #0F1713;
    /* Dark Terminal */
    border: 1px solid var(--border-visible);
    border-radius: 6px;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: auto;
    /* Push to bottom */
    scrollbar-width: none;
    /* Hide scrollbar Firefox */
}

.agent-terminal::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar Chrome/Safari */
}

.term-header {
    font-family: var(--font-mono);
    background: transparent;
    padding: 0 0 4px 0;
    margin-bottom: 4px;
    font-size: 0.65rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
}

.term-content {
    flex: 1;
    padding: 0.5rem;
    overflow-y: hidden;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    font-family: var(--font-mono);
    font-size: 0.7rem;
    display: flex;
    flex-direction: column-reverse;
    /* Bottom up logs */
}

/* Animations */
@keyframes corePulse {
    from {
        opacity: 0.6;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1.1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spinReverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Dark Mode Social Cards */
#whale-card,
.whale-alert {
    background: #131313 !important;
    color: #fff !important;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#whale-card .whale-id,
.whale-alert .whale-id {
    color: #e5e5e5;
}

/* Mobile Bottom Nav (Pixel Art) */
.bottom-nav {
    display: none;
    /* Hidden by default */
}

@media (max-width: 900px) {
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 1px !important;
        /* Force 1px offset */
        width: 100% !important;
        margin: 0;
        right: auto;
        padding: 0.8rem 0;
        background: #FFF9E5;
        /* Retro Beige */
        border-top: 3px solid #000;
        box-sizing: border-box;
        transform: none;
        /* Reset transforms */
        justify-content: space-around;
        z-index: 9999;
        /* Ensure on top */
        box-shadow: 0 -4px 0 rgba(0, 0, 0, 0.1);
        border-radius: 0;
        /* Force square */
        margin: 0;
        align-items: center;
    }

    .bottom-link {
        font-family: var(--font-display);
        font-size: 0.7rem;
        /* Smaller pixel text */
        text-transform: uppercase;
        color: var(--text-primary);
        text-decoration: none;
        padding: 0.5rem 1rem;
        border: 2px solid transparent;
        transition: all 0.2s;
        text-align: center;
    }

    .bottom-link:hover,
    .bottom-link:active {
        background: var(--accent-primary);
        color: #fff;
        border: 2px solid #000;
        box-shadow: 2px 2px 0 #000;
    }
}

/* Coming Soon Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.modal-content {
    background: #000;
    border: 2px solid var(--accent-primary);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    font-family: var(--font-mono);
}

.modal-close:hover {
    color: #fff;
}

.modal-title {
    font-family: var(--font-display);
    color: var(--accent-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-text {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}