/* 新闻容器样式 */
.news-container {
  margin: 0 auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 5px;
}

.loading,
.error,
.empty {
  padding: 16px;
  text-align: center;
  color: #666;
}

.error {
  color: #cf1322;
}

.status-banner {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  background-color: #fff2f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  font-size: 13px;
}

.status-banner[hidden],
.loading[hidden] {
  display: none;
}

/* 新闻项样式 */
.news-item {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-bottom: 1px solid #eee;
}

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

.news-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* 新闻头部样式 */
.news-time {
  color: #8c8c8c;
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* 新闻源标签样式 */
.source-label {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #fff;
  background-color: #595959;
}

/* 新标签样式 */
.new-tag {
  background-color: #ffd8bf;
  color: #d4380d;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: normal;
}

/* 频道标签样式 */
.channels-label {
  color: #8c8c8c;
  font-size: 12px;
}

/* 新闻链接样式 */
.news-link {
  color: #1890ff;
  text-decoration: none;
  font-size: 12px;
}

.news-link:hover {
  color: #40a9ff;
}

/* 新闻标题与内容样式 */
.news-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f1f1f;
  margin-bottom: 6px;
}

.news-content {
  font-size: 14px;
  line-height: 1.6;
  color: #262626;
  margin: 12px 0;
}

.news-content[tabindex] {
  cursor: pointer;
}

/* 相关股票样式 */
.related-stocks {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stock-tag {
  background: #f5f5f5;
  color: #595959;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.stock-tag:hover {
  background: #e8e8e8;
}

.industry-tag {
  background: #e6f7ff;
  color: #1890ff;
}

.theme-tag {
  background: #f9f0ff;
  color: #722ed1;
}

/* 音频播放器样式 */
.audio-player {
  margin-top: 12px;
  display: inline-block;
}

.audio-player audio {
  height: 24px;
  width: 250px;
  vertical-align: middle;
}

.audio-player span {
  font-size: 12px;
  color: #666;
  margin-left: 4px;
}

/* 特殊新闻样式 */
.top-news {
  border-left: 4px solid #ff4d4f;
}

.hot-news {
  border-left: 4px solid #ffa940;
}

.recommended-news {
  border-left: 4px solid #73d13d;
}

/* 相关项目样式 */
.related-project {
  margin-top: 12px;
  font-size: 13px;
}

/* 基础样式 */
body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  margin: 0;
  padding: 20px;
  background-color: #f5f5f5;
}

/* 头部样式 */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background-color: #fff;
  border-radius: 5px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header h1 {
  margin: 0;
  font-size: 20px;
}

/* 控制按钮样式 */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.control-button {
  padding: 6px 14px;
  border: 1px solid #d9d9d9;
  border-radius: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  background-color: #fff;
  transition: all 0.2s ease;
}

.control-button:hover {
  border-color: #40a9ff;
  color: #40a9ff;
}

.control-button.active {
  background-color: #1a56db;
  color: white;
  border-color: #1a56db;
}

/* 相似项样式 */
.similar-items {
  margin-top: 10px;
  border-left: 3px solid #e8e8e8;
  padding-left: 10px;
}

.similar-items-toggle {
  color: #1890ff;
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  font-size: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.similar-items-toggle:hover {
  color: #40a9ff;
}

.similar-items-toggle .icon {
  margin-right: 4px;
  transition: transform 0.3s;
}

.similar-items-toggle.expanded .icon {
  transform: rotate(90deg);
}

.similar-item {
  margin-top: 8px;
  padding: 8px;
  background: #fafafa;
  border-radius: 4px;
  font-size: 14px;
}

.similar-item:hover {
  background: #f0f0f0;
}

.similar-item .news-time {
  font-size: 12px;
  color: #666;
}

.similar-items-container {
  display: none;
  margin-top: 8px;
}

.similar-items-container.visible {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
