/* 1. 核心配色变量 */
:root { 
    --theme: #1d1e20; 
    --entry: rgba(46, 46, 51, 0.8); 
    --primary: #ddd; 
    --secondary: #ababab; 
    --border: #333; 
    --accent: #00abff; 
    --bg-gradient: linear-gradient(135deg, #1d1e20 25%, #242528 50%, #1d1e20 75%);
    --ticker-bg: #131722; /* 跑马灯背景变量 */
}

body.light-mode {
    --theme: #f5f5f7;
    --entry: rgba(255, 255, 255, 0.9);
    --primary: #1d1d1f;
    --secondary: #86868b;
    --border: #d2d2d7;
    --accent: #0071e3;
    --bg-gradient: linear-gradient(135deg, #f5f5f7 25%, #ffffff 50%, #f5f5f7 75%);
    --ticker-bg: #ffffff; /* 日间模式跑马灯背景 */
}

/* 2. 背景动画 */
body { 
    margin: 0; padding: 0; line-height: 1.6; color: var(--primary); 
    font-family: -apple-system, system-ui, sans-serif;
    background: var(--bg-gradient);
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    background-attachment: fixed;
    transition: background 0.3s, color 0.3s;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 3. 布局 */
.wrapper { display: flex; max-width: 1200px; margin: 0 auto; padding: 40px 20px; gap: 40px; }
.main-content { flex: 1; min-width: 0; }
header { margin-bottom: 40px; }
header h1 { margin: 0; font-size: 32px; color: var(--primary); }
header p { color: var(--secondary); margin-top: 8px; font-size: 16px; }

/* 4. 跑马灯容器 */
#ticker-container {
    height: 40px; 
    background: var(--ticker-bg); 
    border-bottom: 1px solid var(--border); 
    position: sticky; 
    top: 0; 
    z-index: 999;
    transition: background 0.3s;
}

/* 5. 卡片与组件 */
.post-entry { background: var(--entry); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 35px; overflow: hidden; transition: 0.3s; backdrop-filter: blur(8px); }
.post-entry:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0,0,0,0.4); }
.post-link { text-decoration: none; color: inherit; display: block; }
.cover-wrapper { width: 100%; background: #111; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.entry-cover { width: 100%; height: auto; max-height: 380px; object-fit: contain; display: block; }
.entry-content { padding: 25px; border-top: 1px solid var(--border); }
.entry-content h2 { margin: 0 0 12px; color: var(--primary); font-size: 24px; }
.sidebar { width: 320px; flex-shrink: 0; }
.widget { background: var(--entry); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 30px; backdrop-filter: blur(8px); }
.sticky-widgets { position: sticky; top: 60px; }
.widget h3 { margin: 0 0 15px; font-size: 18px; color: var(--primary); border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.cta-button { display: block; background: var(--accent); color: #fff; text-align: center; padding: 10px; border-radius: 6px; text-decoration: none; font-weight: bold; margin-top: 15px; }
#theme-toggle { width:100%; padding:10px; border-radius:6px; border:1px solid var(--border); background:var(--entry); color:var(--primary); cursor:pointer; font-weight:bold; display:flex; align-items:center; justify-content:center; gap:10px; }

@media (max-width: 1000px) {
    .wrapper { flex-direction: column; }
    .sidebar { width: 100%; }
}
/* =========================================
   文章详情页 (Post Content) 专用样式
========================================= */
.container { max-width: 750px; margin: 0 auto; padding: 40px 20px 80px; }
.nav-back { display: block; margin-bottom: 40px; color: var(--secondary); text-decoration: none; font-size: 14px; transition: 0.2s; }
.nav-back:hover { color: var(--accent); }

/* 文章头部 */
.post-header { margin-bottom: 40px; }
.post-header h1 { font-size: 36px; margin: 0 0 15px; color: var(--primary); line-height: 1.2; }
.post-meta { font-size: 14px; color: var(--secondary); display: flex; gap: 15px; }

/* 正文基础 */
.post-content { font-size: 18px; color: var(--primary); }
.post-content h2 { color: var(--primary); margin-top: 40px; border-bottom: 1px solid var(--border); padding-bottom: 10px; font-size: 26px; }
.post-content h3 { color: var(--primary); margin-top: 30px; font-size: 20px; }
.post-content p { margin: 20px 0; }
.post-content ul { padding-left: 20px; margin: 20px 0; }
.post-content li { margin-bottom: 12px; }
.highlight { color: var(--accent); font-weight: 600; }

/* 图片与特殊框体 */
.img-wrapper { background: #111; border-radius: 12px; margin: 35px 0; overflow: hidden; border: 1px solid var(--border); }
.post-content img { width: 100%; height: auto; display: block; }

.highlight-box {
    background: var(--entry);
    border-left: 4px solid var(--accent);
    padding: 25px;
    border-radius: 4px;
    margin: 35px 0;
}
.highlight-box strong { color: var(--primary); }

blockquote {
    margin: 40px 0; padding: 20px 30px;
    background: rgba(128, 128, 128, 0.1);
    border-left: 3px solid var(--secondary);
    font-style: italic; color: var(--secondary);
}

.post-footer { margin-top: 80px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: var(--secondary); }
