@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('lib/tailwindcss/dist/preflight.css');

:root {
    --bg-base: #0f172a; /* Slate 900 */
    --bg-accent: #1e293b; /* Slate 800 */
    --text-primary: #f8fafc; /* Slate 50 */
    --text-secondary: #94a3b8; /* Slate 400 */
    --brand: #3b82f6; /* Blue 500 */
    --brand-hover: #60a5fa; /* Blue 400 */
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    background: var(--bg-base);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    color: var(--text-primary);
}

h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

/* Base chat layout container */
.page-width {
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/* Buttons */
.btn-default, .btn-subtle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

.btn-default {
    background-color: var(--brand);
    color: white;
}

.btn-default:hover {
    background-color: var(--brand-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-subtle {
    background-color: var(--bg-accent);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    font-size: 12px;
}

.btn-subtle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* File Upload Controls */
.document-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 0;
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-btn {
    display: flex;
    justify-content: center;
    width: 100%;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--brand, #3b82f6);
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn:hover {
    background: var(--brand-hover, #60a5fa);
}

.upload-status {
    font-size: 0.875rem;
    color: var(--text-secondary); /* or #10b981 */
}
.upload-status.success { color: #34d399; }
.upload-status.error { color: #f87171; }

.chat-container {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-accent);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
