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

:root {
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(255, 255, 255, 0.03);
    --bg-panel-hover: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-red: #ff2d55;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -1px;
}

.logo-k { color: #fff; }
.logo-m {
    background: linear-gradient(135deg, var(--accent-red), #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
}

.sidebar-nav {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

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

.nav-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.nav-link {
    display: block;
    padding: 8px 12px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.nav-link:hover {
    background: var(--bg-panel-hover);
    color: #fff;
}

.nav-link.active {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent);
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: 70px;
    padding: 0 40px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.open-sidebar {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: none;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 16px;
    width: 300px;
}

.search-bar svg {
    color: var(--text-muted);
    margin-right: 10px;
}

.search-bar input {
    background: none;
    border: none;
    color: #fff;
    outline: none;
    width: 100%;
    font-family: inherit;
    font-size: 0.9rem;
}

.btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-panel);
}

.content-wrapper {
    padding: 60px 80px;
    max-width: 900px;
    flex: 1;
}

/* Markdown Content Styles */
.docs-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.docs-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 48px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.docs-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.docs-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-muted);
}

.docs-content li {
    margin-bottom: 8px;
}

.docs-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: #ff6b7a;
}

.docs-content pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
    margin-bottom: 24px;
}

.docs-content pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
}

.docs-footer {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
}

/* Background Glows */
.bg-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
}
.bg-glow-1 { top: -200px; left: -200px; background: var(--accent); }
.bg-glow-2 { bottom: -200px; right: -200px; background: var(--accent-red); }

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper { padding: 40px; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .close-sidebar, .open-sidebar { display: block; }
    .search-bar { display: none; }
    .content-wrapper { padding: 24px; }
    .docs-content h1 { font-size: 2rem; }
}
