:root {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-card: #161b22;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #58a6ff;
  --accent-green: #3fb950;
  --accent-orange: #d29922;
  --border: #30363d;
  --border-light: #21262d;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  padding: 24px 16px;
  font-size: 13px;
}

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

header {
  text-align: center;
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.date {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  text-align: center;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent-green);
  line-height: 1.2;
}

.stat-value .star-icon {
  color: #fbbf24;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  display: inline-block;
}

.stat-value .star-icon + span {
  vertical-align: middle;
  display: inline-block;
}

.stat-label {
  color: var(--text-secondary);
  margin-top: 4px;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

section {
  margin-bottom: 24px;
}

h2 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card {
  background: var(--bg-card);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.project-card:hover {
  border-color: var(--text-muted);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.project-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  line-height: 1.4;
}

.project-name:hover {
  text-decoration: underline;
}

.project-stats {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6875rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.stat-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

.stat-badge .star-icon {
  color: #fbbf24;
}

.stat-badge.hot {
  color: var(--accent-orange);
  border-color: var(--accent-orange);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.toggle-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 500;
  transition: all 0.2s;
}

.toggle-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.project-details {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.project-details.active {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.detail-column {
  background: var(--bg-secondary);
  padding: 8px;
  border-radius: 6px;
}

.detail-column h4 {
  color: var(--text-primary);
  margin-bottom: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
}

.detail-column ul {
  list-style: none;
}

.detail-column li {
  color: var(--text-secondary);
  padding: 3px 0;
  font-size: 0.75rem;
  line-height: 1.4;
}

.ai-insights {
  background: var(--bg-card);
  padding: 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.ai-insights h3 {
  color: var(--text-primary);
  margin: 16px 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.ai-insights h3:first-child {
  margin-top: 0;
}

.ai-insights p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 0.8125rem;
}

.ai-insights ul {
  margin-bottom: 12px;
  padding-left: 16px;
}

.ai-insights li {
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.project-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

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

.hype-badge {
  display: inline-block;
  background: var(--bg-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.hype-title {
  color: var(--accent-orange);
  font-size: 0.6875rem;
  font-weight: 600;
}

.hype-reason {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .project-header {
    flex-direction: column;
  }
  
  .project-details.active {
    grid-template-columns: 1fr;
  }
}

/* 周报专用样式 */
.weekly-overview {
  margin-bottom: 32px;
}

.weekly-theme {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
}

.weekly-theme h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.theme-content {
  margin-top: 16px;
}

.theme-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  line-height: 1.5;
}

.theme-description {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.875rem;
}

.theme-description a {
  color: var(--accent);
  text-decoration: none;
}

.theme-description a:hover {
  text-decoration: underline;
}

.ai-insights.weekly {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
}

.ai-insights.weekly h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.insights-block {
  margin-bottom: 24px;
}

.insights-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.insights-block h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 16px 0 8px;
}

.highlights-list,
.trends-list,
.recommendations-list {
  list-style: none;
  padding-left: 0;
}

.highlights-list li,
.trends-list li,
.recommendations-list li {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.875rem;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.highlights-list li a,
.trends-list li a,
.recommendations-list li a {
  color: var(--accent);
  text-decoration: none;
}

.highlights-list li a:hover,
.trends-list li a:hover,
.recommendations-list li a:hover {
  text-decoration: underline;
}

.highlights-list li:last-child,
.trends-list li:last-child,
.recommendations-list li:last-child {
  border-bottom: none;
}

.emerging-field {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}

.field-name {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.field-description {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.8125rem;
}

.top-projects {
  margin-bottom: 32px;
}

.top-projects h2 {
  font-size: 1.25rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.top-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.top-project-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.top-project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.top-project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.top-project-name {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  flex: 1;
}

.top-project-name:hover {
  text-decoration: underline;
}

.category-badge {
  background: var(--accent-green);
  color: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  margin-left: 8px;
}

.top-project-desc {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 12px;
  max-height: 60px;
  overflow: hidden;
}

.top-project-reason {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-top: 12px;
}

.reason-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 600;
}

.reason-text {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

.grouped-projects {
  margin-bottom: 32px;
}

.grouped-projects h2 {
  font-size: 1.25rem;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.project-group {
  margin-bottom: 32px;
}

.project-group h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

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

@media (max-width: 640px) {
  .top-projects-grid {
    grid-template-columns: 1fr;
  }
  
  .weekly-theme {
    padding: 16px;
  }
  
  .theme-title {
    font-size: 1rem;
  }
}

/* 深度趋势分析样式 - 与线上 W11 一致 */
.deep-trend-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
}

.trend-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.trend-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.4;
}

.trend-summary {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.9375rem;
  font-weight: 500;
}

.trend-content {
  margin-bottom: 24px;
}

.trend-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.trend-content p:last-child {
  margin-bottom: 0;
}

.trend-content a {
  color: var(--accent);
  text-decoration: none;
}

.trend-content a:hover {
  text-decoration: underline;
}

.trend-content b {
  color: var(--text-primary);
  font-weight: 600;
}

.evidence-list {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.evidence-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.evidence-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.evidence-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.evidence-day {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  min-width: 90px;
  padding-top: 2px;
}

.evidence-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
}

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

.evidence-reason {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
  margin-top: 4px;
}

@media (max-width: 768px) {
  .evidence-grid {
    grid-template-columns: 1fr;
  }
  
  .deep-content {
    font-size: 0.75rem;
  }
}
}

/* Wiki Badge Styles */
.wiki-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 8px;
  vertical-align: middle;
  text-decoration: none !important;
}

/* Wiki Badge Link (removed - badge is now decorative) */

/* Wiki History Section */
.wiki-history {
  margin-top: 8px;
}

.history-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.history-item:last-child {
  margin-bottom: 0;
}

.history-date {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.history-analysis {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
}
