:root {
    --background: oklch(0.99 0 0);
    --foreground: oklch(0.145 0 0);
    --primary: oklch(0.205 0 0);
    --primary-foreground: oklch(0.985 0 0);
    --secondary: oklch(0.970 0 0);
    --muted: oklch(0.970 0 0);
    --muted-foreground: oklch(0.556 0 0);
    --border: oklch(0.922 0 0);
    --radius: 0.625rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow-sm: 0 1px 2px 0 oklch(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 oklch(0 0 0 / 0.1), 0 1px 2px -1px oklch(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.1), 0 2px 4px -2px oklch(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px oklch(0 0 0 / 0.1), 0 4px 6px -4px oklch(0 0 0 / 0.1);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tag-finance {
    background-color: oklch(0.96 0.03 250);
    color: oklch(0.45 0.15 250);
}

.tag-retail {
    background-color: oklch(0.96 0.03 120);
    color: oklch(0.45 0.15 120);
}

.tag-manufacturing {
    background-color: oklch(0.96 0.03 50);
    color: oklch(0.45 0.15 50);
}

.tag-healthcare {
    background-color: oklch(0.96 0.03 340);
    color: oklch(0.45 0.15 340);
}

.tag-education {
    background-color: oklch(0.96 0.03 200);
    color: oklch(0.45 0.15 200);
}

.evidence-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.evidence-image:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }
    
    .mobile-menu.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
}

.result-stat {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

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

.result-stat:nth-child(1) { animation-delay: 0.1s; }
.result-stat:nth-child(2) { animation-delay: 0.2s; }
.result-stat:nth-child(3) { animation-delay: 0.3s; }

.chat-message {
    animation: slideIn 0.3s ease-out;
}

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

.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #6366f1;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

.rich-text {
    line-height: 1.8;
}

.rich-text p {
    margin-bottom: 1rem;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4,
.rich-text h5,
.rich-text h6 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.rich-text h1 { font-size: 2rem; }
.rich-text h2 { font-size: 1.5rem; }
.rich-text h3 { font-size: 1.25rem; }
.rich-text h4 { font-size: 1.125rem; }

.rich-text ul,
.rich-text ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.rich-text ul {
    list-style-type: disc;
}

.rich-text ol {
    list-style-type: decimal;
}

.rich-text li {
    margin-bottom: 0.5rem;
}

.rich-text blockquote {
    border-left: 4px solid #6366f1;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #6b7280;
}

.rich-text code {
    background-color: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

.rich-text pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.rich-text a {
    color: #6366f1;
    text-decoration: underline;
}

.rich-text a:hover {
    color: #4f46e5;
}

.rich-text img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.rich-text table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.rich-text th,
.rich-text td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    text-align: left;
}

.rich-text th {
    background-color: #f9fafb;
    font-weight: 600;
}

.rich-text hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

.rich-text strong {
    font-weight: 600;
}

.rich-text em {
    font-style: italic;
}

.rich-text del {
    text-decoration: line-through;
}

.rich-text sup {
    vertical-align: super;
    font-size: 0.75rem;
}

.rich-text sub {
    vertical-align: sub;
    font-size: 0.75rem;
}

@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s ease-in-out infinite;
}