:root {
    --primary-color: #2563eb;
    --bg-color: #f8fafc;
    --sidebar-bg: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--sidebar-bg);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.branding h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.branding .subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.search-container {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

#searchInput {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    font-size: 0.9rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

#searchInput:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.file-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-item:hover {
    border-color: var(--primary-color);
    background-color: #eff6ff;
}

.file-item.active {
    background-color: #eff6ff;
    border-color: var(--primary-color);
    font-weight: 500;
}

.file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0.5rem;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 4px;
}

.btn-icon:hover {
    color: var(--primary-color);
    background-color: #dbeafe;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.current-file-title {
    font-size: 1.1rem;
    font-weight: 600;
}

pre {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin: 0;
    font-family: "Menlo", "Monaco", "Courier New", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    flex: 1;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: 300px; /* Increased height to accommodate search */
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}