/**
 * AI 快讯网页样式
 * 简约报刊风 - 米白背景 + 深黑文字 + 橙色强调
 * 针对手机截图优化 (390px)
 */

/* 核心配色 */
:root {
    --bg-color: #FAF9F6;      /* 米白色背景 */
    --text-color: #1A1A1A;    /* 深黑色字体 */
    --accent-color: #FF6B00;  /* 橙色高亮 */
    --sub-text: #666666;      /* 次级文字 */
    --border-color: #eee;     /* 分隔线 */
    --banner-bg: #F2F0EB;     /* Banner背景 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f0f0f0;
    font-family: "PingFang SC", "STHeiti", sans-serif;
    display: flex;
    justify-content: center;
}

/* 强制 390px 容器 */
.mobile-wrapper {
    width: 390px;
    background-color: var(--bg-color);
    min-height: 100vh;
    color: var(--text-color);
    padding-bottom: 50px;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* --- 顶部 Banner --- */
.banner {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: var(--banner-bg);
    border-bottom: 2px solid var(--text-color);
    overflow: hidden;
}

/* Banner 背景 Logo（景深模糊效果）*/
.banner-bg-logos-img {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.banner-logo-blur {
    position: absolute;
    width: 80px;
    height: 80px;
    object-fit: contain;
    opacity: 0.12;
    filter: blur(6px);
}

/* Logo 位置分布 - 更大更模糊，作为点缀 */
.banner-logo-blur:nth-child(1) { top: -10px; left: -10px; width: 90px; height: 90px; }
.banner-logo-blur:nth-child(2) { top: 40px; left: 80px; width: 70px; height: 70px; }
.banner-logo-blur:nth-child(3) { top: -15px; left: 160px; width: 75px; height: 75px; }
.banner-logo-blur:nth-child(4) { top: 60px; left: 200px; width: 85px; height: 85px; }
.banner-logo-blur:nth-child(5) { top: 120px; left: -20px; width: 95px; height: 95px; }
.banner-logo-blur:nth-child(6) { top: 140px; left: 100px; width: 70px; height: 70px; }
.banner-logo-blur:nth-child(7) { top: 20px; right: 120px; width: 65px; height: 65px; }
.banner-logo-blur:nth-child(8) { top: 110px; right: 140px; width: 80px; height: 80px; }

/* Banner 背景文字（品牌名） */
.banner-bg-logos {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    opacity: 0.1;
    font-weight: 900;
    font-size: 24px;
    font-style: italic;
    pointer-events: none;
    z-index: 2;
}

.banner-bg-logos span {
    display: block;
}

.banner-bg-logos span:nth-child(even) {
    padding-top: 30px;
}

/* 右下角信息区 */
.banner-info {
    position: absolute;
    right: 20px;
    bottom: 20px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 3;
}

.banner-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 6px;
}

.banner-title {
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
}

.banner-date {
    font-size: 11px;
    font-family: "SF Mono", "Monaco", monospace;
    margin-top: 2px;
    color: var(--sub-text);
}

/* --- AI 总结 --- */
.ai-summary {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
}

.section-label {
    display: inline-block;
    color: var(--accent-color);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.summary-content {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.7;
    text-align: justify;
}

/* 橙色高亮 */
.highlight,
strong {
    color: var(--accent-color);
    font-weight: 600;
}

/* --- 内容区块 --- */
.content-block {
    padding: 35px 20px;
    border-bottom: 1px solid var(--border-color);
}

.content-block:last-child {
    border-bottom: none;
}

/* 分类标题 */
.category-header {
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 24px;
    font-weight: 900;
    border-left: 4px solid var(--text-color);
    padding-left: 12px;
    margin-bottom: 30px;
}

/* 文章条目 */
.article-item {
    margin-bottom: 40px;
}

.article-item:last-child {
    margin-bottom: 0;
}

/* 关键词区域（Logo + 文字）*/
.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.article-logos {
    display: flex;
    gap: 4px;
}

.article-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: contain;
    background: #f5f5f5;
    padding: 2px;
}

.article-keywords {
    font-family: "SF Mono", "Monaco", monospace;
    font-size: 13px;
    color: var(--sub-text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 文章标题 */
.article-title {
    font-family: "Noto Serif SC", "Songti SC", serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--text-color);
}

/* 文章内容 */
.article-body {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
    text-align: justify;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* --- 页脚 --- */
.footer {
    padding: 24px 20px;
    text-align: center;
    color: var(--sub-text);
    font-size: 12px;
    line-height: 1.8;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.footer-source {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.footer-link-subtle,
.footer-link-subtle:visited,
.footer-link-subtle:active {
    color: inherit;
    text-decoration: none;
}

.footer-link-subtle:hover {
    color: #888;
}

.footer-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.footer-links a {
    font-size: 10px;
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.footer-links a:hover {
    color: #888;
}

/* 来源面板 */
.sources-panel {
    display: none;
    margin-top: 16px;
    text-align: left;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.sources-panel.active {
    display: block;
}

.sources-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--sub-text);
    margin-bottom: 8px;
}

.source-item {
    font-size: 11px;
    line-height: 1.6;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.source-item:last-child {
    border-bottom: none;
}

.source-item a {
    color: var(--accent-color);
    text-decoration: none;
}

.source-item a:hover {
    text-decoration: underline;
}

.source-author {
    color: var(--text-color);
    font-weight: 600;
}

.source-snippet {
    color: #999;
}

.source-type {
    display: inline-block;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    background: #f0f0f0;
    color: #999;
    margin-right: 4px;
}

.source-number {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 10px;
    margin-right: 6px;
}

/* --- 论文式引用标记 --- */
.ref-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    margin: 0 2px;
    font-size: 0.9em;
}

.ref-link:hover {
    text-decoration: underline;
}

/* --- 打印/截图优化 --- */
@media print {
    body {
        background-color: var(--bg-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
