/* === 重置与基础 === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 精致简约配色 - 暖调温和 */
    --bg-primary: #fdfcfb;
    --bg-secondary: #f6f4f2;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    
    --text-primary: #1a1918;
    --text-secondary: #5c5956;
    --text-muted: #8f8a86;
    --text-inverted: #ffffff;
    
    --accent: #d1603d;
    --accent-soft: #f8e4de;
    --accent-soft-2: #fff0eb;
    
    --border-subtle: #ebe6e1;
    --border-soft: #e0d9d4;
    
    --shadow-soft: 0 2px 16px rgba(26, 25, 24, 0.06);
    --shadow-medium: 0 8px 32px rgba(26, 25, 24, 0.08);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --font-display: "Playfair Display", "Noto Serif SC", Georgia, serif;
    --font-body: "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 32px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
}

/* === 导航栏 === */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(253, 252, 251, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: color 0.2s;
}

.logo span {
    color: var(--accent);
}

.logo:hover {
    color: var(--text-secondary);
}

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

@media (max-width: 640px) {
    .nav-links {
        gap: 20px;
    }
    
    .nav-links a {
        font-size: 0.9rem;
    }
}

/* === Hero区域 - 全新设计 === */
.hero {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-soft-2) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.8;
}

.hero-content {
    position: relative;
    max-width: 720px;
}

.hero-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--accent);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.2px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-sub {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 42px;
    max-width: 580px;
}

.quick-categories {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

.category-btn:hover {
    border-color: var(--accent);
    background: var(--accent-soft-2);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 50px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-sub {
        font-size: 1.05rem;
    }
}

/* === Section通用 === */
.section {
    padding: 70px 0;
}

.section-alt {
    background: var(--bg-secondary);
    padding: 70px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 42px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.section-more {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.section-more:hover {
    color: var(--accent);
}

/* === 首页最新资讯 === */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 24px;
    align-items: center;
    padding: 26px 28px;
    background: var(--bg-card);
    transition: all 0.25s ease;
}

.article-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.article-date {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-item h3 {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
}

.article-item h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.article-item h3 a:hover {
    color: var(--accent);
}

.article-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 640px) {
    .article-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* === 工具分类卡片 === */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    display: block;
    padding: 30px 26px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.category-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: var(--shadow-medium);
}

.category-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 16px;
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* === 特性展示 === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.feature-item {
    text-align: center;
    padding: 18px;
}

.feature-icon {
    font-size: 2.2rem;
    display: block;
    margin-bottom: 18px;
}

.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* === 资讯列表页 === */
.page-header {
    padding: 70px 0 40px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.sync-notice {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.sync-notice h4 {
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.sync-notice p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* 人群筛选 */
.audience-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.audience-tag {
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.audience-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.audience-tag.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--text-inverted);
}

/* 信息流样式 */
.news-feed {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.news-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 28px 32px;
    background: var(--bg-card);
    transition: all 0.25s ease;
    border-bottom: 1px solid var(--border-subtle);
}

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

.news-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.news-date {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.news-content h3 {
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.4;
}

.news-content h3 a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.news-content h3 a:hover {
    color: var(--accent);
}

.news-content p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.news-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

/* 标签和来源 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.tag-all {
    background: var(--accent-soft-2);
    color: var(--accent);
}

.tag-write {
    background: #fff5e6;
    color: #936b2e;
}

.tag-math {
    background: #eef3ff;
    color: #405a99;
}

.tag-lang {
    background: #f0f9f4;
    color: #2e7f54;
}

.source-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.source-badge:hover {
    background: var(--accent-soft-2);
    color: var(--accent);
}

@media (max-width: 768px) {
    .news-item {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .news-meta {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* === 页脚 === */
.footer {
    padding: 40px 0 50px;
    background: var(--text-primary);
    color: var(--text-inverted);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.footer-brand h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
}

.footer-links {
    display: flex;
    gap: 40px;
}

.footer-column h4 {
    font-size: 0.95rem;
    margin-bottom: 14px;
    font-weight: 600;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.88rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
    }
}

/* === 工具卡片 === */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--border-soft);
}

.tool-icon {
    font-size: 2.8rem;
    display: block;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.tool-desc {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 18px;
}

.tool-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tool-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

@media (max-width: 960px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* === 文章详情 === */
.article-header {
    padding: 70px 0 40px;
}

.article-header h1 {
    font-family: var(--font-display);
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.article-content {
    padding: 40px 0 80px;
    max-width: 720px;
    margin: 0 auto;
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 40px 0 18px;
}

.article-content h3 {
    font-size: 1.25rem;
    margin: 30px 0 14px;
}

.article-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin-left: 22px;
    margin-bottom: 18px;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-source {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-source a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

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

/* === 关于页面 === */
.about-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 60px 0 80px;
}

.about-content h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    margin: 40px 0 16px;
}

.about-content p {
    margin-bottom: 18px;
    line-height: 1.8;
}

/* === 加载动画 === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.section-header,
.article-item,
.category-card,
.feature-item,
.news-item {
    animation: fadeInUp 0.7s ease-out both;
}

/* 错开动画 */
.article-item:nth-child(1) { animation-delay: 0.1s; }
.article-item:nth-child(2) { animation-delay: 0.2s; }
.article-item:nth-child(3) { animation-delay: 0.3s; }

.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.1s; }
.news-item:nth-child(3) { animation-delay: 0.15s; }
.news-item:nth-child(4) { animation-delay: 0.2s; }
.news-item:nth-child(5) { animation-delay: 0.25s; }
.news-item:nth-child(6) { animation-delay: 0.3s; }
