/* =================================================================
   通用样式 (Global Styles) & Dark Mode
   ================================================================= */
   :root {
    --bg-color: #f5f5f7;
    --card-bg-color: #ffffff;
    --text-color: #1d1d1f;
    --secondary-text-color: #6e6e73;
    --link-color: #007aff;
    --border-color: #d2d2d7;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #000000;
        --card-bg-color: #1c1c1e;
        --text-color: #f5f5f7;
        --secondary-text-color: #8d8d92;
        --link-color: #0a84ff;
        --border-color: #3a3a3c;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 2rem;
    -webkit-font-smoothing: antialiased;
}

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


header, .header { /* 让 header 和 .header 共享居中样式 */
    text-align: center; 
    margin-bottom: 40px; 
    position: relative;
}

header h1, .header h1 { 
    font-size: 42px; 
    font-weight: 600; 
    margin: 0; 
}

header p, .header p { 
    font-size: 18px; 
    color: var(--secondary-text-color); 
    margin-top: 8px; 
}


/* =================================================================
   主页时间线样式 (Homepage Timeline Styles)
   ================================================================= */
.year-group {
    margin-bottom: 40px;
}
.year-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 10px;
}
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 10px; /* 为时间线留出空间 */
}
details.month-group {
    padding-left: 30px;
    margin-bottom: 10px;
}
summary.month-header {
    font-size: 22px;
    font-weight: 600;
    cursor: pointer;
    list-style: none; /* 隐藏默认的三角箭头 */
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    margin-left: -10px;
}
summary.month-header::-webkit-details-marker { display: none; } /* 再次确认隐藏 */

.month-header .chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease-in-out;
    color: var(--secondary-text-color);
}
details[open] > summary.month-header .chevron {
    transform: rotate(90deg);
}
.report-count {
    font-size: 14px;
    font-weight: 500;
    color: var(--secondary-text-color);
}
ul.report-list {
    list-style: none;
    padding: 10px 0 20px 0;
    margin: 0;
}
li.timeline-item {
    position: relative;
    margin-bottom: 12px;
}
.timeline-dot {
    position: absolute;
    left: -39px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.2s ease;
}
.timeline-item a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px;
    background: var(--card-bg-color);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.timeline-item a:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: var(--link-color);
}
.timeline-item a:hover + .timeline-dot,
.timeline-item a:hover .timeline-dot-proxy { /* A trick to style the dot on link hover */
    border-color: var(--link-color);
    background-color: var(--link-color);
}
.timeline-item .date {
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-text-color);
    background-color: var(--bg-color);
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 20px;
    text-align: center;
}
.timeline-item .title {
    font-weight: 500;
    line-height: 1.4;
}

/* =================================================================
   报告详情页样式 (Report Detail Page Styles)
   ================================================================= */
.github-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-color); text-decoration: none; margin-top: 15px; font-size: 14px; transition: color 0.2s; }
.github-link:hover { color: var(--link-color); }
.github-link svg { width: 20px; height: 20px; }
.controls-container { display: flex; flex-direction: column; gap: 20px; margin-bottom: 40px; }
.tabs-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tab-btn { background-color: #e9e9eb; color: #333; border: none; padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { background-color: #0077ff; color: white; }
.search-container input { width: 100%; padding: 12px; font-size: 16px; border-radius: 8px; border: 1px solid var(--border-color); box-sizing: border-box; background-color: var(--card-bg-color); color: var(--text-color); }
.item-card { background-color: var(--card-bg-color); border-radius: 18px; padding: 24px; margin-bottom: 20px; border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.item-card.hidden { display: none; }
.item-card h2 { font-size: 22px; margin: 0 0 10px 0; }
.item-card h2 a { color: var(--link-color); text-decoration: none; }
.content { font-size: 16px; line-height: 1.6; margin-bottom: 15px; }
.content .hidden-content { display: none; }
.toggle-content-btn { background: none; border: none; color: var(--link-color); cursor: pointer; padding: 5px 0; font-size: 14px; font-weight: 500; }
.content.expanded .preview-text { display: none; }
.content.expanded .hidden-content { display: block; }
.metadata { display: flex; align-items: center; font-size: 14px; color: var(--secondary-text-color); gap: 15px; }
.source { font-weight: 500; padding: 4px 8px; border-radius: 6px; }
.source-HackerNews { background-color: #ffe8d1; color: #ff6600; }
.source-Reddit { background-color: #ffd6d6; color: #ff4500; }
.source-Youtube { background-color: #ffcccc; color: #ff0000; }
.source-OpenAI { background-color: #d4edda; color: #155724; }