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

:root {
  --bg: #f5f5f0;
  --card-bg: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #555;
  --text-muted: #999;
  --border: #e8e8e3;
  --shadow: 0 1px 4px rgba(0,0,0,0.08);
  --radius: 10px;
  --accent: #2c5282;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  font-size: 15px;
  line-height: 1.7;
}

/* Header */
header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.header-title h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.subtitle {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

.header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 12px;
  color: var(--text-muted);
}

/* Main content */
.main-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

/* Loading */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-muted);
  gap: 16px;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error */
.error-msg {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  color: #c53030;
  padding: 16px 20px;
  border-radius: var(--radius);
  text-align: center;
}

/* Articles list */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Article card */
.article-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.article-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.card-header {
  padding: 16px 20px 12px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.source-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.article-date {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}

.article-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.5;
}

.article-title a {
  color: var(--text-primary);
  text-decoration: none;
}

.article-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Card body */
.card-body {
  padding: 0 20px 16px;
}

.summary {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* Footer */
footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* Utility */
.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-inner { padding: 12px 16px; }
  .header-title h1 { font-size: 18px; }
  .main-content { padding: 12px 12px 40px; }
  .articles-list { gap: 12px; }
  .card-header { padding: 14px 14px 10px; }
  .card-body { padding: 0 14px 14px; }
  .article-title { font-size: 17px; line-height: 1.4; }
  .summary { font-size: 15px; line-height: 1.8; }
  .article-date { font-size: 13px; }
}
