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

:root {
    --bg-main: #F3F4F6;
    --bg-card: #FFFFFF;
    --bg-card-subtle: #F9FAFB;
    --bg-pill: #F3F4F6;
    --border-card: #E5E7EB;
    --border-card-hover: #D1D5DB;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --accent-indigo: #4F46E5;
    --accent-emerald: #10B981;
    --accent-cyan: #06B6D4;
    --accent-violet: #8B5CF6;
    --accent-amber: #F59E0B;
    --accent-rose: #EF4444;
}

.dark {
    --bg-main: #0B0F19;
    --bg-card: #111827;
    --bg-card-subtle: #1F2937;
    --bg-pill: #1F2937;
    --border-card: #1F2937;
    --border-card-hover: #374151;
    --text-primary: #F9FAFB;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --accent-indigo: #6366F1;
    --accent-emerald: #10B981;
    --accent-cyan: #22D3EE;
    --accent-violet: #A78BFA;
    --accent-amber: #FBBF24;
    --accent-rose: #F87171;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Persian typography support */
[dir="rtl"], .font-vazir {
    font-family: 'Vazirmatn', 'Plus Jakarta Sans', system-ui, sans-serif !important;
}

/* Soft Neumorphic / SaaS Floating Pill Cards */
.pill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 1.25rem;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill-card:hover {
    border-color: var(--border-card-hover);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.dark .pill-card {
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
}

.dark .pill-card:hover {
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    border-color: #374151;
}

/* Example & Capability Pills */
.feature-box {
    background: #F9FAFB;
    border: 1px solid #F3F4F6;
    border-radius: 0.875rem;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.feature-box:hover {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.dark .feature-box {
    background: #1A2234;
    border-color: #1F2937;
    color: #9CA3AF;
}

.dark .feature-box:hover {
    background: #1E293B;
    border-color: #374151;
}

/* Bottom Floating Dock Bar */
.bottom-dock {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(229, 231, 235, 0.8);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08), 0 4px 12px -2px rgba(0, 0, 0, 0.04);
    border-radius: 9999px;
}

.dark .bottom-dock {
    background: rgba(17, 24, 39, 0.92);
    border-color: rgba(31, 41, 55, 0.8);
    box-shadow: 0 10px 35px -5px rgba(0, 0, 0, 0.6);
}

/* Pill Buttons */
.pill-btn {
    border-radius: 9999px;
    transition: all 0.15s ease;
}

.pill-btn:active {
    transform: scale(0.96);
}

/* Custom Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 5px;
    background: #E5E7EB;
    border-radius: 9999px;
    outline: none;
}

.dark input[type="range"] {
    background: #374151;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #111827;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #FFFFFF;
    transition: transform 0.15s;
}

.dark input[type="range"]::-webkit-slider-thumb {
    background: #F9FAFB;
    border-color: #111827;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 9999px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #374151;
}

/* Disabled Upload Button Styling with Tooltip */
.disabled-upload-pill {
    cursor: not-allowed !important;
    opacity: 0.6;
    position: relative;
}

.disabled-upload-pill:hover::after {
    content: "🔒 Uploads disabled on server (Demo Mode)";
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #FFFFFF;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 50;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .disabled-upload-pill:hover::after {
    content: "🔒 آپلود روی سرور در نسخه دمو غیرفعال است";
}

/* Typing cursor animation */
.typing-cursor {
    display: inline-block;
    width: 6px;
    height: 14px;
    background-color: #111827;
    vertical-align: middle;
    margin-left: 3px;
    animation: blink 0.9s infinite;
    border-radius: 1px;
}

.dark .typing-cursor {
    background-color: #F9FAFB;
}

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

/* Chat bubble styling */
.chat-bubble-user {
    background: #F3F4F6;
    color: #111827;
    border-radius: 1.25rem 1.25rem 0.25rem 1.25rem;
    padding: 0.75rem 1.125rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.dark .chat-bubble-user {
    background: #1F2937;
    color: #F9FAFB;
}

.chat-bubble-ai {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 1.25rem 1.25rem 1.25rem 0.25rem;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    line-height: 1.65;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.dark .chat-bubble-ai {
    background: #111827;
    border-color: #1F2937;
}

.reasoning-box {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-left: 3px solid #8B5CF6;
    border-radius: 0.625rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

[dir="rtl"] .reasoning-box {
    border-left: 1px solid #E5E7EB;
    border-right: 3px solid #8B5CF6;
}

.dark .reasoning-box {
    background: #1A2234;
    border-color: #1F2937;
}
