/* 뉴스 아이콘 버튼 */
#news-toggle-btn {
  position: fixed;
  font-size: 28px;
  bottom: 12px;
  left: 50%;
  cursor: pointer;
  color: #555;
  background: none;
  border: none;
  transform: translateX(-105px);
  transition: transform 0.2s ease, color 0.2s ease;
  z-index: 9999;
}
#news-toggle-btn:hover {
  color: #222;
  transform: translateX(-110px) rotate(7deg) scale(2.0);
}
/* 오버레이 */
#news-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#news-overlay.open { display: block; opacity: 1; }
/* 왼쪽 패널 */
#news-panel {
  position: fixed;
  top: 0; left: -550px;
  width: min(550px, 80%);
  height: 100%;
  background: #fff;
  z-index: 10000;
  box-shadow: 2px 0 16px rgba(0,0,0,0.15);
  transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
#news-panel.open { left: 0; }
/* 패널 헤더 */
#news-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-weight: 500;
  color: #222;
}
#news-close-btn {
  cursor: pointer;
  color: #999;
  font-size: 18px;
  background: none;
  border: none;
  transition: color 0.2s;
}
#news-close-btn:hover { color: #333; }
/* 하단 버튼 영역 구분선 */
#news-panel-footer { border-top: 1px solid #ccc; }
body.dark-mode #news-panel-footer { border-top-color: #333; }
body.bg-mode #news-panel-footer { border-top-color: #333; }
/* 뉴스 목록 */
#news-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
#news-list::-webkit-scrollbar { width: 4px; }
#news-list::-webkit-scrollbar-track { background: transparent; }
#news-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
#news-list::-webkit-scrollbar-thumb:hover { background: #bbb; }
#news-list a {
  display: block;
  padding: 6px 16px;
  color: #222;
  text-decoration: none;
  line-height: 1.5;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}
#news-list a:hover { background: #f5f5f5; }
#news-list a span.meta {
  color: #aaa;
  font-size: 11px;
  margin-left: 4px;
}
#news-list .loading {
  padding: 20px;
  color: #aaa;
  text-align: center;
  font-size: 13px;
}

/* 다크모드 */
body.dark-mode #news-toggle-btn { color: #ccc; }
body.dark-mode #news-toggle-btn:hover { color: #fff; }
body.dark-mode #news-panel { background: #121212; }
body.dark-mode #news-panel-header { border-bottom-color: #333; color: #fff; }
body.dark-mode #news-close-btn { color: #888; }
body.dark-mode #news-close-btn:hover { color: #fff; }
body.dark-mode #news-list { scrollbar-color: #333 transparent; }
body.dark-mode #news-list::-webkit-scrollbar-thumb { background: #333; }
body.dark-mode #news-list a { color: #fff; border-bottom-color: #333; }
body.dark-mode #news-list a:hover { background: #1e1e1e; }
body.dark-mode #news-list a span.meta { color: #666; }
/* bg모드 */
body.bg-mode #news-toggle-btn { color: #fff; }
body.bg-mode #news-panel { background: #000; }
body.bg-mode #news-panel-header { border-bottom-color: #333; color: #fff; }
body.bg-mode #news-close-btn { color: #888; }
body.bg-mode #news-close-btn:hover { color: #fff; }
body.bg-mode #news-list { scrollbar-color: #222 transparent; }
body.bg-mode #news-list::-webkit-scrollbar-thumb { background: #222; }
body.bg-mode #news-list a { color: #fff; border-bottom-color: #222; }
body.bg-mode #news-list a:hover { background: #121212; }
body.bg-mode #news-list a span.meta { color: #555; }