:root {
  --item-bg: #12141b;
  --item-hover: #1a1f2b;
  --line: #252935;
  --line-light: #2a2f3d;
  --accent: #6ee7ff;
  --accent2: #a78bfa;
  --meta-color: #9ca3af;
  --text-color: #e0e6f0;
}

/* Logo fix for compact feed */
.nav .brand img {
  height: 64px;
  max-width: 100%;
}

@media (max-width: 600px) {
  .nav .brand img {
    height: 48px;
  }
}

.feed-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.feed-controls .seg {
  padding: 8px 14px;
  border: 1px solid var(--line);
  background: #1b1f2b;
  color: #dbe3ff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 13px;
}

.feed-controls .seg:hover {
  background: #232838;
  border-color: var(--line-light);
}

.feed-controls .seg.on {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0b0c10;
  border-color: transparent;
  font-weight: 600;
}

.feed-controls .cta.alt {
  background: #1b1f2b;
  color: #dbe3ff;
  border: 1px solid var(--line);
  padding: 8px 14px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
}

.feed-controls .cta.alt:hover {
  background: #232838;
}

/* Timeline - NewsNow Style */
.feed-timeline {
  margin: 0 0 24px 0;
}

.time-category {
  margin-bottom: 24px;
  border: 2px solid transparent;
  border-image: linear-gradient(135deg, var(--accent), var(--accent2)) 1;
  background: var(--item-bg);
  border-radius: 8px;
  overflow: hidden;
}

.time-category-header {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  padding: 5px 12px;
  font-weight: 700;
  font-size: 11px;
  color: #0b0c10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.time-category-header .count {
  background: rgba(11, 12, 16, 0.25);
  padding: 2px 7px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}

.time-category-items {
  display: flex;
  flex-direction: column;
}

/* NewsNow-style compact item */
.news-item {
  background: var(--item-bg);
  border: none;
  border-bottom: 1px solid #1a1e28;
  padding: 5px 10px;
  transition: background 0.1s ease;
  cursor: pointer;
  display: grid;
  grid-template-columns: 34px 1fr 50px;
  gap: 10px;
  align-items: center;
  min-height: 32px;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: var(--item-hover);
}

.news-item.expanded {
  padding: 8px 10px 12px;
  background: var(--item-hover);
}

/* Vote */
.news-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.vote-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: #0d0f14;
  color: #7a8290;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.vote-btn:hover {
  background: #15181f;
  border-color: var(--accent);
  color: var(--accent);
}

.vote-count {
  font-size: 11px;
  font-weight: 600;
  color: #7a8290;
}

/* Content */
.news-content {
  min-width: 0;
}

.news-title {
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-color);
  font-weight: 400;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item.expanded .news-title {
  -webkit-line-clamp: unset;
  margin-bottom: 4px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--meta-color);
  line-height: 1;
}

.news-meta .domain {
  color: var(--accent);
  font-weight: 500;
}

.news-meta .separator {
  opacity: 0.5;
}

.news-meta .time-ago {
  color: #7a8290;
}

.news-badge {
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1;
}

.badge-new {
  background: rgba(110, 231, 255, 0.18);
  color: var(--accent);
}

.badge-hot {
  background: rgba(255, 107, 107, 0.18);
  color: #ff8080;
}

.badge-rising {
  background: rgba(167, 139, 250, 0.18);
  color: var(--accent2);
}

.news-icons {
  display: inline-flex;
  gap: 3px;
}

.news-icon {
  font-size: 10px;
  opacity: 0.75;
}

/* Actions */
.news-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.action-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #0d0f14;
  color: #6a7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  transition: all 0.1s;
}

.action-btn:hover {
  background: #15181f;
  color: var(--text-color);
  border-color: var(--line-light);
}

.action-btn.open-btn::after {
  content: '↗';
}

.action-btn.expand-btn::after {
  content: '⋯';
}

.news-item.expanded .action-btn.expand-btn::after {
  content: '⋮';
}

/* Expanded details */
.news-details {
  grid-column: 2 / -1;
  display: none;
  padding-top: 10px;
  border-top: 1px solid #1a1e28;
  margin-top: 6px;
}

.news-item.expanded .news-details {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
}

.news-summary {
  font-size: 12px;
  line-height: 1.5;
  color: #b8c0d0;
}

.news-thumbnail {
  width: 140px;
  height: 90px;
  border-radius: 5px;
  border: 1px solid var(--line);
  object-fit: cover;
}

.detail-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.detail-link {
  padding: 7px 12px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #15181f;
  color: #d0d6e0;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.1s;
}

.detail-link:hover {
  background: #1d2028;
  border-color: var(--accent);
  color: var(--accent);
}

.detail-link.primary {
  background: linear-gradient(90deg, rgba(110, 231, 255, 0.15), rgba(167, 139, 250, 0.15));
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

.detail-link.primary:hover {
  background: linear-gradient(90deg, rgba(110, 231, 255, 0.25), rgba(167, 139, 250, 0.25));
}

/* Empty state */
.empty-category {
  padding: 24px;
  text-align: center;
  color: var(--meta-color);
  font-size: 13px;
}

/* Load more */
.load-more-container {
  text-align: center;
  padding: 24px;
  margin-top: 16px;
}

.load-more-btn {
  padding: 12px 24px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0b0c10;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.load-more-btn:hover {
  opacity: 0.9;
}

.load-more-info {
  margin-top: 12px;
  font-size: 12px;
  color: var(--meta-color);
}

/* Mobile */
@media (max-width: 900px) {
  .news-item {
    grid-template-columns: 32px 1fr 48px;
    gap: 8px;
    padding: 5px 8px;
  }

  .vote-btn {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }

  .vote-count {
    font-size: 10px;
  }

  .news-title {
    font-size: 12px;
  }

  .news-meta {
    font-size: 10px;
  }

  .action-btn {
    width: 24px;
    height: 24px;
  }

  .news-item.expanded .news-details {
    grid-template-columns: 1fr;
  }

  .news-thumbnail {
    display: none;
  }
}

@media (max-width: 600px) {
  .news-item {
    grid-template-columns: 30px 1fr 44px;
    gap: 6px;
  }

  .news-actions {
    gap: 2px;
  }

  .action-btn {
    width: 20px;
    height: 20px;
  }
}
