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

:root {
    --bg-deep: #F8FAFC;
    --bg-card: #FFFFFF;
    --primary: #2563eb;
    --primary-dim: rgba(37, 99, 235, 0.1);
    --secondary: #4f46e5;
    --accent: #0ea5e9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-highlight: rgba(0, 0, 0, 0.05);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
}

/* --- Base Reset & Typography --- */
body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* --- Utilities --- */
.font-heading { font-family: var(--font-heading); }
.font-body { font-family: var(--font-body); }
.font-mono { font-family: var(--font-mono); }

/* Text Gradients (Converted to solid colors) */
.text-gradient {
    color: var(--text-main);
}

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

/* Glassmorphism */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.glass-pill {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 9999px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08), inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

/* --- Animations --- */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-30px) rotate(0deg); }
}

.animate-float-slow {
    animation: float-slow 8s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px var(--primary-dim); }
    50% { box-shadow: 0 0 16px rgba(37, 99, 235, 0.2); }
}

@keyframes fadeInBlur {
    0% { opacity: 0; filter: blur(10px); transform: translateY(20px); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes aurora {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: float-slow 8s ease-in-out infinite; }
.animate-fade-in { animation: fadeInBlur 0.8s ease-out forwards; }

/* Interactive Elements */
.hover-glow:hover {
    box-shadow: 0 4px 12px var(--primary-dim);
    border-color: var(--primary);
}

.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-color: var(--glass-highlight);
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, #2563eb, #8b5cf6, #d946ef);
    color: #fff;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 9999px;
    box-shadow: 0 30px 80px rgba(37, 99, 235, 0.2);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #1d4ed8, #7c3aed, #c026d3);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    font-family: var(--font-heading);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-main);
}

.premium-chat-text {
    font-size: 10.5px !important;
    line-height: 1.4 !important;
    letter-spacing: -0.01em;
    font-weight: 500;
}

/* --- Chat Interface (HUD Style) --- */
.chat-container {
    background: rgba(5, 5, 10, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 20px 50px rgba(0, 0, 0, 0.5);
}

.message {
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 12px;
    position: relative;
    animation: messageSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bot-message {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    margin-right: auto;
}

.message pre {
    background: #0d1117;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    color: #e6edf3;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.message code {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}

.message p {
    margin-bottom: 0.75rem;
}

.message p:last-child {
    margin-bottom: 0;
}

/* Markdown elements styling inside messages */
.message ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.message ol {
    list-style-type: decimal;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    margin-top: 0.5rem;
}

.message li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.message li:last-child {
    margin-bottom: 0;
}

.message h1, .message h2, .message h3, .message h4, .message h5, .message h6 {
    font-weight: 700;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.message a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.message strong, .message b {
    font-weight: 700;
    color: inherit;
}

.message em {
    font-style: italic;
}

.user-message {
    background: linear-gradient(135deg, var(--secondary), #5000cc);
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
    margin-left: auto;
    box-shadow: 0 4px 15px rgba(112, 0, 255, 0.3);
}

.loading {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-bottom: 12px;
}

.dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

@keyframes messageSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Mobile Specifics --- */
@media (max-width: 768px) {
    .snap-x-mandatory {
        scroll-snap-type: x mandatory;
    }
    .snap-center {
        scroll-snap-align: center;
    }
    /* Hide scrollbar for clean carousel */
    .hide-scrollbar::-webkit-scrollbar {
        display: none;
    }
    .hide-scrollbar {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* --- Dashboard Showcase Section --- */
.showcase-section {
    background-color: var(--bg-deep);
    position: relative;
    padding: 40px 0; /* Minimized padding */
    min-height: auto;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.showcase-container {
    perspective: 2000px;
    width: 100%;
}

.mockup-dashboard {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    transition: all 0.5s ease;
    height: 480px; /* Reduced height for single viewport */
    width: 100%;
}

.mockup-dashboard:hover {
    transform: rotateX(0deg) translateY(-5px);
    box-shadow: 0 50px 100px -25px rgba(0, 0, 0, 0.12);
}

.mockup-sidebar {
    width: 220px;
    background: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.mockup-header {
    height: 60px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.annotation-pill {
    position: absolute;
    background: #ffffff;
    color: #1e293b;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.annotation-pill span strong {
    color: #2563eb;
    font-weight: 800;
}

.annotation-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.1);
}

.tutorial-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 90;
    overflow: visible;
}

.tutorial-line path {
    fill: none;
    stroke: #2563eb;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-dasharray: 4;
    stroke-opacity: 0.4;
}

.tutorial-dot {
    fill: #2563eb;
    fill-opacity: 0.6;
}

.showcase-active .annotation-line {
    stroke-dashoffset: 0;
}

/* Mockup Specific Layouts */
.mockup-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
    width: 100%;
}

.mockup-stats-grid > div {
    min-width: 0;
}

.mockup-config-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 16px !important;
    width: 100%;
}

.mockup-config-grid > div {
    min-width: 0;
}

@media (max-width: 1024px) {
    .tutorial-line, .annotation-pill {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mockup-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .mockup-config-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

.floating-widget-preview {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 200px;
    height: 320px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 3px solid #ffffff;
    z-index: 60;
    overflow: hidden;
}

[dir="rtl"] .floating-widget-preview {
    right: auto;
    left: 20px;
}

/* RTL Support Override */
[dir="rtl"] .mockup-sidebar {
    border-right: none;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}
