:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: #e2e8f0;
    min-height: 100vh;
}

/* Typography */
.gradient-text {
    background: linear-gradient(90deg, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Navbar */
.glass-nav {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

/* Search Input */
.search-input {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    border-radius: 20px;
    padding-left: 20px;
    padding-right: 20px;
    transition: all 0.3s ease;
}

.search-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
    border-color: var(--primary-color) !important;
}

/* Chunk Cards */
.chunk-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chunk-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.4);
}

.chunk-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chunk-file {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chunk-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.chunk-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 250px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #cbd5e1;
    white-space: pre-wrap; /* Respect newlines from chunking */
}

/* Custom Scrollbar for chunks */
.chunk-body::-webkit-scrollbar {
    width: 6px;
}
.chunk-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
.chunk-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
.chunk-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* Pagination Styling */
.pagination {
    --bs-pagination-bg: rgba(30, 41, 59, 0.8);
    --bs-pagination-border-color: var(--glass-border);
    --bs-pagination-color: #cbd5e1;
    --bs-pagination-hover-bg: var(--primary-color);
    --bs-pagination-hover-color: #fff;
    --bs-pagination-hover-border-color: var(--primary-color);
    --bs-pagination-active-bg: var(--primary-color);
    --bs-pagination-active-border-color: var(--primary-color);
    --bs-pagination-disabled-bg: rgba(15, 23, 42, 0.5);
    --bs-pagination-disabled-border-color: var(--glass-border);
}

.page-link {
    border-radius: 8px;
    margin: 0 3px;
    border: 1px solid var(--glass-border);
}
