/* ========== Modern Dev Minimal - 现代开发者极简风格 ========== */

/* ========== 全局主题变量 - 暗色模式为默认 ========== */

:root {
    /* 亮色模式变量 */
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-card: #fcfcfc;
    --bg-sidebar: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-code: #e6e6e6;
    --accent: #007bff;
    --accent-hover: #0056b3;
    --accent-light: rgba(0, 123, 255, 0.15);
    --border: #e5e5e5;
    --border-light: #f0f0f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
    --font-serif: Georgia, 'Times New Roman', serif;
}

[data-theme="dark"] {
    /* 暗色模式变量 - 深灰色风格 */
    --bg-primary: #2d2d2d;
    --bg-secondary: #3a3a3a;
    --bg-card: #353535;
    --bg-sidebar: #2d2d2d;
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #707070;
    --text-code: #2d2d2d;
    --accent: #78909c;
    --accent-hover: #90a4ae;
    --accent-light: rgba(120, 144, 156, 0.15);
    --border: #4a4a4a;
    --border-light: #404040;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ========== 全局基础样式 ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 110%;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px 32px 0;
}

/* 主题切换按钮 */
.theme-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}

/* ========== 代码语法高亮样式 ========== */

code {
    font-family: var(--font-mono);
    background: var(--bg-secondary);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--accent);
    word-break: break-word;
}

pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    overflow-x: auto;
    line-height: 1.6;
    margin: 16px 0;
    white-space: pre;
}

pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    word-break: normal;
}

/* 代码语法高亮主题 - 类似 VS Code Dark+ */
.syntax-keyword { color: #569cd6; }
.syntax-string { color: #ce9178; }
.syntax-comment { color: #6a9955; font-style: italic; }
.syntax-function { color: #dcdcaa; }
.syntax-variable { color: #9cdcfe; }
.syntax-number { color: #b5cea8; }
.syntax-type { color: #4ec9b0; }
.syntax-operator { color: #d4d4d4; }
.syntax-punctuation { color: #808080; }
.syntax-constant { color: #569cd6; }
.syntax-class { color: #4ec9b0; }
.syntax-property { color: #9cdcfe; }
.syntax-method { color: #dcdcaa; }

/* 代码块包装器 */
.code-block-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    margin: 16px 0;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: #10b981;
    border-color: transparent;
}

/* ========== 表格样式 ========== */

.table-wrapper {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: var(--radius-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.data-table tr:last-child td {
    border-bottom: none;
}

[data-theme="dark"] .data-table th {
    background: #2d2d2d;
    color: #e8e8e8;
}

[data-theme="dark"] .data-table,
[data-theme="dark"] .data-table th,
[data-theme="dark"] .data-table td {
    border-color: #4a4a4a;
}

[data-theme="dark"] .data-table tr:hover td {
    background: #3a3a3a;
}

/* ========== 提示框 ========== */

.note-box {
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 0.95rem;
}

.note-box strong {
    color: var(--accent);
}

.warning-box {
    background: var(--accent-light);
    border-left: 3px solid var(--accent);
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 0.95rem;
}

.warning-box strong {
    color: var(--accent);
}

.wrong-box {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 0.95rem;
}

.method-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* 继承关系图 */
.inheritance-diagram {
    background: #f8fafc;
    padding: 16px 20px;
    border-radius: 8px;
    font-family: var(--font-mono);
    margin: 12px 0;
}

.inheritance-diagram .diagram-label {
    color: #64748b;
    margin-bottom: 8px;
}

.inheritance-diagram .diagram-arrow {
    text-align: center;
    color: #94a3b8;
}

.inheritance-diagram .diagram-line {
    text-align: center;
    color: #94a3b8;
}

.inheritance-diagram .diagram-row {
    text-align: center;
    padding: 8px 0;
}

.inheritance-diagram .diagram-item {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 12px;
    border-radius: 4px;
    display: inline-block;
}

.inheritance-diagram .diagram-space {
    margin: 0 8px;
    color: #94a3b8;
}

[data-theme="dark"] .inheritance-diagram {
    background: #2d2d2d;
}

[data-theme="dark"] .inheritance-diagram .diagram-label {
    color: #a0a0a0;
}

[data-theme="dark"] .inheritance-diagram .diagram-arrow,
[data-theme="dark"] .inheritance-diagram .diagram-line,
[data-theme="dark"] .inheritance-diagram .diagram-space {
    color: #606060;
}

[data-theme="dark"] .inheritance-diagram .diagram-item {
    background: #3a4a5a;
    color: #90caf9;
}

/* ========== 返回顶部按钮 ========== */

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-hover);
}

/* ========== 滚动条样式 ========== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========== INDEX 首页样式 ========== */

/* 首页头部 */
.site-header {
    padding: 32px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-info {
    flex: 1;
}

.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.site-title span {
    color: var(--accent);
}

.site-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.site-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}

.site-nav a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.site-nav a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.site-nav a.active {
    background: var(--accent);
    color: white;
}

/* 个人资料卡片 */
.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.profile-content {
    flex: 1;
}

.profile-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.profile-bio {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profile-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.8rem;
}

/* 统计信息 */
.stats-bar {
    display: flex;
    gap: 48px;
    padding: 20px 0;
    margin-bottom: 40px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    padding-left: 24px;
    border-radius: var(--radius-md);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 内容区域 */
.content-area {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

/* 区块标题 */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.section-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 10px;
    border-radius: 12px;
}

/* 笔记卡片 */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.note-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}

.note-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.note-card-header {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--border-light);
}

.note-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.note-card-title {
    flex: 1;
}

.note-card-title h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.note-card-title p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.note-card-body {
    padding: 12px 18px;
}

.note-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.note-card-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.note-card-footer {
    padding: 10px 18px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.note-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.note-card-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.8rem;
}

/* 分类区块 */
.category-section {
    margin-bottom: 32px;
}

/* 返回链接 */
.back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--accent-hover);
}

/* 首页底部 */
.site-footer {
    margin-top: 48px;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-quote {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-style: italic;
}

.footer-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== 笔记页面通用样式 ========== */

/* 顶部导航栏 */
.top-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.top-bar .logo {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent);
    white-space: nowrap;
}

.top-bar .date-badge {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: 16px;
    white-space: nowrap;
}

/* 笔记容器 */
.ipc-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 32px 32px 80px;
}

/* 头部卡片 */
.header-card {
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 32px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.header-card h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    margin-bottom: 8px;
}

.header-card .subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-tag {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
}

/* 章节标题 */
.note-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 32px 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
    scroll-margin-top: 80px;
}

/* 章节图标 */
.note-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-right: 10px;
}

/* 笔记页面章节标题 */
.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 36px 0 20px;
    display: flex;
    align-items: center;
    padding-left: 14px;
    border-left: 4px solid var(--accent);
    scroll-margin-top: 80px;
}

.section-title .section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-right: 14px;
    flex-shrink: 0;
}

/* 滚动动画 */
.scroll-animate {
    opacity: 1;
}

/* 引用块 */
.quote-block {
    background: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    margin: 16px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 分类卡片 */
.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}

.category-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.category-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.category-list {
    padding: 16px 20px;
}

.category-list ul {
    list-style: none;
}

.category-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.category-list li:last-child {
    border-bottom: none;
}

.method-name {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 12px;
}

.method-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 内容卡片 */
.content-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.content-card .card-header {
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.card-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.card-title {
    flex: 1;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.content-card .card-body {
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.content-card .card-body ul {
    padding-left: 20px;
    margin: 12px 0;
}

.content-card .card-body ul li {
    margin-bottom: 8px;
}

.content-card .card-body ol {
    padding-left: 20px;
    margin: 12px 0;
}

.content-card .card-body ol li {
    margin-bottom: 8px;
}

/* 关键要点 */
.key-point {
    background: rgba(120, 144, 156, 0.1);
    border-left: 4px solid var(--accent);
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.key-point p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 总结卡片 */
.summary-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
    margin-top: 16px;
}

.summary-card h2 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.summary-card h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.summary-card ul {
    padding-left: 20px;
    margin: 0;
}

.summary-card li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 总结网格布局 */
.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* 总结盒子 - 优势/劣势 */
.summary-box {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
}

.summary-box h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.summary-box ul {
    padding-left: 20px;
    margin: 0;
}

.summary-box li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.summary-box.strength {
    border-left: 4px solid #4caf50;
}

.summary-box.weakness {
    border-left: 4px solid #ff9800;
}

/* 建议盒子 */
.suggestion-box {
    background: rgba(120, 144, 156, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    border-left: 4px solid var(--accent);
}

.suggestion-box h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.suggestion-box p {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========== FAQ 组件 ========== */
.faq-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.faq-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.faq-header:hover {
    background: var(--bg-card);
}

.faq-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.faq-question {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.faq-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.faq-content {
    padding: 16px 18px;
    background: var(--bg-card);
    display: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-card.open .faq-content {
    display: block;
}

.faq-card.open .faq-arrow {
    transform: rotate(180deg);
}

/* ========== Compare Grid 组件 ========== */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.compare-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border);
}

.compare-card h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.compare-card ul {
    padding-left: 20px;
    margin: 0;
}

.compare-card li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.compare-card.pros {
    border-left: 4px solid #4caf50;
}

.compare-card.cons {
    border-left: 4px solid #ff9800;
}

/* ========== Checklist 组件 ========== */
.checklist-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.checklist-header {
    padding: 14px 18px;
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.checklist-header span {
    margin-right: 8px;
}

.checklist-body {
    padding: 16px 18px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.check-item:last-child {
    margin-bottom: 0;
}

.check-box {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.check-text {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    padding-top: 1px;
}

/* ========== 暗色模式下的代码块 ========== */

[data-theme="dark"] pre {
    background: #0d0d0d;
    color: #d4d4d4;
}

[data-theme="dark"] .copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .copy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ========== Prism Line Numbers 样式覆盖 ========== */

pre.line-numbers .line-numbers-rows {
    border-right: none !important;
    box-shadow: none !important;
}

.line-numbers-rows > span::before {
    color: #6b7280 !important;
}

/* ========== 导航侧边栏 ========== */

/* 侧边栏主体 — 固定左侧，默认完全隐藏，位于 top-bar 下方 */
.sidebar {
    position: fixed;
    left: 0;
    top: 54px;
    height: calc(100vh - 54px);
    width: 320px;
    z-index: 90;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* 侧边栏内部滚动区 */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 12px 20px;
    opacity: 1;
    transition: opacity 0.15s ease;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-scroll {
    opacity: 0;
    pointer-events: none;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 3px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* 侧边栏头部 */
.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-head-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.sidebar-head-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.sidebar-head-close:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--accent);
}

/* 侧边栏分类折叠 */
.sidebar-category {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 14px 6px 6px;
    margin-top: 4px;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s;
    white-space: nowrap;
}

.sidebar-category:hover {
    color: var(--text-primary);
}

.sidebar-category::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-muted);
    margin-left: auto;
    transition: transform 0.2s ease;
}

.sidebar-category.collapsed::after {
    transform: rotate(-90deg);
}

.sidebar-category.collapsed + .sidebar-nav {
    display: none;
}

.sidebar-category:first-of-type {
    margin-top: 0;
    padding-top: 8px;
}

/* 笔记链接 */
.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.84rem;
    color: var(--text-secondary);
    transition: all 0.12s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav a:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

/* 左边缘竖排展开按钮 .mysb-unfold */
.mysb-unfold {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    z-index: 91;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
/* 侧边栏展开时，按钮移到 sidebar 右边缘并隐藏 */
.sidebar.open ~ .mysb-unfold {
    left: 320px;
    opacity: 0;
    pointer-events: none;
}

/* 侧边栏折叠时按钮可见 */
.sidebar.collapsed ~ .mysb-unfold {
    left: 0;
    opacity: 1;
    pointer-events: auto;
}

.mysb-unfold:hover {
    background: var(--accent-light);
    color: var(--accent);
    width: 24px;
}

/* 主内容区 */
.page-layout {
    margin-left: 0;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
}

.page-layout.sidebar-open {
    margin-left: 320px;
}

/* 遮罩层 */
.sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 80;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ========== 响应式 ========== */

@media (max-width: 860px) {
    .sidebar {
        width: 320px;
        top: 0;
        height: 100vh;
        z-index: 170;
    }
    .sidebar-overlay {
        z-index: 160;
    }

    .page-layout {
        margin-left: 0 !important;
    }

    /* 移动端展开按钮：固定在左下角 */
    .sidebar-mobile-btn {
        display: flex;
        position: fixed;
        bottom: 24px;
        left: 24px;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--accent);
        color: white;
        border: none;
        cursor: pointer;
        font-size: 1.2rem;
        z-index: 169;
        box-shadow: 0 2px 12px rgba(0,0,0,0.2);
        align-items: center;
        justify-content: center;
    }
    .mysb-unfold {
        display: none;
    }
}

@media (min-width: 861px) {
    .sidebar-mobile-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 16px;
        padding-left: 16px;
    }

    .site-title {
        font-size: 1.4rem;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-card {
        flex-direction: column;
    }

    .ipc-container {
        padding: 20px 16px 60px;
    }

    .header-card {
        padding: 24px;
    }

    .header-card h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 1024px) {
    .notes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== FAQ 组件 ========== */
.faq-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.faq-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.faq-header:hover {
    background: var(--bg-card);
}

.faq-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

.faq-question {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.faq-arrow {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.faq-content {
    padding: 16px 18px;
    background: var(--bg-card);
    display: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.faq-card.open .faq-content {
    display: block;
}

.faq-card.open .faq-arrow {
    transform: rotate(180deg);
}

/* ========== Compare Grid 组件 ========== */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.compare-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border);
}

.compare-card h4 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.compare-card ul {
    padding-left: 20px;
    margin: 0;
}

.compare-card li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.compare-card.pros {
    border-left: 4px solid #4caf50;
}

.compare-card.cons {
    border-left: 4px solid #ff9800;
}

/* ========== Checklist 组件 ========== */
.checklist-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.checklist-header {
    padding: 14px 18px;
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}

.checklist-header span {
    margin-right: 8px;
}

.checklist-body {
    padding: 16px 18px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
}

.check-item:last-child {
    margin-bottom: 0;
}

.check-box {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.check-text {
    flex: 1;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    padding-top: 1px;
}

/* ========== 关于页面样式 ========== */
.about-section {
    margin-bottom: 32px;
}

.about-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
}

.profile-intro {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.profile-info h2 {
    margin: 0 0 4px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.profile-info p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.about-text {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.skill-tag {
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
}

.timeline {
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 4px;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-info {
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* ========== 归档页面样式 ========== */
.archive-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.year-section {
    margin-bottom: 32px;
}

.year-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent);
}

.month-section {
    margin-bottom: 24px;
}

.month-title {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.archive-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border);
    text-decoration: none;
    transition: all 0.2s;
}

.archive-card:hover {
    border-color: var(--accent);
    transform: translateX(4px);
}

.archive-date {
    width: 50px;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.archive-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.archive-icon.interview {
    background: rgba(244, 139, 81, 0.15);
}

.archive-icon.ipc {
    background: rgba(120, 144, 156, 0.15);
}

.archive-icon.view {
    background: rgba(78, 201, 176, 0.15);
}

.archive-icon.android {
    background: rgba(139, 195, 74, 0.15);
}

.archive-content {
    flex: 1;
    min-width: 0;
}

.archive-title {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.archive-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-category {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.archive-arrow {
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* 目录卡片 */
.toc-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.toc-card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.icon-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 8px;
}

.toc-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.toc-list li {
    flex: 0 0 auto;
    width: calc(50% - 16px);
}

.toc-list a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.toc-list a:hover {
    color: var(--accent);
}

.toc-num {
    font-weight: 600;
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* 打印按钮 */
.print-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.print-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* 问题卡片 */
.question-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.q-header {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.q-header:hover {
    background: var(--bg-primary);
}

.q-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.q-text {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.q-arrow {
    font-size: 0.75rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.q-header.expanded .q-arrow {
    transform: rotate(180deg);
}

.q-body {
    padding: 18px;
    display: none;
}

.q-header.expanded + .q-body {
    display: block;
}

.answer-block {
    background: var(--bg-secondary);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.your-answer-block {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.tag-correct {
    display: inline-block;
    background: rgba(76, 175, 80, 0.15);
    color: #4caf50;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 8px;
}

.tag-partial {
    display: inline-block;
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 8px;
}

.tag-unknown {
    display: inline-block;
    background: rgba(158, 158, 158, 0.15);
    color: #9e9e9e;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-left: 8px;
}

.comment-block {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.expand-block {
    margin-top: 12px;
}

/* 成功提示框 */
.success-box {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4caf50;
    padding: 14px 18px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 16px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* 导航元素 */
nav.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* 问答卡片标题 */
.q-title {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* 优缺点对比网格 */
.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.pros-card,
.cons-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.pros-card h4,
.cons-card h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.pros-card ul,
.cons-card ul {
    padding-left: 20px;
    margin: 0;
}

.pros-card li,
.cons-card li {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 总结框 */
.summary-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.summary-box h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.summary-box ul {
    padding-left: 20px;
    margin: 0;
}

.summary-box li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* 决策框 */
.decision-box {
    background: rgba(120, 144, 156, 0.1);
    border-left: 4px solid var(--accent);
    padding: 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 16px;
}

.decision-box h4 {
    margin-top: 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.decision-box ul {
    padding-left: 20px;
    margin: 8px 0 0;
}

.decision-box li {
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

/* 高亮文本 */
.highlight {
    background: rgba(120, 144, 156, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* 推荐提示 */
.recommend {
    background: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4caf50;
    padding: 12px 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 16px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* 暗色模式表格样式 */
table.compare-table {
    margin: 8px 0;
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.compare-table thead tr {
    background: #f5f5f5;
}

.compare-table th,
.compare-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.compare-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.compare-table tbody tr:nth-child(odd) {
    background: #fafafa;
}

[data-theme="dark"] .compare-table thead tr {
    background: #2d2d2d;
}

[ data-theme="dark"] .compare-table th,
[data-theme="dark"] .compare-table td {
    border-color: #4a4a4a;
    color: #e8e8e8;
}

[ data-theme="dark"] .compare-table tbody tr:nth-child(even) {
    background: #353535;
}

[ data-theme="dark"] .compare-table tbody tr:nth-child(odd) {
    background: #2d2d2d;
}

/* 子章节样式 */
.sub-section {
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}
.sub-section:last-child {
    margin-bottom: 0;
}

.sub-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.sub-section ul {
    padding-left: 20px;
    margin: 0;
}

.sub-section ul li {
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* 内容区域样式 */
.content {
    margin-top: 16px;
}

.section {
    margin-bottom: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.section .section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 4px solid var(--accent);
}

.section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* ================================================================
   页内右侧导航 (In-Page TOC) — 与侧边栏风格一致
   固定右侧，210px 宽，1350px 以下隐藏，亮暗双主题
   ================================================================ */
#pageNav {
    position: fixed;
    right: 0;
    top: 54px;
    width: 210px;
    height: calc(100vh - 54px);
    z-index: 85;
    display: flex;
    flex-direction: column;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 20px rgba(0,0,0,0.10);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
#pageNav.collapsed {
    transform: translateX(172px);
}
#pageNav.collapsed .page-nav-body {
    opacity: 0;
    pointer-events: none;
}

/* 展开/折叠手柄 — 与 .mysb-unfold 风格一致 */
.page-nav-handle {
    position: absolute;
    left: -22px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 60px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    z-index: 86;
    transition: all 0.15s;
}
.page-nav-handle:hover {
    background: var(--accent-light);
    color: var(--accent);
    width: 24px;
}

/* 导航主体 — 与 .sidebar-scroll 风格一致 */
.page-nav-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.15s ease;
}
.page-nav-body::-webkit-scrollbar { width: 3px; }
.page-nav-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* 导航头部 — 与 .sidebar-head 风格一致 */
.page-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
}
.page-nav-head-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.page-nav-head-close {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}
.page-nav-head-close:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
    color: var(--accent);
}

/* 导航项 — 与 .sidebar-nav a 风格一致 */
.page-nav-item {
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    line-height: 1.4;
    transition: all 0.12s ease;
    white-space: normal;
    word-break: break-word;
}
.page-nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}
.page-nav-item.active {
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 1350px) {
    #pageNav { display: none; }
}
/* ========== 关于页面 — 联系信息值 ========== */
.contact-value {
    color: var(--text-primary);
    font-size: 0.95rem;
    word-break: break-all;
}

/* ========== 关于页面 — 感谢框 ========== */
.thanks-box {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid var(--border);
    text-align: center;
}
.thanks-box h3 {
    font-size: 1.1rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.thanks-box p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}
