/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f0;
  color: #1a1a1a;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
  background: #1a1a1a;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo-accent {
  color: #c8e6c9;
}

.nav {
  flex: 1;
  display: flex;
  gap: 8px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.nav-link:hover {
  color: #fff;
}

.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.refresh-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.refresh-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.refresh-btn.spinning .refresh-icon {
  animation: spin 0.8s linear infinite;
}

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

/* ===== Hero ===== */
.hero {
  background: #1a1a1a;
  color: #fff;
  padding: 60px 40px 70px;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c8e6c9;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  max-width: 500px;
}

/* ===== Main ===== */
.main {
  position: relative;
  margin-top: -30px;
}

.main-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ===== Filters Bar ===== */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 12px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ===== Themes Bar ===== */
.themes-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 0 4px;
  overflow-x: auto;
}

.themes-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  white-space: nowrap;
}

.themes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.theme-btn {
  border: 1.5px solid #e0e0e0;
  padding: 4px 12px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
  color: #888;
  white-space: nowrap;
}

.theme-btn:hover {
  border-color: #bbb;
  color: #555;
}

.theme-btn.active {
  color: #fff;
  border-color: transparent;
}

.article-categories {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.article-cat-tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  opacity: 0.85;
}

.filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-btn {
  border: none;
  padding: 6px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  background: transparent;
  color: #888;
  letter-spacing: 0.01em;
}

.filter-btn:hover {
  background: #f0f0f0;
  color: #333;
}

.filter-btn.active {
  color: #1a1a1a;
  background: #f0f0f0;
  font-weight: 600;
}

.article-count {
  font-size: 0.78rem;
  color: #aaa;
  font-weight: 500;
  white-space: nowrap;
}

/* ===== Content Layout ===== */
.content-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.feed {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== Article Card ===== */
.article {
  background: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}

.article:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.article-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.article-source-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.article-source-tag:hover {
  opacity: 0.7;
}

.source-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.article-date-tag {
  font-size: 0.72rem;
  color: #bbb;
  font-weight: 500;
  margin-left: auto;
}

.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.article-title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.15s;
}

.article-title a:hover {
  color: #555;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.meta-sep {
  color: #ddd;
}

.article-time {
  font-weight: 500;
}

.article-abs-date {
  color: #bbb;
}

.article-author {
  color: #aaa;
}

.article-description {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.65;
  white-space: pre-line;
  border-top: 1px solid #f0f0f0;
  padding-top: 10px;
  margin-top: 4px;
}

.article-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #1a1a1a;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: gap 0.2s;
}

.article-read:hover {
  gap: 8px;
}

.article-read svg {
  transition: transform 0.2s;
}

.article-read:hover svg {
  transform: translateX(2px);
}

/* ===== Sidebar ===== */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

.sidebar-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.sidebar-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #aaa;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.source-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.source-list li {
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.15s;
  color: #666;
}

.source-list li:hover {
  background: #f8f8f6;
  color: #1a1a1a;
}

.source-list li.active {
  background: #1a1a1a;
  color: #fff;
  font-weight: 600;
}

.source-list li.active .source-count {
  color: rgba(255, 255, 255, 0.5);
}

.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.source-count {
  margin-left: auto;
  color: #ccc;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ===== Loading ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px;
  color: #aaa;
  font-size: 0.88rem;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid #e0e0e0;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.load-more {
  display: flex;
  justify-content: center;
  padding: 32px;
}

/* ===== Empty ===== */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: #bbb;
  font-size: 0.95rem;
}

/* ===== Footer ===== */
.footer {
  margin-top: 60px;
  padding: 28px 40px;
  border-top: 1px solid #e8e8e4;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: #aaa;
}

.footer-brand {
  font-weight: 700;
  color: #1a1a1a;
}

.footer-sep {
  color: #ddd;
}

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .header-inner {
    padding: 0 20px;
    height: 56px;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 36px 20px 50px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .main-inner {
    padding: 0 16px;
  }

  .filters-bar {
    padding: 10px 14px;
    border-radius: 10px;
  }

  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .article-count {
    display: none;
  }

  .sidebar {
    display: none;
  }

  .content-layout {
    gap: 0;
  }

  .feed {
    gap: 12px;
  }

  .article {
    padding: 18px 20px;
    border-radius: 10px;
  }

  .article-title {
    font-size: 1rem;
  }

  .article-description {
    font-size: 0.84rem;
  }

  .footer {
    padding: 24px 20px;
  }

  .footer-inner {
    flex-wrap: wrap;
    font-size: 0.72rem;
  }
}
