/* knowledge-base.html — page-specific styles */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #0b0e13 0%, #141c28 100%);
    min-height: 100vh;
    color: #c9d2dc;
    line-height: 1.6;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 24px 0;
    box-shadow: 2px 0 25px rgba(0,0,0,0.3);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: inherit;
    font-weight: inherit;
}

.logo img {
    height: 32px;
    margin-right: 12px;
}

.search-container {
    padding: 0 24px 24px;
}

.search-box {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.search-box::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-box:focus {
    outline: none;
    border-color: #2b8be6;
    box-shadow: 0 0 0 3px rgba(43,139,230,0.1);
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section h3 {
    padding: 0 24px 12px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    border-radius: 0 25px 25px 0;
    margin: 4px 0;
}

.nav-item:hover {
    background: rgba(43,139,230,0.2);
    transform: translateX(8px);
}

.nav-item.active {
    background: linear-gradient(135deg, #2b8be6, #5468f2);
    box-shadow: 0 4px 16px rgba(43,139,230,0.3);
}

.nav-item .material-icons {
    margin-right: 12px;
    font-size: 20px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 32px;
}

.content-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ff6b00, #ff9933);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.content-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(43,139,230,0.5);
}

.content-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: white;
}

.content-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.content-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: rgba(43,139,230,0.2);
    color: #2b8be6;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.search-results {
    margin-top: 32px;
}

.result-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.result-item:hover {
    border-color: rgba(43,139,230,0.5);
    transform: translateX(8px);
}

.result-item h4 {
    color: #2b8be6;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.result-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.result-item .file-path {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin-top: 8px;
}

.no-results {
    text-align: center;
    padding: 48px;
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        max-height: 300px;
    }

    .main-content {
        padding: 20px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 48px;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #2b8be6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

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