/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    git push    font-family: "Inter", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1f2933;
    background: radial-gradient(circle at top left, #f3f6ff 0, #eef2f7 42%, #e5e9f0 100%);
    padding: 32px 16px;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 38px 40px;
    border: 1px solid #e3e8f0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

/* 头部样式 - 深蓝色渐变背景条 */
header {
    text-align: left;
    margin: -32px -38px 32px -38px;
    padding: 28px 38px 24px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #2563eb 100%);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 4px 20px rgba(30, 58, 138, 0.15);
}

header h1 {
    font-size: 2.2rem;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.subtitle {
    color: #e0e7ff;
    font-size: 0.98rem;
    margin-bottom: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

#current-date {
    font-weight: bold;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

button {
    background: rgba(255, 255, 255, 0.95);
    color: #1e3a8a;
    border: none;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    transition: all 0.3s ease;
}

button:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* 主要内容 */
.intro {
    text-align: left;
    margin-bottom: 32px;
}

.intro h2 {
    color: #111827;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.intro p {
    color: #4b5563;
    font-size: 0.98rem;
}

/* 搜索框样式 */
.search-container {
    margin: 24px 0 32px;
    position: relative;
}

.search-box {
    width: 100%;
    padding: 14px 50px 14px 20px;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2933;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.search-box:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15);
    background: #fafbff;
}

.search-box::placeholder {
    color: #9ca3af;
}

.search-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 1.2rem;
    pointer-events: none;
}

.search-results-info {
    margin-top: 12px;
    color: #6b7280;
    font-size: 0.9rem;
    text-align: center;
}

.search-results-info.active {
    color: #3b82f6;
    font-weight: 600;
}

/* 搜索无结果状态 */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 12px;
}

.no-results p {
    font-size: 1rem;
    margin-bottom: 20px;
}

.clear-search-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ===== 文章容器 - 核心：桌面端上下堆叠 ===== */
#articles-container {
    display: grid;
    grid-template-columns: 1fr; /* 关键：强制单列堆叠 */
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 封面占位图 - 16:9 渐变色块 */
.article-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.article-cover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.article-header {
    margin-bottom: 20px;
}

.article-title {
    font-size: 1.25rem;
    color: #111827;
    margin-bottom: 6px;
}

.article-date {
    color: #6b7280;
    font-size: 0.9rem;
}

/* 彩色行业标签样式 */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f3e8ff;
    color: #7c3aed;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

.tag-pill:hover {
    background: #e9d5ff;
    transform: translateY(-1px);
}

.section {
    margin-bottom: 20px;
}

.section-title {
    color: #111827;
    font-size: 1.02rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-content {
    color: #555;
    line-height: 1.7;
    background: #f5f8ff; /* 极浅蓝色背景，研报卡片感 */
    padding: 16px 18px;
    border-radius: 10px;
    border: 1px solid #d7e2ff; /* 细浅蓝色边框 */
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06);
}

/* 洞察列表：由 process_pdf.py 生成 .insight-item 包裹每条 */
.section-content .insight-item {
    position: relative;
    margin-bottom: 12px;
    padding-left: 18px;
    color: #555; /* 展开描述文本颜色 */
}

.section-content .insight-item:last-child {
    margin-bottom: 0;
}

.section-content .insight-item::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: #2563eb; /* 精致的蓝色小方块 */
    position: absolute;
    left: 4px;
    top: 0.8em;
}

.section-content .insight-item strong {
    color: #2c3e50; /* 深蓝色总结词 */
}

/* 专家点评高亮样式 */
.expert-comment {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #3b82f6;
    border-radius: 10px;
    padding: 16px 18px;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
    line-height: 1.7;
}

.expert-comment .insight-item {
    position: relative;
    margin-bottom: 12px;
    padding-left: 18px;
    color: #555;
}

.expert-comment .insight-item:last-child {
    margin-bottom: 0;
}

.expert-comment .insight-item::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: #3b82f6;
    position: absolute;
    left: 4px;
    top: 0.8em;
}

.expert-comment .insight-item strong {
    color: #1e40af;
    font-weight: 700;
}

.download-btn {
    display: inline-block;
    background: #111827;
    color: #f9fafb;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 15px;
    text-align: center;
}

.download-btn:hover {
    background: #030712;
}

/* 提示区域 */
.tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.tip {
    text-align: left;
    padding: 18px 18px;
    background: #f9fafb;
    border-radius: 12px;
}

.tip h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* 页脚 */
footer {
    text-align: left;
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
}

.disclaimer {
    font-size: 0.9rem;
    margin-top: 10px;
}

/* ===== 响应式设计 - 核心：移动端横向滚动 & 字体调小 ===== */
@media (max-width: 768px) {
    /* 整体容器和头部字体调小 */
    .container {
        padding: 15px;
        width: 95%;
        margin: 0 auto;
    }
    
    /* 头部适配移动端 */
    header {
        margin: -15px -15px 20px -15px;
        padding: 20px 15px 18px;
        border-radius: 18px 18px 0 0;
    }
    
    header h1 {
        font-size: 1.5rem; /* 调小 */
    }
    
    .subtitle {
        font-size: 0.85rem; /* 调小 */
    }
    
    .intro h2 {
        font-size: 1.4rem; /* 调小 */
    }
    
    .intro p {
        font-size: 0.95rem; /* 调小 */
    }
    
    /* 覆盖桌面端布局，改为横向滚动 */
    #articles-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 15px;
        grid-template-columns: unset;
        gap: 0;
        margin-bottom: 30px;
    }
    
    .article-card {
        min-width: 85vw;
        max-width: 400px;
        flex-shrink: 0;
        margin-right: 20px;
        padding: 18px; /* 内边距也稍调小 */
    }
    
    /* 文章卡片内字体调小 */
    .article-title {
        font-size: 1.15rem; /* 调小 */
    }
    
    .article-date {
        font-size: 0.85rem; /* 调小 */
    }
    
    .section-title {
        font-size: 1rem; /* 调小 */
    }
    
    .section-content {
        font-size: 0.9rem; /* 调小 */
        padding: 12px;
        line-height: 1.6;
    }
    
    .expert-comment {
        font-size: 0.9rem;
        padding: 12px 14px;
    }
    
    .download-btn {
        padding: 10px 20px; /* 按钮也调小 */
        font-size: 0.9rem;
    }
    
    /* 提示区域和页脚字体调小 */
    .tip h4 {
        font-size: 1.05rem;
    }
    
    .tip p {
        font-size: 0.9rem;
    }
    
    footer {
        font-size: 0.85rem;
    }
    
    .disclaimer {
        font-size: 0.8rem;
    }
    
    /* 美化移动端横向滚动条 */
    #articles-container::-webkit-scrollbar {
        height: 6px;
    }
    #articles-container::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
        margin: 0 10px;
    }
    #articles-container::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }
    #articles-container::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
    
    .header-info {
        flex-direction: column;
        gap: 12px;
    }
    
    /* 移动端按钮调小 */
    button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    #current-date {
        padding: 5px 12px;
        font-size: 0.9rem;
    }
    
    /* 标签在移动端调小 */
    .tag-pill {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
    
    /* 搜索框移动端适配 */
    .search-box {
        padding: 12px 45px 12px 16px;
        font-size: 0.95rem;
    }
    
    .search-icon {
        right: 14px;
        font-size: 1.1rem;
    }
    
    .search-results-info {
        font-size: 0.85rem;
    }
    
    .no-results h3 {
        font-size: 1.3rem;
    }
    
    .no-results p {
        font-size: 0.9rem;
    }
}
