/* ===========================
   AI 每日精选 - 全站样式
   =========================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --model-color: #f472b6;
    --product-color: #34d399;
    --industry-color: #fbbf24;
    --paper-color: #60a5fa;
    --tips-color: #a78bfa;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}
.header::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}
.header-content { position: relative; z-index: 1; }
.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header .subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
.header .stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.stat-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
}
.stat-item strong { font-size: 1.5rem; display: block; }

/* 导航 */
.nav-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.nav-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}
.nav-btn:hover, .nav-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* 搜索框 */
.search-box {
    margin-bottom: 2rem;
    position: relative;
}
.search-box input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s;
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}
.search-box::before {
    content: '🔍';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
}

/* 日期卡片列表 */
.date-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.date-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.date-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}
.date-card .date-str {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}
.date-card .date-week {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.date-card .date-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.date-card .mini-stat {
    background: rgba(99,102,241,0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.date-card .date-highlight {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    border-left: 3px solid #f59e0b;
    padding-left: 0.6rem;
    background: rgba(245,158,11,0.06);
    border-radius: 0 4px 4px 0;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.25rem; margin-bottom: 0.5rem; color: var(--text-secondary); }

/* Section (详情页) */
.section { margin-bottom: 2.5rem; }
.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}
.section-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.section-title h2 { font-size: 1.5rem; font-weight: 700; }
.section-count {
    margin-left: auto;
    background: var(--bg-card);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.model .section-icon { background: var(--model-color); }
.model .section-title h2 { color: var(--model-color); }
.product .section-icon { background: var(--product-color); }
.product .section-title h2 { color: var(--product-color); }
.industry .section-icon { background: var(--industry-color); }
.industry .section-title h2 { color: var(--industry-color); }
.paper .section-icon { background: var(--paper-color); }
.paper .section-title h2 { color: var(--paper-color); }
.tips .section-icon { background: var(--tips-color); }
.tips .section-title h2 { color: var(--tips-color); }

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.25rem;
}
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: var(--primary);
}
.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.card-title { font-size: 1.1rem; font-weight: 600; line-height: 1.4; }
.card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}
.card-title a:hover { color: var(--primary); }
.category-tag {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    color: #0f172a;
    background: var(--primary);
}
.model .card .category-tag { background: var(--model-color); }
.product .card .category-tag { background: var(--product-color); }
.industry .card .category-tag { background: var(--industry-color); }
.paper .card .category-tag { background: var(--paper-color); }
.tips .card .category-tag { background: var(--tips-color); }
.card-summary {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 返回按钮 */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}
.back-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2.5rem 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer-brand {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s;
}
.footer a:hover {
    opacity: 0.8;
    text-decoration: underline;
}
.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 0.75rem 0;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.footer-brand a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}
.footer-brand a:hover { opacity: 0.8; text-decoration: underline; }
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.section, .date-card { animation: fadeIn 0.5s ease forwards; }

/* Responsive */
@media (max-width: 768px) {
    .container { padding: 1rem; }
    .header h1 { font-size: 1.75rem; }
    .header .stats { gap: 1rem; }
    .cards-grid, .date-list { grid-template-columns: 1fr; }
    .section-title { flex-wrap: wrap; }
    .section-count { margin-left: 0; margin-top: 0.5rem; }
}
