/* astroLM - Future 2026 Design */
:root {
    --bg-dark: #050505;
    --bg-card: rgba(255, 255, 255, 0.03);
    --primary: #6366f1; /* Indigo Neon */
    --secondary: #ec4899; /* Pink Neon */
    --accent: #06b6d4; /* Cyan */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --glow: 0 0 20px rgba(99, 102, 241, 0.5);
    --font-main: 'Outfit', sans-serif;
    --font-tech: 'Space Grotesk', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* 3D Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    opacity: 0.6;
}

/* Typography & Utilities */
.font-tech {
    font-family: var(--font-tech);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.display-1 {
    font-size: 4.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Glitch Effect */
.glitch-text {
    position: relative;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(60px, 9999px, 14px, 0); }
    20% { clip: rect(85px, 9999px, 82px, 0); }
    40% { clip: rect(5px, 9999px, 73px, 0); }
    60% { clip: rect(44px, 9999px, 88px, 0); }
    80% { clip: rect(14px, 9999px, 24px, 0); }
    100% { clip: rect(62px, 9999px, 38px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(29px, 9999px, 86px, 0); }
    20% { clip: rect(53px, 9999px, 2px, 0); }
    40% { clip: rect(94px, 9999px, 38px, 0); }
    60% { clip: rect(2px, 9999px, 44px, 0); }
    80% { clip: rect(11px, 9999px, 83px, 0); }
    100% { clip: rect(56px, 9999px, 21px, 0); }
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover, .feature-card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--glow);
    border-color: rgba(99, 102, 241, 0.4);
}

.glass-card-sm {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s;
    cursor: pointer; /* Ensure pointer cursor */
}

.glass-card-sm:hover {
    background: rgba(255, 255, 255, 0.05);
}

.glass-card-sm:active {
    transform: scale(0.98);
}

.glass-card-sm.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
    border-left: 3px solid var(--primary);
}

.glass-badge {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navbar */
.navbar {
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: #fff !important;
}

/* Buttons */
.btn-astro {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.glow-hover:hover {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
    transform: scale(1.05);
}

.btn-outline-astro {
    background: transparent;
    border: 2px solid var(--glass-border);
    color: white;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-astro:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Simulation View Styles */
.sim-view {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
}

.sim-view.hidden-left {
    transform: translateX(-100%);
    opacity: 0;
}

.sim-view.hidden-right {
    transform: translateX(100%);
    opacity: 0;
}

.result-item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.result-item:last-child {
    border-bottom: none;
}

.drop-shadow {
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

@keyframes cursor-search-anim {
    0% { top: 120%; left: 120%; transform: scale(1); }
    15% { top: 80%; left: 80%; transform: scale(1); }
    30% { top: 15%; left: 70%; transform: scale(1); } /* Go to search bar */
    40% { top: 15%; left: 70%; transform: scale(0.9); } /* Click */
    45% { top: 15%; left: 70%; transform: scale(1); }
    60% { top: 50%; left: 50%; } /* Move to results */
    75% { top: 60%; left: 50%; } /* Scroll down look */
    100% { top: 55%; left: 45%; } /* Hesitate */
}

.cursor-anim {
    animation: cursor-search-anim 4s forwards;
}

/* Simulation UI */
.simulation-ui {
    height: 400px;
    border: 1px solid var(--glass-border);
}

.sim-chat-area {
    height: 350px;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    z-index: 10;
    opacity: 0;
}

.scanning .scan-line {
    animation: scan 3s infinite linear;
    opacity: 1;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.entity-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    display: inline-block;
    margin: 2px;
    animation: popIn 0.3s ease-out;
}

.entity-badge.positive { border-color: #22c55e; color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.entity-badge.competitor { border-color: #ef4444; color: #ef4444; background: rgba(239, 68, 68, 0.1); }

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 3D Cube Spinner (Pure CSS) */
.cube-spinner {
    width: 40px;
    height: 40px;
    position: relative;
    transform-style: preserve-3d;
    animation: spin-cube 10s infinite linear;
    margin: 0 auto;
}

.cube-spinner .face {
    position: absolute;
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
}

.front  { transform: translateZ(20px); }
.back   { transform: rotateY(180deg) translateZ(20px); }
.right  { transform: rotateY(90deg) translateZ(20px); }
.left   { transform: rotateY(-90deg) translateZ(20px); }
.top    { transform: rotateX(90deg) translateZ(20px); }
.bottom { transform: rotateX(-90deg) translateZ(20px); }

@keyframes spin-cube {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* Pulse Dot */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.pulse-icon {
    animation: text-pulse 2s infinite;
}

@keyframes text-pulse {
    0% { opacity: 1; text-shadow: 0 0 0 rgba(99, 102, 241, 0); }
    50% { opacity: 0.8; text-shadow: 0 0 10px rgba(99, 102, 241, 0.5); }
    100% { opacity: 1; text-shadow: 0 0 0 rgba(99, 102, 241, 0); }
}

/* Footer */
footer {
    background: #000;
}

.social-link {
    color: var(--text-muted);
    transition: color 0.3s;
}
.social-link:hover { color: #fff; }

.hover-light:hover {
    color: #fff !important;
    transition: color 0.2s;
}

/* Market Sim Animations */
.glow-active {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.8) !important;
    border-color: #fff !important;
    z-index: 10;
}

.btn-scan-effect {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-20deg);
    animation: btn-scan 3s infinite;
}

@keyframes btn-scan {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* Model Grid Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.model-icon {
    transition: all 0.3s ease;
    cursor: pointer;
    animation: float 6s ease-in-out infinite;
}

/* Add delays for organic feel */
.model-item:nth-child(1) .model-icon { animation-delay: 0s; }
.model-item:nth-child(2) .model-icon { animation-delay: 1s; }
.model-item:nth-child(3) .model-icon { animation-delay: 2s; }
.model-item:nth-child(4) .model-icon { animation-delay: 3s; }
.model-item:nth-child(5) .model-icon { animation-delay: 4s; }
.model-item:nth-child(6) .model-icon { animation-delay: 5s; }

.model-item:hover .model-icon {
    animation: none; /* Stop floating on hover */
    transform: translateY(-5px) scale(1.1); /* Pop up and scale */
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.6);
    border-color: var(--primary) !important;
}

.model-item:hover span {
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* --- New Components --- */

/* 1. Optimization View (Step 3) */
.opt-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}
.opt-card:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

/* 2. Use Cases */
.use-case-item {
    transition: transform 0.3s ease;
}
.use-case-item:hover {
    transform: translateY(-5px);
}
.use-case-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    color: var(--primary);
}

/* 3. Gartner Graph */
.graph-bar {
    transition: height 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.graph-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 3s forwards ease-in-out;
}
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

/* 4. Dynamic Text (Typewriter) */
.cursor-blink {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--primary);
    animation: blink 1s infinite;
    vertical-align: middle;
    margin-left: 2px;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* 5. 20 Questions Simulation (Marquee/Terminal) */
.questions-container {
    height: 400px;
    overflow-y: hidden; /* Hidden scrollbar, auto-scroll via JS */
    position: relative;
}
.question-item {
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-family: var(--font-tech);
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.3s;
}
.question-item.active {
    opacity: 1;
    background: rgba(255,255,255,0.05);
    border-left: 3px solid var(--primary);
}
.highlight-brand {
    color: #ef4444; /* Red as requested */
    font-weight: bold;
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

/* 6. Partner Block */
.partner-block {
    background: linear-gradient(45deg, rgba(5,5,5,0.9), rgba(20,20,20,0.9));
    border: 1px solid var(--glass-border);
}

/* Graph Animations */
.graph-draw-anim {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawGraph 4s ease-out forwards;
}

@keyframes drawGraph {
    to {
        stroke-dashoffset: 0;
    }
}

.pulse-dot-graph {
    transform-box: fill-box;
    transform-origin: center;
    animation: pulseGraph 2s infinite;
}

@keyframes pulseGraph {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}
