/* 热搜新闻组件样式 */

/* 新闻小部件 */
.news-widget {
  position: relative;
  cursor: pointer;
}

/* 迷你新闻按钮 - 与时钟按钮风格一致 */
.news-mini {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 100px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  gap: 6px;
}

.news-mini:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.news-mini-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.news-icon {
  font-size: 18px;
  line-height: 1;
}

.news-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 新闻来源选择器 */
.news-source-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.news-source-selector svg {
  color: var(--accent);
  flex-shrink: 0;
}

.source-select {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
  padding: 4px 24px 4px 8px;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
  min-width: 100px;
}

.source-select:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.source-select:focus {
  border-color: var(--accent);
}

.source-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 4px;
}

/* 新闻列表内容样式 - 使用与天气弹窗相同的结构 */
.news-layout {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.news-layout::-webkit-scrollbar {
  width: 6px;
}

.news-layout::-webkit-scrollbar-track {
  background: transparent;
}

.news-layout::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.news-layout::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.news-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition);
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.news-item + .news-item {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.news-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  flex-shrink: 0;
}

.news-rank.rank-first {
  color: #fef2f2 !important;
  background: rgba(239, 68, 68, 0.3) !important;
}

.news-rank.rank-second {
  color: #fff7ed !important;
  background: rgba(251, 146, 60, 0.3) !important;
}

.news-rank.rank-third {
  color: #fefce8 !important;
  background: rgba(250, 204, 21, 0.3) !important;
}

.news-rank.top {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
}

.news-word-wrapper {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.news-word {
  display: inline-block;
  font-size: 14px;
  color: var(--text-primary);
  white-space: nowrap;
  transition: var(--transition);
}

.news-item:hover .news-word {
  color: var(--accent);
  animation: marquee 15s linear infinite;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  10% {
    transform: translateX(0);
  }
  40% {
    transform: translateX(-100%);
  }
  60% {
    transform: translateX(-100%);
  }
  90% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(0);
  }
}

.news-score {
  font-size: 11px;
  color: var(--text-tertiary);
  flex-shrink: 0;
  min-width: 45px;
  text-align: right;
}

/* 新闻2列布局 - 用于搜索视图 */
.news-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
  width: 100%;
}

.news-grid-2col .news-item {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-grid-2col .news-item + .news-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.news-grid-2col .news-word-wrapper {
  white-space: normal;
  line-height: 1.4;
}

.news-grid-2col .news-word {
  font-size: 13px;
  white-space: normal;
  display: block;
}

.news-grid-2col .news-score {
  display: none;
}

/* 新闻侧边栏 - 确保层级高于播放器 */
#news-modal {
  z-index: 400 !important;
}

#news-modal .sidebar-panel {
  z-index: 401;
}

/* 更多新闻按钮 */
.news-more-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.news-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.news-more-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--text-primary);
}

.news-more-btn svg {
  transition: transform 0.3s ease;
}

.news-more-btn:hover svg {
  transform: translateY(2px);
}

/* 移动端新闻单列布局 */
@media (max-width: 768px) {
  .news-grid-2col {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .news-grid-2col .news-item {
    padding: 12px;
  }
  
  .news-grid-2col .news-word {
    font-size: 14px;
  }
}

.news-icon {
    font-size: 12px;
    line-height: 1;
    display: block;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.9);
}