/* ==========================================================
   1. 基础重置与全局样式
   ========================================================== */
:root {
    --global-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --nav-bg: rgba(255, 255, 255, 0.8);
    --nav-text: #1d1d1f;
    --nav-muted: #86868b;
    --nav-border: rgba(0, 0, 0, 0.05);
    --logo-url: url('logo-dark.png'); 
    --card-bg: #ffffff;
    --border-color: rgba(0,0,0,0.05);
    --shadow-color: rgba(0,0,0,0.05);
}

@media (prefers-color-scheme: dark) {
    :root {
        --nav-bg: rgba(0, 0, 0, 0.8);
        --nav-text: #f5f5f7;
        --nav-muted: #a1a1a6;
        --nav-border: rgba(255, 255, 255, 0.1);
        --logo-url: url('logo-light.png');
        --card-bg: #1c1c1e;
        --border-color: rgba(255,255,255,0.1);
        --shadow-color: rgba(0,0,0,0.2);
    }
}
  
body {
    font-family: var(--global-font);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    background: var(--bg-color, #f5f5f7);
    color: var(--nav-text);
    overflow-x: hidden;
}
@media (prefers-color-scheme: dark) { body { background: #000; } }

a { text-decoration: none; color: inherit; }
img, video, iframe { max-width: 100%; height: auto; display: block; }

/* ==========================================================
   2. 全宇宙统一的导航栏样式 (镇压一切不服)
   ========================================================== */
.global-nav { 
    position: fixed !important; 
    top: 0; left: 0; width: 100%; height: 56px; 
    z-index: 9999 !important; 
    background: var(--nav-bg); 
    backdrop-filter: saturate(180%) blur(20px); 
    display: flex; align-items: center; justify-content: space-between; 
    padding: 0 40px !important; box-sizing: border-box; 
    transition: transform 0.3s ease-in-out; 
    border-bottom: 1px solid var(--nav-border);
}

.global-nav.nav-hidden { transform: translateY(-100%); }

.nav-brand { display: flex; align-items: center; gap: 8px !important; }
.nav-logo { 
    width: 20px !important; height: 20px !important; 
    background-image: var(--logo-url); 
    background-size: contain; background-repeat: no-repeat; background-position: center; 
}
.nav-title { font-size: 18px !important; font-weight: 700; color: var(--nav-text); letter-spacing: 0.5px; }

.nav-links { display: flex; gap: 30px !important; }
.nav-links a { font-size: 15px !important; font-weight: 500; color: var(--nav-muted); transition: color 0.3s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--nav-text); font-weight: 700;}

@media screen and (max-width: 768px) {
    .global-nav { padding: 0 20px !important; }
    .nav-links { gap: 15px !important; }
}

/* ==========================================================
   3. Index_news (Blog) 的独占排版
   ========================================================== */
.blog-container { 
    display: flex; 
    max-width: 1300px; /* 🚀 加宽！适配你的超级大屏 */
    margin: 100px auto; 
    padding: 0 40px; 
    gap: 60px; 
    align-items: flex-start; 
}

.blog-main { 
    flex: 1; display: flex; flex-direction: column; gap: 40px; 
    min-width: 0; /* 绝对防止被长单词撑破 */
}

.blog-sidebar { 
    width: 340px; position: sticky; top: 100px; flex-shrink: 0; 
    display: flex; flex-direction: column; gap: 30px;
}

.sidebar-moodboard { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.sidebar-moodboard img { width: 100%; border-radius: 20px; }
.moodboard-caption { text-align: center; font-size: 13px; color: var(--nav-muted); font-style: italic; }

.ramblings-section { display: flex; flex-direction: column; gap: 15px; }
.sidebar-title { font-size: 12px; font-weight: 700; color: #0071e3; text-transform: uppercase; letter-spacing: 1px; }
.sidebar-heading { font-size: 24px; font-weight: 700; margin: 0; color: var(--nav-text); }

.ramblings-list { display: flex; flex-direction: column; gap: 16px; }
.rambling-card {
    background: var(--card-bg); border: 1px solid var(--nav-border); border-radius: 16px;
    padding: 16px; box-shadow: 0 4px 15px var(--shadow-color); transition: transform 0.2s ease, background 0.2s ease;
}
.rambling-card:hover { transform: translateX(4px); }
.rambling-date { font-size: 12px; font-weight: 600; color: var(--nav-muted); margin-bottom: 8px; }
.rambling-text { font-size: 14px; line-height: 1.5; color: var(--nav-text); }

.category-section { display: flex; flex-direction: column; }
.category-title { font-size: 28px; font-weight: 700; color: var(--nav-text); }
.category-subtitle { font-size: 14px; color: var(--nav-muted); margin-top: 6px; margin-bottom: 30px; display: block; }
.blog-list { display: flex; flex-direction: column; gap: 20px; }

.blog-card {
    display: flex; flex-direction: row; align-items: center; background: var(--card-bg); 
    border: 1px solid var(--border-color); border-radius: 20px; padding: 24px; gap: 30px; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px var(--shadow-color); }

.blog-content { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0;}
.blog-meta { font-size: 12px; font-weight: 600; color: var(--nav-muted); }
.blog-title { font-size: 20px; font-weight: 700; margin: 0; color: var(--nav-text); }
.blog-excerpt {
    font-size: 14px; color: var(--nav-muted); line-height: 1.6; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.blog-cover { width: 220px; height: 140px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }

@media screen and (max-width: 900px) {
    .blog-container { flex-direction: column; padding: 0 20px; gap: 40px; }
    .blog-sidebar { width: 100%; position: relative; top: 0; margin-top: 20px; }
}
@media screen and (max-width: 600px) {
    .blog-card { flex-direction: column-reverse; align-items: stretch; padding: 16px; gap: 15px; }
    .blog-cover { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}