:root { --primary-color: #3b82f6; --secondary-color: #1e40af; --accent-color: #06b6d4; --text-primary: #1f2937; --text-secondary: #6b7280; --bg-primary: #f8fafc; --bg-secondary: #ffffff; --border-color: #e5e7eb; --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.6; color: var(--text-primary); background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); min-height: 100vh; }
.page-header { background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.header-content { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-decoration: none; }
.header-actions { display: flex; gap: 1rem; align-items: center; }
.btn { padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; text-decoration: none; transition: all 0.2s; border: none; cursor: pointer; }
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--secondary-color); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary-color); border: 1px solid var(--primary-color); }
.btn-outline:hover { background: var(--primary-color); color: white; }
.main-container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width:1024px) {
.main-container { grid-template-columns: 1fr 280px; }
}
.content-area { min-width: 0; }
.article-header { background: var(--bg-secondary); border-radius: 1rem; padding: 2rem; margin-bottom: 2rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
.article-title { font-size: clamp(1.875rem, 4vw, 3rem); font-weight: 800; background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.2; margin: 0 0 1rem 0; }
.article-meta { display: flex; align-items: center; gap: 1rem; color: var(--text-secondary); font-size: 0.875rem; }
.meta-item { display: flex; align-items: center; gap: 0.25rem; }
.content-wrapper { background: var(--bg-secondary); border-radius: 1rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); overflow: hidden; }
#preview { padding: 2rem; line-height: 1.8; }
.sidebar { position: sticky; top: 6rem; height: fit-content; }
#outline { background: var(--bg-secondary); border-radius: 1rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
.outline-title { padding: 1.5rem; font-size: 1rem; font-weight: 600; color: var(--text-primary); margin: 0; border-bottom: 1px solid var(--border-color); }
.outline-toggle { display: none; position: fixed; bottom: 2rem; right: 2rem; width: 3.5rem; height: 3.5rem; background: var(--primary-color); color: white; border: none; border-radius: 50%; box-shadow: var(--shadow-lg); cursor: pointer; z-index: 200; transition: all 0.3s; }
.outline-toggle:hover { transform: scale(1.1); background: var(--secondary-color); }
.page-footer { background: var(--bg-secondary); border-top: 1px solid var(--border-color); margin-top: 4rem; padding: 2rem 0; text-align: center; }
.footer-content { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; color: var(--text-secondary); font-size: 0.875rem; }
.footer-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 1rem; }
.footer-links a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-color); }
@media (max-width:1023px) {
.sidebar { display: none; }
.outline-toggle { display: flex; align-items: center; justify-content: center; }
#outline.mobile-show { display: block; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90vw; max-width: 400px; max-height: 70vh; z-index: 300; box-shadow: var(--shadow-lg); }
.overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 250; display: none; }
.overlay.show { display: block; }
}
@media (max-width:768px) {
.header-content { padding: 0.75rem 1rem; }
.main-container { padding: 1rem; }
.article-header { padding: 1.5rem; margin-bottom: 1.5rem; }
#preview { padding: 1.5rem; }
}
/* 滚动条样式 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }
@media print {
.page-header, .outline-toggle, .overlay { display: none !important; }
.main-container { grid-template-columns: 1fr !important; padding: 0 !important; }
.sidebar { display: none !important; }
.article-header, .content-wrapper { box-shadow: none !important; border: 1px solid #ddd !important; }
.article-title { -webkit-text-fill-color: unset; color: var(--primary-color); }
body { background: white !important; }
.page-footer { display: none !important; }
}
