/* ============================================================
   国际油价观察 - 全局样式表
   统一所有页面的视觉风格，消除代码重复
   ============================================================ */

/* ---- CSS 变量 ---- */
:root {
    --primary-bg: #fafbfc;
    --secondary-bg: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-muted: #8899aa;
    --accent-blue: #1a73e8;
    --accent-gold: #e67e00;
    --accent-gold-light: #fff3e0;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.10);
    --positive: #16a34a;
    --negative: #dc2626;
    --transition: all 0.2s ease;
    --radius: 8px;
}

/* ---- 基础重置 ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.75;
    font-size: 16px;
}

/* ---- 容器 ---- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---- 导航栏 ---- */
.nav-bar {
    background: var(--secondary-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center;
}
.nav-brand {
    color: var(--accent-gold);
    font-weight: 700; font-size: 1.05rem;
    padding: 14px 24px; text-decoration: none; white-space: nowrap;
    display: flex; align-items: center; gap: 8px;
}
.nav-brand img { height: 24px; width: 24px; }
.nav-links { display: flex; margin-left: auto; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    padding: 14px 18px; font-size: 0.95rem;
    transition: var(--transition); white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--accent-gold); }
.nav-links a.active { color: var(--accent-gold); border-bottom-color: var(--accent-gold); font-weight: 600; }

/* ---- 面包屑 ---- */
.breadcrumb {
    padding: 16px 0; font-size: 0.85rem; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--accent-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--border-color); }

/* ---- 页面头部 ---- */
.header {
    background: linear-gradient(135deg, #fff8f0 0%, #fff3e0 50%, #ffffff 100%);
    padding: 48px 0 36px; border-bottom: 3px solid var(--accent-gold);
}
.header h1 {
    font-size: 2.4rem; font-weight: 800; text-align: center;
    color: var(--text-primary); margin-bottom: 12px;
}
.header .subtitle {
    text-align: center; color: var(--text-secondary); font-size: 1.05rem;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 12px;
}
.header .tag {
    background: var(--accent-gold-light); color: var(--accent-gold);
    padding: 5px 14px; border-radius: 20px; font-size: 0.85rem;
    font-weight: 500; border: 1px solid rgba(230,126,0,0.2);
}
.header .update-time {
    text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: 10px;
}

/* ---- 数据卡片 ---- */
.data-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px; margin: 32px 0;
}
.data-card {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition); position: relative; overflow: hidden;
}
.data-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg); border-color: var(--accent-gold);
}
.data-card::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 4px; height: 100%; background: var(--accent-gold);
    border-radius: 4px 0 0 4px;
}
.card-title {
    font-size: 0.85rem; color: var(--text-muted);
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.card-value {
    font-size: 2rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary);
}
.card-change { font-size: 1rem; font-weight: 600; }
.negative { color: var(--negative); }
.positive { color: var(--positive); }

/* ---- 内容区块 ---- */
.content-section {
    background: var(--secondary-bg); border-radius: var(--radius);
    padding: 32px; margin: 24px 0;
    box-shadow: var(--shadow); border: 1px solid var(--border-color);
}
.section-title {
    font-size: 1.35rem; font-weight: 700;
    margin-bottom: 20px; color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(230,126,0,0.25);
    display: flex; align-items: center; gap: 10px;
}
.section-title .icon { font-size: 1.3rem; }
.content-section p {
    color: var(--text-secondary); margin-bottom: 14px;
}
.content-section p strong { color: var(--text-primary); }

/* ---- 文章卡片 ---- */
.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px; margin-top: 16px;
}
.article-card {
    background: var(--card-bg); border-radius: var(--radius);
    padding: 22px; border: 1px solid var(--border-color);
    text-decoration: none; color: var(--text-primary);
    transition: var(--transition); display: flex; gap: 14px;
}
.article-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.article-card .article-thumb {
    width: 80px; height: 80px; border-radius: 6px;
    background: linear-gradient(135deg, #fff8f0, #ffe0b2);
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; overflow: hidden;
}
.article-card .article-thumb img {
    width: 100%; height: 100%; object-fit: cover;
}
.article-card .article-info { flex: 1; min-width: 0; }
.article-card .article-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px;
}
.article-card .article-meta .cat-tag {
    background: var(--accent-gold-light); color: var(--accent-gold);
    padding: 2px 8px; border-radius: 10px; font-size: 0.72rem; font-weight: 500;
}
.article-card h3 {
    font-size: 1.05rem; color: var(--text-primary);
    margin-bottom: 6px; line-height: 1.4;
}
.article-card .article-date { color: var(--text-muted); font-size: 0.8rem; }
.article-card .article-excerpt {
    color: var(--text-secondary); font-size: 0.85rem;
    line-height: 1.5; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---- 文章详情页 ---- */
.article-header {
    padding: 40px 0 24px; text-align: center;
}
.article-header h1 {
    font-size: 2rem; font-weight: 800; margin-bottom: 12px; line-height: 1.35;
}
.article-header .article-meta-detail {
    color: var(--text-muted); font-size: 0.9rem;
    display: flex; justify-content: center; align-items: center;
    gap: 16px; flex-wrap: wrap;
}
.article-header .article-meta-detail .cat-tag {
    background: var(--accent-gold-light); color: var(--accent-gold);
    padding: 4px 12px; border-radius: 12px; font-size: 0.82rem; font-weight: 500;
}
.author-badge {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: var(--text-secondary);
}
.author-badge .avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #ffb74d, #e67e00);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.85rem;
}
.article-body {
    background: var(--secondary-bg); border-radius: var(--radius);
    padding: 36px; margin: 20px 0;
    box-shadow: var(--shadow); border: 1px solid var(--border-color);
    line-height: 1.9; font-size: 1.02rem;
}
.article-body h2 {
    font-size: 1.35rem; font-weight: 700; color: var(--text-primary);
    margin: 32px 0 14px; padding-bottom: 8px;
    border-bottom: 2px solid rgba(230,126,0,0.15);
}
.article-body h3 {
    font-size: 1.1rem; font-weight: 700; color: var(--text-primary);
    margin: 24px 0 10px;
}
.article-body p {
    color: var(--text-secondary); margin-bottom: 16px;
}
.article-body p strong { color: var(--text-primary); }
.article-body ul, .article-body ol {
    color: var(--text-secondary); padding-left: 24px; margin-bottom: 16px;
}
.article-body ul li, .article-body ol li { margin-bottom: 8px; }
.article-body .highlight-box {
    background: #fff8f0; border-left: 4px solid var(--accent-gold);
    padding: 16px 20px; margin: 20px 0; border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.95rem; color: var(--text-secondary);
}
.article-body img {
    max-width: 100%; height: auto; border-radius: var(--radius);
    margin: 20px 0; display: block;
}
.article-body .img-caption {
    text-align: center; font-size: 0.85rem; color: var(--text-muted);
    margin-top: -12px; margin-bottom: 20px;
}

/* ---- 相关阅读 ---- */
.related-reading {
    background: var(--secondary-bg); border-radius: var(--radius);
    padding: 28px; margin: 24px 0;
    box-shadow: var(--shadow); border: 1px solid var(--border-color);
}
.related-reading h3 {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 14px;
    color: var(--text-primary);
}
.related-reading .related-links {
    display: flex; flex-wrap: wrap; gap: 10px;
}
.related-reading .related-links a {
    color: var(--accent-blue); text-decoration: none; font-size: 0.9rem;
    padding: 6px 14px; border: 1px solid var(--border-color);
    border-radius: 20px; transition: var(--transition);
}
.related-reading .related-links a:hover {
    border-color: var(--accent-gold); color: var(--accent-gold);
    background: var(--accent-gold-light);
}

/* ---- 笔记编辑器 ---- */
.notes-editor {
    background: #f8f9fb; border: 1px solid var(--border-color);
    border-radius: var(--radius); padding: 20px;
    color: var(--text-primary); font-size: 15px; line-height: 1.8;
    min-height: 200px; outline: none; transition: border-color 0.3s ease;
}
.notes-editor:focus { border-color: var(--accent-gold); background: #fff; }
.notes-editor:empty:before {
    content: '在这里写下你的感悟...'; color: #c0c8d0; pointer-events: none;
}
.notes-status {
    text-align: right; font-size: 12px; color: var(--positive); margin-top: 6px; display: none;
}

/* ---- 页脚 ---- */
.footer {
    background: #f1f5f9; padding: 36px 0; margin-top: 48px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.footer .sources {
    color: var(--text-muted); font-size: 0.85rem;
    margin-bottom: 16px; line-height: 1.7;
}
.footer .disclaimer {
    color: var(--text-muted); font-size: 0.82rem;
    font-style: italic; margin-bottom: 12px;
}
.footer .footer-links {
    display: flex; justify-content: center; gap: 24px; flex-wrap: wrap;
    margin-bottom: 10px;
}
.footer .footer-links a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.85rem;
    transition: var(--transition);
}
.footer .footer-links a:hover { color: var(--accent-gold); }
.footer .footer-beian { margin-bottom: 6px; }
.footer .footer-beian a {
    color: var(--text-muted); text-decoration: none; font-size: 0.83rem;
}
.footer .footer-beian a:hover { color: var(--accent-gold); }
.footer .footer-operator {
    color: var(--text-muted); font-size: 0.78rem; opacity: 0.8;
}

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .header h1 { font-size: 1.8rem; }
    .data-cards { grid-template-columns: 1fr 1fr; }
    .article-list { grid-template-columns: 1fr; }
    .content-section { padding: 22px; }
    .article-body { padding: 24px; }
    .card-value { font-size: 1.5rem; }
    .nav-links a { padding: 12px 10px; font-size: 0.82rem; }
    .nav-brand { padding: 12px 14px; font-size: 0.95rem; }
}
@media (max-width: 480px) {
    .header h1 { font-size: 1.5rem; }
    .data-cards { grid-template-columns: 1fr; }
    .subtitle { flex-direction: column; align-items: center; gap: 6px; }
    .container { padding: 0 16px; }
    .article-header h1 { font-size: 1.5rem; }
    .article-card { flex-direction: column; }
    .article-card .article-thumb { width: 100%; height: 140px; }
}


/* ---- 深度审核优化：可信度与图文结构 ---- */
.nav-links a { padding-left: 14px; padding-right: 14px; }
.hero-visual { margin: 28px 0 20px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-color); box-shadow: var(--shadow); background: #fff; }
.hero-visual img { width: 100%; display: block; aspect-ratio: 1200 / 360; object-fit: cover; object-position: center; }
.audit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0 4px; }
.audit-item { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 8px; padding: 14px 16px; }
.audit-item strong { display: block; color: var(--text-primary); margin-bottom: 4px; }
.audit-item span { color: var(--text-muted); font-size: .88rem; }
.article-card .article-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.article-cover { margin: 0 0 24px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border-color); background: #fff; box-shadow: var(--shadow); }
.article-cover img { width: 100%; display: block; aspect-ratio: 1200 / 630; object-fit: cover; }
.article-cover figcaption { padding: 8px 12px; color: var(--text-muted); font-size: .82rem; text-align: center; background: #f8fafc; }
.reading-tip { background: #f8fafc; border: 1px solid var(--border-color); border-left: 4px solid var(--accent-gold); border-radius: 0 8px 8px 0; padding: 14px 18px; margin: 4px 0 18px; color: var(--text-secondary); font-size: .95rem; }
.reading-tip strong { color: var(--text-primary); }
.author-card, .source-panel { background: #fff; border: 1px solid var(--border-color); border-radius: 8px; padding: 18px 20px; margin: 22px 0; box-shadow: var(--shadow-sm); }
.author-card h3, .source-panel h3 { margin-bottom: 10px; color: var(--text-primary); font-size: 1.05rem; }
.author-card p, .source-panel p { color: var(--text-secondary); font-size: .94rem; margin-bottom: 8px; }
.source-panel ul { margin: 8px 0 0 18px; color: var(--text-secondary); }
.source-panel li { margin-bottom: 6px; }
.source-panel a, .source-list a, .archive-list a { color: var(--accent-blue); text-decoration: none; }
.source-panel a:hover, .source-list a:hover, .archive-list a:hover { text-decoration: underline; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.source-item { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 8px; padding: 16px; }
.source-item h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text-primary); }
.source-item p { font-size: .9rem; color: var(--text-secondary); margin-bottom: 8px; }
.archive-list { display: grid; gap: 10px; }
.archive-row { display: grid; grid-template-columns: 108px 92px 1fr; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-color); }
.archive-row .date { color: var(--text-muted); font-size: .88rem; }
.archive-row .cat { color: var(--accent-gold); font-size: .82rem; background: var(--accent-gold-light); border-radius: 14px; padding: 3px 10px; text-align: center; }
.site-note { background: #f8fafc; border-left: 4px solid var(--accent-gold); padding: 14px 18px; border-radius: 0 8px 8px 0; color: var(--text-secondary); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.guide-item { display: block; border: 1px solid var(--border-color); border-radius: 8px; background: #f8fafc; padding: 16px; text-decoration: none; transition: var(--transition); }
.guide-item:hover { border-color: var(--accent-gold); background: #fff; box-shadow: var(--shadow); transform: translateY(-2px); }
.guide-item strong { display: block; color: var(--text-primary); margin-bottom: 6px; }
.guide-item span { color: var(--text-secondary); font-size: .9rem; line-height: 1.6; }
.faq-list { display: grid; gap: 14px; margin-top: 16px; }
.faq-item { border: 1px solid var(--border-color); border-radius: 8px; background: #fff; padding: 18px 20px; box-shadow: var(--shadow-sm); }
.faq-item h2 { font-size: 1.05rem; color: var(--text-primary); margin-bottom: 8px; }
.faq-item p { color: var(--text-secondary); margin-bottom: 0; }
@media (max-width: 768px) {
  .nav-inner { flex-wrap: wrap; }
  .nav-links { width: 100%; justify-content: center; flex-wrap: wrap; border-top: 1px solid var(--border-color); }
  .audit-grid, .source-list, .guide-grid { grid-template-columns: 1fr; }
  .archive-row { grid-template-columns: 1fr; gap: 4px; }
}

.view-all-link {
    display: block;
    text-align: center;
    margin-top: 20px;
    padding: 12px 0;
    color: var(--primary, #2563eb);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    border: 2px solid var(--primary, #2563eb);
    border-radius: 8px;
    transition: all 0.2s;
}
.view-all-link:hover {
    background: var(--primary, #2563eb);
    color: #fff;
}
