/* ========================================
   Twitter Daily - Notion 风格信息卡片
   简洁优雅，信息清晰
   ======================================== */

/* CSS 变量 */
:root {
    /* 日间模式（默认）- 简洁清爽 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --accent: #3b82f6;
    --accent-light: #dbeafe;
    --border: #e5e7eb;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    
    /* 夜间模式 - 优雅深邃 */
    --transition-duration: 0.3s;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --accent: #60a5fa;
    --accent-light: #3b82f6;
    --border: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

/* ========================================
   基础样式
   ======================================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    transition: background var(--transition-duration), color var(--transition-duration);
}

/* ========================================
   布局容器
   ======================================== */

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

/* ========================================
   页头
   ======================================== */

.header {
    text-align: center;
    margin-bottom: 60px;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: 14px;
    font-size: 28px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.date-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all var(--transition-duration);
    z-index: 100;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* ========================================
   主内容区
   ======================================== */

.main-content {
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   推文卡片网格（增大间距）
   ======================================== */

.tweets-grid {
    display: flex;
    flex-direction: column;
    gap: 32px; /* 卡片之间间距 32px */
}

/* ========================================
   推文卡片（Notion 风格）
   ======================================== */

.tweet-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px; /* 增加内边距 */
    transition: all var(--transition-duration);
    box-shadow: var(--shadow);
}

.tweet-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   卡片头部（标签 + 标题）
   ======================================== */

.card-header {
    margin-bottom: 20px; /* 模块间距 20px */
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-secondary);
    color: var(--accent);
    border-radius: 6px;
    font-size: 12px; /* 标签字号 12px */
    font-weight: 500;
}

.card-title {
    font-size: 20px; /* 标题字号 20px */
    font-weight: 700; /* 加粗 */
    color: var(--text-primary);
    line-height: 1.4;
}

/* ========================================
   摘要内容（中等字号）
   ======================================== */

.card-summary {
    margin-bottom: 24px; /* 模块间距 24px */
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.card-summary p {
    font-size: 15px; /* 摘要字号 15px */
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ========================================
   卡片元信息（关键 + 推荐理由）
   ======================================== */

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 16px; /* 模块间距 16px */
    margin-bottom: 24px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 行间距 8px */
}

.meta-icon {
    font-size: 14px;
}

.meta-label {
    font-size: 14px; /* 模块标题字号 14px */
    font-weight: 700; /* 加粗 */
    color: var(--accent); /* 用强调色 */
}

.meta-value {
    font-size: 14px; /* 模块内容字号 14px */
    color: var(--text-secondary);
    line-height: 1.6;
}

/* 推荐理由列表样式 */
.meta-item.recommendation .meta-value {
    padding-left: 4px;
}

.meta-item.recommendation strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ========================================
   卡片底部（互动数据 + 原文链接）
   ======================================== */

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 0 0;  /* 顶部边距，左右为 0 */
    border-top: 1px solid var(--border);
    gap: 16px;
    margin: 0;  /* 确保没有负边距 */
}

.card-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stats-text {
    font-size: 13px; /* 底部字号 13px */
    color: var(--text-tertiary);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px; /* 底部字号 13px */
    font-weight: 500;
    transition: all var(--transition-duration);
    white-space: nowrap;
}

.card-link:hover {
    opacity: 0.9;
    transform: translateX(2px);
}

/* ========================================
   页脚
   ======================================== */

.footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 60px;
}

.footer p {
    color: var(--text-tertiary);
    font-size: 13px;
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 768px) {
    .container {
        padding: 40px 20px;  /* 统一左右边距 20px */
    }

    .header h1 {
        font-size: 28px;
    }

    .logo-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .tweet-card {
        padding: 20px;
    }

    .card-title {
        font-size: 18px;
    }

    .card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .card-link {
        width: 100%;
        justify-content: center;
    }

    .theme-toggle {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .main-stats {
        flex-wrap: wrap;
    }

    .stat-item {
        font-size: 13px;
        padding: 6px 12px;
    }
}
}

@media (max-width: 480px) {
    .tweet-card {
        padding: 16px;
    }

    .date-badge {
        font-size: 11px;
        padding: 5px 12px;
    }

    .tag {
        font-size: 11px;
        padding: 3px 10px;
    }
    
    .tweets-grid {
        gap: 24px; /* 移动端减小卡片间距 */
    }
}
/* AI 点评样式 */
.ai-comment {
    background: var(--accent-light);
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.ai-comment .meta-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================
   统计数据优化样式（改进版）
   ======================================== */

.stats-highlight {
    margin: 12px 0;
}

.main-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 8px;
}

.stat-item {
    padding: 8px 16px;
    background: var(--accent-light);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.stat-item.hot {
    background: rgba(244, 67, 54, 0.15);
    color: #f44336;
}

.more-stats {
    margin-top: 8px;
}

.more-stats summary {
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 12px;
    user-select: none;
    padding: 4px 0;
}

.more-stats summary:hover {
    color: var(--text-secondary);
}

.detail-stats {
    margin-top: 6px;
    padding-left: 12px;
    font-size: 13px;
    color: var(--text-tertiary);
}

/* ========================================
   卡片间距和边距优化
   ======================================== */

.tweet-card {
    padding: 28px;  /* 增加内边距 */
    margin: 32px 0;  /* 增加上下间距 */
}
