:root {
    --primary: #f43f5e;
    --primary-light: #fff1f2;
    --text-main: #334155;
    --text-dark: #0f172a;
    --text-light: #94a3b8;
    --bg-main: #ffffff;
    --bg-sidebar: #f8fafc;
    --border: #e2e8f0;
    --sidebar-width: 280px;
    --header-height: 64px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background: var(--bg-main);
}

/* Layout */
header {
    position: fixed;
    top: 0; width: 100%; height: var(--header-height);
    background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; z-index: 100;
}

.logo-link { display: flex; align-items: center; text-decoration: none; color: var(--text-dark); gap: 12px; }
.logo-icon { width: 32px; height: 32px; background: var(--primary); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; }
.logo-text { font-size: 1.2rem; font-weight: 800; }
.logo-text span { color: var(--primary); }

.app-container { display: flex; padding-top: var(--header-height); }

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    height: calc(100vh - var(--header-height));
    position: fixed;
    overflow-y: auto;
    padding: 32px 16px;
    transition: transform 0.3s ease;
}

.content-area {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.container { max-width: 850px; margin: 0 auto; padding: 48px 24px; }

/* Navigation */
.nav-section { margin-bottom: 32px; }
.nav-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; color: var(--text-light); letter-spacing: 0.1em; margin-bottom: 12px; padding-left: 12px; }
.nav-list { list-style: none; }
.nav-item a { 
    display: block; padding: 8px 12px; border-radius: 6px; text-decoration: none; 
    color: var(--text-main); font-size: 0.9rem; font-weight: 500; transition: all 0.2s;
}
.nav-item a:hover { background: #f1f5f9; color: var(--primary); }
.nav-item.active a { background: var(--primary-light); color: var(--primary); font-weight: 600; }

/* Content Typography */
.prose h1 { font-size: 2.5rem; color: var(--text-dark); margin-bottom: 24px; font-weight: 800; border-bottom: 2px solid var(--primary-light); padding-bottom: 12px; }
.prose h2 { font-size: 1.75rem; color: var(--text-dark); margin: 40px 0 16px; font-weight: 700; }
.prose h3 { font-size: 1.25rem; color: var(--text-dark); margin: 24px 0 12px; font-weight: 600; }
.prose p { margin-bottom: 20px; font-size: 1.05rem; }
.prose ul, .prose ol { margin-bottom: 24px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }

/* UI Components */
.img-box { margin: 32px 0; background: #f1f5f9; padding: 12px; border-radius: 12px; border: 1px solid var(--border); text-align: center; }
.img-box img { max-width: 100%; height: auto; border-radius: 6px; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.img-box p { margin: 8px 0 0; font-size: 0.8rem; color: var(--text-light); font-style: italic; }

.alert { padding: 16px 20px; border-radius: 10px; margin: 24px 0; border-left: 4px solid; }
.alert-info { background: #eff6ff; border-left-color: #3b82f6; color: #1e40af; }
.alert-warning { background: #fffbeb; border-left-color: #f59e0b; color: #92400e; }

.breadcrumbs { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-light); margin-bottom: 32px; }
.breadcrumbs a { color: var(--text-light); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); }
.separator { color: var(--border); }
.breadcrumbs .current { color: var(--text-main); font-weight: 500; }

/* Mobile Menu */
#mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); z-index: 200; width: 85%; box-shadow: 20px 0 50px rgba(0,0,0,0.1); }
    .sidebar.open { transform: translateX(0); }
    .content-area { margin-left: 0; }
    #mobile-toggle { display: block; }
    .logo-text { font-size: 1rem; }
}