:root {
    /* Primary Colors - Ultra Modern AI Theme */
    --primary-color: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-light: #60a5fa;
    --accent-color: #2dd4bf;
    --dark-bg: #03060e;
    --darker-bg: #02040a;
    --card-bg: rgba(13, 17, 28, 0.7);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(59, 130, 246, 0.2);
    --gradient-primary: linear-gradient(135deg, #3b82f6, #2dd4bf);
    --gradient-glow: radial-gradient(circle at center, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--darker-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

/* Dynamic Mesh Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(45, 212, 191, 0.05) 0%, transparent 40%);
    z-index: -2;
    pointer-events: none;
}

/* Subtle Animated Glows */
.glow-orb {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--primary-color);
    filter: blur(120px);
    opacity: 0.08;
    z-index: -1;
    pointer-events: none;
    animation: float 20s infinite alternate ease-in-out;
}

.glow-orb-1 { top: -100px; left: -100px; }
.glow-orb-2 { bottom: -100px; right: -100px; background: var(--accent-color); animation-delay: -5s; }


/* Glass Card Component Enhanced */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.glass-card:hover {
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 20px rgba(59, 130, 246, 0.1);
}

.glass-card:hover::before {
    transform: translateX(100%);
}


/* Button with Primary Gradient Enhanced */
.btn-glow {
    background: var(--gradient-primary);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    color: white;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-glow:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
    filter: brightness(1.1);
}


/* Navbar Brand */
.navbar-brand {
    font-family: 'Space Grotesk', monospace;
    font-weight: 600;
}

/* AI Badge */
.badge-ai {
    background: rgba(99, 102, 241, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid var(--primary-color);
    color: var(--primary-light);
}

/* Feature Icon Gradient */
.feature-icon {
    font-size: 2rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Step Circle */
.step-circle {
    width: 48px;
    height: 48px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid var(--primary-color);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-light);
}

/* Code Block */
.code-block {
    background: var(--darker-bg);
    border-left: 4px solid var(--primary-color);
    font-family: monospace;
}

/* Feature Grid Card Enhanced */
.feature-grid-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.feature-grid-card:hover {
    border-color: var(--primary-light);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-10px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.4);
}


/* Text Colors Overrides */
.text-muted {
    color: var(--text-muted) !important;
}

.text-info {
    color: var(--primary-light) !important;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .glass-card {
        backdrop-filter: blur(8px);
    }
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, 20px) rotate(2deg); }
    66% { transform: translate(-20px, 40px) rotate(-1deg); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.text-shimmer {
    background: linear-gradient(to right, #60a5fa 0%, #2dd4bf 50%, #60a5fa 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 3s linear infinite;
}


.streaming-text {
    display: inline;
}

/* Tooltip / Hover Preview Styles */
.citation-preview {
    position: relative;
    display: inline-block;
    cursor: help;
    transition: all 0.1s ease;
}

.citation-source {
    background: rgba(99, 102, 241, 0.15);
    border-bottom: 1px dashed var(--primary-color);
    padding: 2px 4px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.citation-source:hover {
    background: rgba(99, 102, 241, 0.35);
}

.preview-card {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 130%;
    left: 0;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--primary-color);
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    width: 320px;
    max-width: 85vw;
    z-index: 1000;
    transition: opacity 0.2s, visibility 0.2s;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
    pointer-events: none;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.citation-preview:hover .preview-card {
    visibility: visible;
    opacity: 1;
}

.preview-card .doc-title {
    font-weight: 600;
    color: var(--primary-light);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-card .highlight-text {
    background: rgba(99, 102, 241, 0.15);
    border-left: 3px solid var(--primary-color);
    padding: 4px 8px;
    margin-top: 6px;
    font-style: italic;
}

/* Suggestion Chip */
.suggestion-chip {
    transition: all 0.15s;
}

.suggestion-chip:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.2);
}

/* Form Controls */
.form-control.modern-input,
.form-control.bg-dark {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 0.85rem 1.2rem;
    transition: all 0.2s;
    color: var(--text-primary) !important;
    font-size: small;
}

.form-control.modern-input::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

.form-control.bg-dark:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    background: var(--darker-bg);
}

select.form-control.bg-dark option {
    background: var(--card-bg);
}

/* Contact Glass */
.contact-glass {
    background: rgba(20, 20, 32, 0.5);
    backdrop-filter: blur(8px);
    border-radius: 2rem;
    padding: 2rem;
}

/* Avatar / Badge Gradient */
.rounded-circle.bg-gradient {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* Nav Tabs */
.nav-tabs .nav-link {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.nav-tabs .nav-link.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Specific overrides for LLM Provider tabs to maintain original design colors */
#local-tab.nav-link, #cloud-tab.nav-link {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #cbd5e1;
}

#local-tab.nav-link.active, #cloud-tab.nav-link.active {
    background: linear-gradient(135deg, #2563eb, #14b8a6);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Provider Logo */
.provider-logo {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Input Placeholder Fixes */
input.bg-dark::placeholder,
textarea.bg-dark::placeholder,
.form-control.bg-dark::placeholder {
    color: var(--text-muted) !important;
    opacity: 1;
}

input.bg-dark:-ms-input-placeholder,
textarea.bg-dark:-ms-input-placeholder {
    color: var(--text-muted) !important;
}

input.bg-dark::-ms-input-placeholder,
textarea.bg-dark::-ms-input-placeholder {
    color: var(--text-muted) !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Language Switcher */
.language-switcher .btn {
  transition: all 0.3s ease;
  font-weight: 500;
}

.language-switcher .btn-info {
  background: linear-gradient(135deg, #2563eb, #14b8a6);
  border: none;
}

/* Responsive adjustments for RTL */
@media (max-width: 768px) {
  [dir="rtl"] .navbar-nav {
    text-align: center;
  }
}

.suggestion-chip:hover {
    color: var(--text-primary);
    background-color: var(--primary-color);
    border-color: var(--border-color);
}

/* FAQ Accordion Styles */
.accordion-item {
    background: rgba(20, 20, 32, 0.5);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: 1rem !important;
    overflow: hidden;
}

.accordion-button {
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
}

.accordion-button::after {
    filter: invert(1);
}

.accordion-body {
    color: var(--text-secondary);
    padding: 1.25rem 1.5rem;
}

/* Social Proof Styles */
.trusted-by-section {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.trusted-logo {
    opacity: 0.5;
    transition: opacity 0.3s;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
}

.trusted-logo:hover {
    opacity: 1;
}

/* Interactive Chat Buttons */
.chat-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.chat-btn {
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-light);
}

.chat-btn:hover {
    background: var(--primary-color);
    color: white;
}

.chat-btn-primary {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
}

.chat-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.user-message-bubble {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 0.75rem;
    margin: 15px 0;
    font-style: italic;
    color: var(--text-primary);
    font-size: 0.9rem;
    position: relative;
    max-width: 90%;
}

.agent-message-bubble {
    margin: 15px 0;
    padding: 5px 0;
}