﻿/* Github Primer-like CSS + Layout variables */
:root[data-theme="light"] {
    --bg-color: #ffffff;
    --panel-bg: #f6f8fa;
    --panel-border: #d0d7de;
    --text-main: #24292f;
    --text-muted: #57606a;
    --primary-color: #0969da;
    --primary-hover: #0349b4;
    --sidebar-width: 260px;
    --header-height: 56px;
    --code-bg: #f6f8fa;
}

:root[data-theme="dark"] {
    --bg-color: #0d1117;
    --panel-bg: #161b22;
    --panel-border: #30363d;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --primary-color: #58a6ff;
    --primary-hover: #79c0ff;
    --sidebar-width: 260px;
    --header-height: 56px;
    --code-bg: #161b22;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

/* Layout */
.layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header Navbar */
.main-header {
    height: 60px;
    background-color: #f4f5f7; /* Very light gray */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--panel-border);
}

.header-logo h2 {
    color: #212529;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.header-logo span {
    color: var(--primary-color);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-item {
    color: #495057;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    transition: color 0.2s;
    padding: 22px 0;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
    font-weight: 700;
}

.header-actions {
    display: flex;
    align-items: center;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-y: auto;
}

.breadcrumb-container {
    padding: 12px 40px;
    border-bottom: 1px solid var(--panel-border);
    background-color: #e9ecef; /* Slightly darker gray as requested */
    display: flex;
    align-items: center;
    gap: 16px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-muted);
}

.back-btn {
    background: #ced4da;
    border: none;
    color: #212529;
    cursor: pointer;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #adb5bd;
}

.btn-icon {
    background: transparent;
    border: none;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 18px;
}

.btn-icon:hover {
    color: #ffffff;
}

/* Markdown Rendering */
.markdown-body {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    max-width: 880px;
    margin: 0 auto;
    width: 100%;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.markdown-body h1 {
    font-size: 2em;
    padding-bottom: .3em;
    border-bottom: 1px solid var(--panel-border);
}

.markdown-body h2 {
    font-size: 1.5em;
    padding-bottom: .3em;
    border-bottom: 1px solid var(--panel-border);
}

.markdown-body p {
    margin-top: 0;
    margin-bottom: 16px;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 16px;
    padding-left: 2em;
}

.markdown-body a {
    color: var(--primary-color);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body code {
    padding: .2em .4em;
    margin: 0;
    font-size: 85%;
    background-color: rgba(175, 184, 193, 0.2);
    border-radius: 6px;
}

.markdown-body pre {
    padding: 16px;
    overflow: auto;
    font-size: 85%;
    line-height: 1.45;
    background-color: var(--code-bg);
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid var(--panel-border);
}

.markdown-body pre code {
    background-color: transparent;
    padding: 0;
    border: 0;
}

.markdown-body blockquote {
    padding: 0 1em;
    color: var(--text-muted);
    border-left: .25em solid var(--panel-border);
    margin-bottom: 16px;
}

/* 状态提示 */
.loading-state, .error-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Dashboard UI (动态窗口) */
.dashboard-header {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 20px;
}

.dashboard-header h1 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.dash-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 24px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.dash-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dash-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.25em;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}


