/* ==========================================================
   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'); 
}

@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');
    }
}
  
body {
    font-family: var(--global-font);
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img, video, iframe { max-width: 100%; height: auto; display: block; }

/* ==========================================================
   2. 全宇宙统一的导航栏样式 (镇压一切不服)
   ========================================================== */
.global-nav { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 56px; 
    background: var(--nav-bg); 
    backdrop-filter: saturate(180%) blur(20px); 
    -webkit-backdrop-filter: saturate(180%) blur(20px); 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 40px !important; /* 强制两边内边距 */
    box-sizing: border-box; 
    z-index: 9999; 
    border-bottom: 1px solid var(--nav-border); 
    transition: transform 0.3s ease-in-out; 
}

.global-nav, .global-nav * { 
    margin: 0 !important; 
    padding: 0; 
} 

.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); }

@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: 1100px; margin: 0 auto 100px; padding: 0 20px; gap: 40px; align-items: flex-start; }
.blog-main { flex: 1; display: flex; flex-direction: column; gap: 40px; }
.category-section { display: flex; flex-direction: column; gap: 20px; }
.category-title { font-size: 15px; font-weight: 600; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }

.blog-sidebar { width: 320px; position: sticky; top: 80px; flex-shrink: 0; }
.sidebar-image-box { width: 100%; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px var(--shadow-color); border: 1px solid var(--border-color); }
.sidebar-image-box img { width: 100%; height: auto; display: block; object-fit: cover; transition: transform 0.5s ease; }
.sidebar-image-box:hover img { transform: scale(1.05); }
.sidebar-caption { text-align: center; font-size: 13px; margin-top: 15px; font-style: italic; }

.blog-card {
    background: var(--card-bg); border-radius: 20px; padding: 25px;
    box-shadow: 0 4px 15px var(--shadow-color); border: 1px solid var(--border-color);
    display: flex; gap: 25px; align-items: center; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px var(--shadow-color); }

.blog-content { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.blog-meta { font-size: 13px; margin-bottom: 8px; font-weight: 600; }
.blog-title { font-size: 20px; margin-bottom: 10px; font-weight: 700; line-height: 1.3; color: inherit;}
.blog-excerpt { font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.blog-cover { width: 200px; height: 140px; border-radius: 12px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-color); }

@media (max-width: 768px) {
    .blog-container { flex-direction: column-reverse; }
    .blog-sidebar { width: 100%; position: static; margin-bottom: 20px; }
    .blog-card { flex-direction: column-reverse; padding: 20px; gap: 15px; align-items: flex-start; }
    .blog-cover { width: 100%; height: 200px; }
}