@charset "UTF-8";

/* Inlined base styles from mainModern.css so this page can run independently. */

/* ===== 커스텀 색상 변수 ===== */
:root {
  /* 라이트 테마 색상 */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --bg-card: #ffffff;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border-color: #e2e8f0;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --shadow-strong: rgba(0, 0, 0, 0.15);

  /* 브랜드 색상 */
  --primary: #667eea;
  --primary-hover: #5a67d8;
  --secondary: #718096;
  --success: #48bb78;
  --warning: #ed8936;
  --danger: #f56565;
  --info: #38b2ac;

  /* 그라디언트 */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
  --gradient-button: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);

  /* 간격 및 효과 */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.1s ease;

  /* 타이포그래피 */
  --font-family: 'Inter', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;

  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1050;
}

/* 다크 테마 */
.dark-theme {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-color: #374151;
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-strong: rgba(0, 0, 0, 0.5);
  --gradient-card: linear-gradient(145deg, #1e293b 0%, #334155 100%);
}

/* ===== 기본 스타일 ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition);
  line-height: 1.5;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* ===== 컴팩트 컨트롤 패널 ===== */
.control-panel-compact {
  background: var(--gradient-card);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  box-shadow: 0 2px 10px var(--shadow-light);
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.control-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.control-row:last-child {
  margin-bottom: 0;
}

/* ===== 카테고리 섹션 ===== */
.category-section {
  flex: 0 0 auto;
}

.category-section h6 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.category-tabs-compact {
  display: flex;
  gap: 0.5rem;
}

.category-btn-compact {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;        /* 내부 여백 줄이기 */
  border-radius: var(--border-radius);
  font-size: 0.75rem;             /* 작은 글씨 */
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.category-btn-compact:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.category-btn-compact.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--shadow-medium);
}

/* ===== 사이트 필터 섹션 ===== */
.sites-section {
  flex: 1;
  min-width: 0;
}

.sites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.sites-header h6 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: var(--warning);
  color: white;
  border-color: var(--warning);
}

/* ===== 즐겨찾기 컨트롤 위치 수정 ===== */
.favorite-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 10;
}

/* 모바일에서 즐겨찾기 버튼이 테마 버튼과 겹치지 않게 */
@media (max-width: 768px) {
  .favorite-controls {
    margin-right: 70px;
  }

}

/* 데스크톱에서도 충분한 여백 확보 */
@media (min-width: 769px) {
  .sites-header {
    padding-right: 80px;
  }
}


.site-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.site-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.site-btn.selected {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 6px var(--shadow-medium);
}

/* ===== 랭킹 섹션 ===== */
.ranking-section {
  flex: 0 0 auto;
}

.ranking-section h6 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ranking-controls-compact {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.control-btn-small {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.375rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.control-btn-small:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

input[type="radio"]:checked+.control-btn-small {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 6px var(--shadow-medium);
}

.form-select-small {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.375rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  min-width: 100px;
}

/* ===== 정렬 섹션 ===== */
.sorting-section {
  flex: 1;
  min-width: 0;
}

.sorting-section h6 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sorting-controls-compact {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.btn-special {
  background: var(--gradient-button);
  border: none;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 2px 6px var(--shadow-medium);
}

.btn-special:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow-strong);
}

/* ===== 검색 섹션 ===== */
.search-row {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.search-input-wrapper {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 370px;
}

.search-input {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  flex: 1;
  transition: var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}


/* ===== 최근 검색어 컴팩트 ===== */
.recent-keywords-compact {
  flex: 1;
  min-width: 200px;
}

.recent-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.recent-label-small {
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-secondary);
}

.clear-btn-small {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.clear-btn-small:hover {
  color: var(--danger);
}

.recent-keywords-text {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.kw-item {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.kw-item:hover {
  background: var(--primary);
  color: white;
}

.kw-item .x {
  cursor: pointer;
  opacity: 0.7;
  font-weight: bold;
}

.kw-item .x:hover {
  opacity: 1;
  color: var(--danger);
}

/* ===== 우측 패널 컴팩트 ===== */
.right-panel-compact {
  background: var(--gradient-card);
  border-radius: var(--border-radius-lg);
  padding: 1rem;
  box-shadow: 0 2px 10px var(--shadow-light);
  border: 1px solid var(--border-color);
  height: fit-content;
}

.mobile-toggle-buttons {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.toggle-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.toggle-btn.active {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
}

/* ===== 워드클라우드 컴팩트 ===== */
.wordcloud-section-compact {
  position: relative;
}

.section-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.section-header-compact h6 {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wordcloud-container-compact {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  height: 200px;
  position: relative;
  overflow: hidden;
}

#wordCloudCanvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#wordCloudCanvas.visible {
  opacity: 1;
}

/* ===== 모바일 대응 ===== */
@media (max-width: 768px) {
  .main-container {
    padding: 1rem 0.5rem;
  }

  .control-panel-compact {
    padding: 0.75rem;
  }

  .control-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .sites-section {
    order: -1;
  }

  /* 검색 영역을 1줄로 */
  .search-row {
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
  }

  .search-input-wrapper {
    flex: 1;
    display: flex;
    gap: 0.25rem;
  }

  .search-input {
    flex: 1;
    min-width: 0;
  }

  .search-btn, .reset-btn {
    padding: 0.5rem;
    min-width: 44px;
  }

  .recent-keywords-compact {
    min-width: auto;
    margin-top: 0.5rem;
    width: 100%;
  }

  .wordcloud-container-compact {
    height: 200px;
  }

  #wordCloudContainer {
    display: none;
  }

}

/* ===== 라디오 버튼 숨김 ===== */
input[type="radio"] {
  display: none;
}




/* ===== 내비게이션 ===== */
.navbar {
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 20px var(--shadow-light);
  transition: var(--transition);
  z-index: var(--z-sticky);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: var(--font-size-lg);
  color: var(--text-primary);
  text-decoration: none;
}

.brand-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--bg-tertiary);
}

/* ===== 메인 컨테이너 ===== */
.main-container {
  padding: 1.5rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}


/* ===== 데이터 테이블 ===== */
.data-display-area {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px var(--shadow-light);
  overflow: hidden;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
  margin: 0;
}

.data-table th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 2px solid var(--border-color);
  font-size: var(--font-size-xs);
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-row:hover {
  background: var(--bg-secondary);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--shadow-light);
}

.data-row.even {
  background: var(--bg-primary);
}

.data-row.odd {
  background: var(--bg-secondary);
}

/* ===== 테이블 셀 스타일 ===== */
.rank-cell {
  width: 60px;
  text-align: center;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: var(--font-size-xs);
  font-weight: bold;
  color: white;
}

.rank-badge.rank-1 {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #8b5a00;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.rank-badge.rank-2 {
  background: linear-gradient(135deg, #c0c0c0 0%, #e5e5e5 100%);
  color: #555;
  box-shadow: 0 2px 8px rgba(192, 192, 192, 0.3);
}

.rank-badge.rank-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #d4996b 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(205, 127, 50, 0.3);
}

.rank-badge.rank-top10 {
  background: var(--gradient-primary);
  box-shadow: 0 2px 6px var(--shadow-medium);
}

.rank-number {
  color: var(--text-muted);
  font-weight: 500;
}

.site-cell {
  width: 100px;
}

.site-badge {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  font-size: var(--font-size-xs);
  font-weight: 500;
  white-space: nowrap;
}

.title-cell {
  min-width: 200px;
  max-width: 400px;
}

.title-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  line-height: 1.4;
  display: block;
  word-break: break-word;
  transition: var(--transition-fast);
}

.title-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.comment-count {
  color: var(--warning);
  font-size: var(--font-size-xs);
  font-weight: 600;
  margin-left: 0.5rem;
}

.author-cell {
  width: 100px;
  color: var(--text-secondary);
}


.date-cell {
  width: 100px;
  color: var(--text-secondary);
  font-size: var(--font-size-xs);
}

.price-cell {
  width: 100px;
  text-align: right;
}

.price-text {
  color: var(--success);
  font-weight: 600;
}

/* ===== TOP 키워드 모달 ===== */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 50px var(--shadow-strong);
}

.modal-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.modal-title {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-body {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* 다크모드에서 TOP10 키워드 텍스트 밝게 */
.dark-theme .modal-body {
  color: #ffffff !important;
}

.dark-theme .modal-body .top-keyword-link {
  color: #93c5fd !important; /* 더 밝은 파란색 */
}

.dark-theme .modal-body .text-muted {
  color: #ffffff !important; /* 하단 작은 글씨는 흰색 */
}

.dark-theme .modal-body .keyword-item {
  color: #ffffff !important;
}

.dark-theme .modal-header {
  color: #ffffff !important;
}

.dark-theme .modal-title {
  color: #ffffff !important;
}

.top-keyword-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.top-keyword-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.75rem; 
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-fast);
  flex-direction: column;
}

.top-keyword-item:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-medium);
}

.keyword-rank {
  background: var(--gradient-primary);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: bold;
  flex-shrink: 0;
}

.keyword-text {
  flex: 1;
  margin: 0 0.5rem;
  font-weight: 500;
}

.keyword-count {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 0.15rem 0.4rem;
  border-radius: var(--border-radius);
  font-size: 0.65rem;
  font-weight: 600;
}

.top-keyword-item:hover .keyword-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ===== 로딩 오버레이 ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(5px);
}

.spinner {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bounce1, .bounce2, .bounce3 {
  width: 12px;
  height: 12px;
  background: var(--primary);
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite both;
}

.bounce1 { animation-delay: -0.32s; }
.bounce2 { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { 
    transform: scale(0);
  } 40% { 
    transform: scale(1.0);
  }
}

.loading-overlay p {
  color: white;
  font-size: var(--font-size-lg);
  font-weight: 500;
}

/* ===== 푸터 ===== */
.footer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--text-secondary);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: var(--font-size-lg);
  margin-bottom: 1rem;
}

.footer-logo {
  height: 32px;
  width: auto;
}

.footer-desc {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.footer-contact a {
  color: var(--primary);
  text-decoration: none;
}

/* ===== 추가 모바일 대응 ===== */
@media (max-width: 576px) {
  .site-filters-container {
    gap: 0.25rem;
  }
  
  .site-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .control-btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
  }
  
  .search-input-wrapper {
    flex-direction: column;
  }
  
  .data-table {
    font-size: 0.75rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.5rem;
  }
}




/* ===== NAVIGATION ===== */
.navbar {
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 20px var(--shadow-light);
  transition: var(--transition);
  z-index: var(--z-sticky);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: var(--font-size-xl);
  color: var(--text-primary);
  text-decoration: none;
}


.brand-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary);
  background-color: var(--bg-tertiary);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ===== CONTROL PANEL ===== */
.control-panel {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 25px var(--shadow-light);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-header h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-header h5 i {
  color: var(--primary);
}

/* ===== CATEGORY TABS ===== */
.category-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.category-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition);
}

.category-btn:hover::before,
.category-btn.active::before {
  left: 0;
}

.category-btn:hover,
.category-btn.active {
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.category-btn i,
.category-btn span {
  position: relative;
  z-index: 1;
}



/* ===== CONTROL BUTTONS ===== */
.ranking-controls,
.sorting-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ranking-type {
  display: flex;
  gap: 1rem;
}

.control-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border: 2px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: var(--border-radius);
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.control-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--gradient-primary);
  border-radius: 50%;
  transition: var(--transition);
  transform: translate(-50%, -50%);
}

input[type="radio"]:checked+.control-btn::before {
  width: 100%;
  height: 100%;
  border-radius: 0;
}

input[type="radio"]:checked+.control-btn {
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

input[type="radio"] {
  display: none;
}

.control-btn i,
.control-btn span {
  position: relative;
  z-index: 1;
}

.date-selector {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius);
  padding: 0.75rem;
  min-width: 150px;
}

/* ===== SEARCH SECTION ===== */
.search-section {
  margin-top: 1.5rem;
}

.search-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-input-group .form-control {
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: var(--transition);
}

.search-input-group .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.search-input-group .btn {
  padding: 0.75rem 1.25rem;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition);
}

.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

.btn-outline-secondary {
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--text-secondary);
  color: var(--bg-primary);
}

/* ===== RECENT KEYWORDS ===== */
.recent-keywords-section {
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  padding: 1rem;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.recent-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--font-size-sm);
}

.clear-btn {
  background: none;
  border: none;
  color: var(--danger);
  font-size: var(--font-size-xs);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: var(--transition-fast);
}

.clear-btn:hover {
  background: var(--danger);
  color: white;
}

.recent-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.keyword-tag {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: var(--font-size-xs);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.keyword-tag:hover {
  background: var(--primary);
  color: white;
}

.keyword-tag .remove {
  margin-left: 0.5rem;
  color: var(--danger);
  font-weight: bold;
  cursor: pointer;
}

/* ===== RIGHT PANEL ===== */
.right-panel {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: 0 4px 25px var(--shadow-light);
  border: 1px solid var(--border-color);
  height: fit-content;
  position: sticky;
  top: 2rem;
}

/* ===== WORD CLOUD ===== */
.wordcloud-section {
  margin-bottom: 2rem;
}

.wordcloud-container {
  height: 300px;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border: 2px dashed var(--border-color);
  position: relative;
  overflow: hidden;
}

#wordCloudCanvas {
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

#wordCloudCanvas.visible {
  opacity: 1;
}

/* ===== TOP KEYWORDS ===== */
.top-keyword-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.keyword-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.keyword-item:hover {
  background: var(--primary);
  color: white;
  transform: translateX(5px);
}

.keyword-rank {
  width: 24px;
  height: 24px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.keyword-text {
  flex: 1;
  margin-left: 0.75rem;
  font-weight: 500;
}

.keyword-count {
  background: var(--bg-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: var(--font-size-xs);
  font-weight: 600;
  color: var(--text-secondary);
}


.filter-btn.active {
  background: var(--gradient-success);
}

/* ===== DATA DISPLAY ===== */
.data-display-area {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 25px var(--shadow-light);
  border: 1px solid var(--border-color);
}

/* ===== TABLE VIEW ===== */
.data-table {
  width: 100%;
  background: transparent;
  color: var(--text-primary);
}

.data-table th {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 1.25rem 1rem;
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.data-table a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

.data-table a:hover {
  color: var(--primary);
}

/* ===== CARD VIEW ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 1.5rem;
}

.data-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
}

.data-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px var(--shadow-medium);
  border-color: var(--primary);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.card-title {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.card-meta {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-size: 0.65rem; /* 글씨 크기 줄이기 */
}

/* ===== IMAGE VIEW ===== */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.image-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  aspect-ratio: 4 / 3;
}
/* 모바일일 때 높이를 줄임 → 2:1 또는 4:2 비율 */
@media (max-width: 768px) {
  .image-card {
    aspect-ratio: 2 / 1; /* or 4 / 2, height가 줄어듦 */
  }
}

.image-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px var(--shadow-medium);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 1rem;
  background-color: rgba(0, 0, 0, 0.4); /* 반투명 검정 */
  text-shadow: 0px 1px 4px rgba(0,0,0,0.7); /* 어두운 그림자 */
}

.image-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(5px);
}

.spinner {
  width: 70px;
  text-align: center;
  margin-bottom: 1rem;
}

.spinner>div {
  width: 18px;
  height: 18px;
  background-color: var(--primary);
  border-radius: 100%;
  display: inline-block;
  animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
  animation-delay: -0.32s;
}

.spinner .bounce2 {
  animation-delay: -0.16s;
}

@keyframes sk-bouncedelay {

  0%,
  80%,
  100% {
    transform: scale(0);
  }

  40% {
    transform: scale(1.0);
  }
}

.loading-overlay p {
  color: white;
  font-size: var(--font-size-lg);
  font-weight: 500;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: var(--font-size-lg);
}

.footer-logo {
  height: 32px;
  width: auto;
}

.footer-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact {
  color: var(--text-muted);
  font-size: var(--font-size-sm);
}

.footer-contact a {
  color: var(--primary);
  text-decoration: none;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .main-container {
    padding: 1rem;
  }

  .control-panel,
  .right-panel,

  .category-tabs {
    flex-direction: column;
    gap: 0.75rem;
  }

  .ranking-controls,
  .sorting-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .ranking-type {
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
  }

  .control-btn {
    width: 100%;
    justify-content: center;
  }


  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .image-grid {
	  display: grid;
	  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	  gap: 1rem;
	  padding: 1rem;
  }

  .data-table {
    font-size: var(--font-size-sm);
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }

}

/* ===== CUSTOM TABLE STYLES (기존 호환성) ===== */
.custom-table {
  width: 100%;
  border-collapse: collapse;
  background-color: transparent;
  table-layout: fixed;
}

.custom-table th,
.custom-table td {
  padding: 0.75rem;
  border: none !important;
  background-color: transparent;
  color: var(--text-primary);
}

.custom-table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

.custom-table thead th:nth-child(1),
.custom-table tbody td:nth-child(1) {
  width: 8%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-table thead th:nth-child(2),
.custom-table tbody td:nth-child(2) {
  width: 10%;
}

.custom-table thead th:nth-child(3),
.custom-table tbody td:nth-child(3) {
  width: 46%;
}

.custom-table thead th:nth-child(4),
.custom-table tbody td:nth-child(4) {
  width: 13%;
}

.custom-table thead th:nth-child(5),
.custom-table tbody td:nth-child(5) {
  width: 13%;
}

.custom-table thead th:nth-child(6),
.custom-table tbody td:nth-child(6) {
  width: 10%;
}

.custom-table tbody tr {
  border-bottom: 1px solid var(--border-color);
}

/* ===== 모바일 카드 (기존 호환성) ===== */
.mobile-card {
  display: none;
}

@media (max-width: 768px) {
  .custom-table {
    display: none;
  }

  .mobile-card {
    display: block;
  }

  .mobile-entry {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
  }

  .mobile-entry:hover {
    background-color: var(--bg-tertiary);
  }

  .mobile-entry .line {
    display: flex;
    justify-content: space-between;
  }

  .mobile-card a {
    color: inherit;
    text-decoration: none;
  }

  .mobile-card a:hover {
    text-decoration: underline;
  }
}

/* ===== 타일 카드 (기존 호환성) ===== */
.tile-card {
  background-color: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px var(--shadow-light);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.tile-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.tile-card .card-body {
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}


/* ===== 폼 컨트롤 다크모드 대응 ===== */
body:not(.light-theme) .form-control,
body:not(.light-theme) .form-select {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

body:not(.light-theme) .form-control:focus,
body:not(.light-theme) .form-select:focus {
  background-color: var(--bg-primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* ===== 기존 스타일 호환성 ===== */
#titleKeyword {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body:not(.light-theme) #titleKeyword {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

body:not(.dark-theme) #titleKeyword {
  background-color: #fff !important;
  color: #000 !important;
  border: 1px solid #ccc !important;
}

#loadingOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
#loadingOverlay p {
  color: white;
  font-size: 1.2rem;
  font-weight: 500;
  margin-top: 1rem;
}
/* ===== 기존 스타일 호환성 ===== */
#titleKeyword {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

body:not(.light-theme) #titleKeyword {
  background-color: var(--bg-tertiary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

body.light-theme #titleKeyword {
  background-color: #fff !important;
  color: #000 !important;
  border: 1px solid #ccc !important;
}

.search-input-wrapper {
  display: flex;
  flex-direction: row; /* ✅ 가로 정렬 */
  align-items: center;  /* ✅ 수직 중앙 정렬 */
  gap: 0.25rem;
  flex: 1;
  min-width: 200px;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-size: var(--font-size-sm);
  border-radius: var(--border-radius);
}

.search-btn,
.reset-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: var(--border-radius);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px var(--shadow-medium);
}

.reset-btn:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

/* 설정 버튼 */
#settingsBtn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}


/* 헤더의 네비게이션은 고정하지 않는다 */
.navbar-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: static;   /* ← 고정 해제 */
  top: auto;
  right: auto;
  z-index: auto;
}

/* 검색바 옆에 자연스럽게 붙도록 고정 해제 */
.header-action-buttons {
  position: static;
  top: auto;
  right: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  z-index: auto;
  margin-top: 0;
}


@media (max-width: 768px) {
  .header-action-buttons {
    top: 16px;
    right: 8px;
    gap: 8px;
  }
}

/* ✅ 버튼 공통 스타일 */
.action-btn,
.theme-toggle-btn {
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px var(--shadow-medium);
  transition: transform 0.2s ease;
}

.action-btn:hover,
.theme-toggle-btn:hover {
  transform: scale(1.05);
}

/* ✅ 아이콘 전환 효과 */
.theme-toggle-btn i {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.theme-toggle-btn .bi-sun-fill {
  opacity: 0;
  transform: rotate(180deg);
}

.dark-theme .theme-toggle-btn .bi-moon-fill {
  opacity: 0;
  transform: rotate(-180deg);
}

.dark-theme .theme-toggle-btn .bi-sun-fill {
  opacity: 1;
  transform: rotate(0deg);
}
.settings-menu {
  display: none; /* 기본은 숨김 */
  position: absolute;
  top: 22px;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  flex-direction: column;
  min-width: 160px;
  z-index: 2001;
  padding: 0.5rem;
}

.settings-menu.show {
  display: flex; /* 메뉴 보일 때만 flex 적용 */
}

.settings-item {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  text-align: left;
  color: var(--text-primary);
  width: 100%;
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-item:hover {
  background: var(--bg-tertiary);
  color: var(--primary);
}

/* 내부 트리 영역 스타일 (amChart가 그려지는 영역) */
#treePopupChart {
  flex: 1;
  min-height: 400px;
}
#treePopupLayer {
  position: fixed;          /* 반드시 필요 */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 30, 30, 0.85); /* 어두운 배경 */
  z-index: 1060;            /* Bootstrap modal(1055) 위에 있어야 함 */
  display: none;
}
.keyword-modal-content {
  position: relative;
  margin: 40px auto;
  border-radius: 12px;
  padding: 20px;
}
.keyword-close-btn {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  background: none;
  z-index: 1061;
  border: none;
}
/* 기본 닫기 버튼 색상 */
.am5-modal-close {
  color: #000; /* light mode */
}

/* 다크 모드일 때 override */
.dark-mode .am5-modal-close {
  color: #fff;
}

.site-filter-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

.site-filter-scroll {
  overflow-x: auto;
  scrollbar-width: thin; /* Firefox */
  -ms-overflow-style: auto; /* IE 10+ */
  flex: 1;
}

.site-filter-scroll::-webkit-scrollbar {
  height: 6px;
}

.site-filter-scroll::-webkit-scrollbar-thumb {
  background-color: rgba(150, 150, 150, 0.5);
  border-radius: 10px;
}

.site-filter-content {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  white-space: nowrap;
}

.arrow {
  background: none;
  border: none;
  font-size: 1.5rem;
  padding: 0 10px;
  cursor: pointer;
  color: white;
  user-select: none;
}


.btn-sm span {
	white-space: nowrap;
}

/* ✅ 모바일 보기 아이콘 크기 개선 */
@media ( max-width : 768px) {
	.btn-sm span {
		font-size: 1.15rem;
		white-space: nowrap;
	}
}

/* 클래식 모드 버튼 */
.classic-mode-btn {
  font-weight: 500;
  transition: all 0.2s;
}

/* 다크 모드일 때 */
.dark-theme .classic-mode-btn {
  background-color: transparent;
  color: #fff;
  border: 1px solid #ccc;
}

.dark-theme .classic-mode-btn:hover {
  background-color: #444;
  color: #fff;
  border-color: #999;
}

/* 라이트 모드일 때 */
body:not(.dark-theme) .classic-mode-btn {
  background-color: #00cfff;
  color: #000;
  border: none;
}

body:not(.dark-theme) .classic-mode-btn:hover {
  background-color: #00b5e0;
  color: #fff;
}

/* ✅ 목록/타일 뷰 전환 아이콘 버튼 */
#viewModeIcons .btn-outline-light.active {
  background-color: #0dcaf0 !important;
  border-color: #0dcaf0 !important;
  color: black !important;
}

body:not(.dark-theme) #viewModeIcons .btn-outline-light {
  background-color: #fff;
  color: #333;
  border: 1px solid #ccc;
}

body:not(.dark-theme) #viewModeIcons .btn-outline-light:hover {
  background-color: #e0e0e0;
  color: #000;
}

/* ✅ 다크/공통 모드: 호버 시 강조 효과 */
.btn-outline-light:hover,
.btn-outline-light:focus {
  background-color: #0dcaf0;
  color: black;
}

/* ✅ 아이콘 색상 상속 */
#viewModeIcons i {
  color: inherit;
}

body:not(.dark-theme) #viewModeIcons .btn-outline-light i {
  color: #000 !important;
}
body:not(.dark-theme) #viewModeIcons .btn-outline-light {
  border: 1px solid rgba(0, 0, 0, 0.3) !important;
}
.mobile-thumb {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  margin-left: 0px;
}
.logo-img {
  height: 36px;         /* 🔺크게 확대 (원하는 경우 36px까지 가능) */
  width: auto;          /* 가로 비율 유지 */
  margin-top: 0;        /* 정렬 깨지지 않도록 */
  border-radius: 4px;
  cursor: pointer;
  object-fit: contain;  /* 내용물이 넘치지 않게 */
}

/* mainModern.css 끝에 추가 */
.top-navbar {
  height: 80px;                  /* ✅ 줄이기 */
  max-width: 1376px;
  margin: 0 auto;
  padding-top: 4px;              /* ✅ 위쪽 패딩만 살짝 주기 */
  padding-bottom: 0;
}

.top-navbar .navbar-brand {
  padding-top: 0px;              /* ✅ 로고 위로 미세하게 올림 */
}

.top-navbar .navbar-brand img {
  height: 60px;                  /* ✅ 너무 크면 내려가 보임 */
  margin-bottom: -2px;
}

.top-navbar .classic-mode-btn {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  line-height: 1.1;
  margin-top: 0px;              /* ✅ 버튼도 위로 조금 당기기 */
}
.navbar-search-wrapper {
  flex-grow: 1;
  display: flex;
  margin-top: 20px; /* 원하는 만큼 조절 가능 */
  justify-content: flex-start; /* 👈 왼쪽 정렬 */
}

.navbar-search-box {
  position: relative;
  width: 100%;
  max-width: 90%;
  display: flex;
  align-items: center;
  min-height: 52px; /* 선택사항 */
}

@media (max-width: 768px) {
	.navbar-search-box {
	  position: relative;
	  width: 100%;
	  max-width: 80%;
	  display: flex;
	  align-items: center;
	}
}


.navbar-search-input {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 1rem; /* 기존: 0.6rem → 0.85rem */
  font-size: 1.1rem;                  /* 🔼 글씨 크기도 키움 */
  border-radius: 9999px;
  border: 1px solid #4ADE80; /* 연녹색 테두리 */
  background-color: #1e293b;
  color: white;
  outline: none;
}

.navbar-search-input::placeholder {
  color: #aaa;
}

/* ⌧ 초기화 버튼 */
.clear-btn {
  position: absolute;
  right: 3.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.2rem;
  cursor: pointer;
}

/* 🔍 검색 버튼 */
.search-btn {
  position: absolute;
  right: 0.5rem;
  top: 15%;
  background: none;
  border: none;
  color: #4ADE80;
  font-size: 1.2rem;
  cursor: pointer;
}

/* 검색바 옆 정렬 */
.favorite-controls {
  position: static;
  top: auto;
  right: auto;
  display: flex;
  flex-direction: row;
  gap: 6px;
  z-index: auto;
}
@media (max-width: 768px) {
  .favorite-controls {
    gap: 4px;
  }
}

.favorite-controls .btn-icon {
  width: 25px;
  height: 25px;
  font-size: 0.9rem;
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.favorite-controls .btn-icon:hover {
  background: var(--gradient-primary);
  color: white;
  border-color: var(--primary);
}

.dark-theme .favorite-controls .btn-icon {
  background: #334155;
  color: white;
}

.top-keyword-item {
  font-size: 0.75rem; /* 전체 폰트 사이즈 기본 축소 */
  line-height: 1.3;
}

.top-keyword-item .keyword-text {
  font-size: 1rem; /* 제목은 다시 키워줌 */
  font-weight: 600;
}

.top-keyword-item .keyword-count {
  font-size: 0.75rem; /* 오른쪽 숫자 박스 */
}
.site-btn:hover:not(.selected) {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-color: var(--border-color);
  transform: none;
  box-shadow: none;
}
/* 검색창 placeholder 크기 줄이기 */
.navbar-search-input::placeholder {
  font-size: 0.85rem;  /* 기존보다 약간 작게 */
}

/* 로그인 / 회원가입 버튼 스타일 개선 */
.btn-login, .btn-signup {
  font-size: 0.85rem;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn-login {
  background-color: #ffffff;
  color: #222;
  border: 1px solid #ccc;
}
.btn-login:hover {
  background-color: #f1f1f1;
  color: #222; /* ← ✅ 이 부분 추가 */
}

.btn-signup {
  background-color: #007bff;
  color: #fff;
  border: none;
}
.btn-signup:hover {
  background-color: #0069d9;
}

/* 기존 outline-light 버튼에 대한 대비 설정 */
body.dark-theme .btn-outline-light:hover {
  color: #111 !important;
  background-color: #f1f1f1 !important;
  border-color: #ccc !important;
}
body:not(.dark-theme) .btn-outline-light:hover {
  color: #fff;
  background-color: #555;
  border-color: #444;
}

/* ===== 모바일 초타이트 리스트(A-2) - REVISED ===== */
.mobile-ultra-list { padding: 2px 0; }

/* 행 기본 + 라이트/다크 경계선 */
.mobile-ultra-list .ultra-item{
  padding: 12px 8px;           /* ↑ 총 1px 높이 증가 (3→3.5 * 2) */
  line-height: 1.2;
  background: transparent;
}
.dark-theme  .mobile-ultra-list .ultra-item { border-bottom: 1px solid rgba(255,255,255,.06); }
body:not(.dark-theme) .mobile-ultra-list .ultra-item { border-bottom: 1px solid rgba(0,0,0,.06); }

/* 홀짝 배경 분리 */
.dark-theme  .mobile-ultra-list .ultra-item:nth-child(odd)  { background: rgba(255,255,255,.02); }
.dark-theme  .mobile-ultra-list .ultra-item:nth-child(even) { background: rgba(255,255,255,.04); }
body:not(.dark-theme) .mobile-ultra-list .ultra-item:nth-child(odd)  { background: rgba(0,0,0,.02); }
body:not(.dark-theme) .mobile-ultra-list .ultra-item:nth-child(even) { background: rgba(0,0,0,.04); }

.mobile-ultra-list .ultra-item:hover { background: rgba(0,0,0,.06); }
.dark-theme .mobile-ultra-list .ultra-item:hover { background: rgba(255,255,255,.06); }

/* 1줄 영역 */
.ultra-line1{
  display:flex; align-items:baseline;
  gap:4px; white-space:nowrap; overflow:hidden;
}
.ultra-rank{
  white-space: pre;         /* 공백 보존 */
  display: inline-block;
  width: 3ch;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}


.ultra-site{ font-size:9.5px; color:#a6b0c2; flex:0 0 auto; }

/* 제목: weight 살짝 낮추고 라이트/다크 가독성 보정 */
.ultra-title{
  font-size:14px;
  font-family: "Noto Sans KR",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
  font-weight: 300;                  /* Light가 실제로 로드되어 있어야 효과 */
  font-synthesis-weight: none;       /* 브라우저가 굵기 합성하는 것 방지 */
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1 1 auto;
  line-height:1.18;
}
/* 변수폰트가 들어온 경우에만 */
@supports (font-variation-settings: normal) {
  .ultra-title{
    font-family: "Pretendard Variable","Noto Sans KR",-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
    font-variation-settings: "wght" 430;
    font-weight: 430;                /* 숫자 미세조정 가능 */
  }
}

.dark-theme .ultra-title{ color:#eaf0ff; }
body:not(.dark-theme) .ultra-title{ color:#0b1220; } /* 라이트 모드에서 더 선명 */

/* 2줄 메타 */
.ultra-line2{
  margin-top:1px; display:flex; gap:3px; align-items:center;
  font-size:9px; color:#8fa0b8;
}
body:not(.dark-theme) .ultra-line2{ color:#516072; }

.u-dot{ opacity:.4; }
.u-views{ opacity:.9; }
.u-comments{ color:orange; opacity:.95; }
.u-price{ color:#22c55e; }


/* New page overrides */
:root {
  --ws-new-bg: #030611;
  --ws-new-surface: rgba(7, 14, 28, 0.84);
  --ws-new-surface-strong: rgba(10, 18, 35, 0.96);
  --ws-new-line: rgba(87, 255, 227, 0.18);
  --ws-new-accent: #52f7d4;
  --ws-new-accent-strong: #00c2ff;
  --ws-new-mint: #8bffb7;
  --ws-new-amber: #c5ff47;
  --ws-new-magenta: #ff4fd8;
  --ws-new-text-soft: #93a7c9;
  --ws-new-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
  --gradient-primary: linear-gradient(135deg, #00d1ff 0%, #52f7d4 45%, #c5ff47 100%);
  --gradient-button: linear-gradient(135deg, #00d1ff 0%, #7bffcb 100%);
  --ws-shell-max-width: 1360px;
  --ws-shell-padding-x: 24px;
}

body.ws-modern-new {
  min-height: 100vh;
  background: linear-gradient(180deg, #030611 0%, #050913 38%, #060b15 100%);
  color: #eafcfb;
}

body.ws-modern-new:not(.dark-theme) {
  min-height: 100vh;
  background: linear-gradient(180deg, #edf9ff 0%, #e7f4fb 52%, #eefbf7 100%);
  color: #13293f;
}

.ws-modern-new .ws-topbar::before {
  background: rgba(7, 14, 28, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

body.ws-modern-new:not(.dark-theme) .ws-topbar::before {
  background: rgba(246, 253, 255, 0.94);
  border-bottom: 1px solid rgba(0, 194, 255, 0.14);
}

body.ws-modern-new:not(.dark-theme) .ws-topbar .nav-link {
  color: #6c7f97;
}

body.ws-modern-new:not(.dark-theme) .ws-topbar .nav-link:hover,
body.ws-modern-new:not(.dark-theme) .ws-topbar .nav-link.active {
  color: #12324d;
  background: rgba(0, 194, 255, 0.08);
}

body.ws-modern-new:not(.dark-theme) .ws-topbar .navbar-brand .brand-text {
  background: linear-gradient(135deg, #4f8cff 0%, #00b8f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.ws-modern-new .ws-topbar .navbar .container,
.ws-modern-new .container-xxl,
.ws-modern-new .footer--new .container {
  max-width: var(--ws-shell-max-width);
  padding-left: var(--ws-shell-padding-x);
  padding-right: var(--ws-shell-padding-x);
  width: 100%;
}

.ws-new-shell {
  padding: 10px 0 24px;
}

.ws-hero,
.ws-command,
.ws-dashboard,
.ws-results {
  position: relative;
  z-index: 1;
}

.ws-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 0.78fr);
  gap: 10px;
  align-items: stretch;
  margin-top: 2px;
  margin-bottom: 8px;
}

.ws-hero__content,
.ws-hero__aside {
  min-width: 0;
}

.ws-hero__content {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--ws-new-line);
  background:
    linear-gradient(145deg, rgba(6, 13, 27, 0.96) 0%, rgba(8, 18, 35, 0.92) 100%);
  box-shadow: var(--ws-new-shadow);
  position: relative;
  overflow: hidden;
}

.ws-hero__content::before,
.ws-panel::before,
.ws-command::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(82, 247, 212, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(82, 247, 212, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(255,255,255,.55), transparent 90%);
  opacity: 0.55;
}

.ws-results::before {
  content: none;
  display: none;
}

.ws-hero__eyebrow,
.ws-panel__kicker,
.ws-hero-card__label {
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ws-new-mint);
  text-transform: uppercase;
}

.ws-hero__brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 8px 0 10px;
}

.ws-hero__logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
  border: 1px solid rgba(82, 247, 212, 0.14);
  box-shadow: inset 0 0 18px rgba(0, 209, 255, 0.08);
}

.ws-hero h1 {
  margin: 0 0 8px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(1.65rem, 3.1vw, 2.55rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: #f3fffd;
  text-shadow: 0 0 26px rgba(0, 209, 255, 0.12);
}

.ws-hero p {
  margin: 0;
  max-width: 700px;
  color: var(--ws-new-text-soft);
  font-size: 0.84rem;
}

.ws-hero__meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.ws-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #d9fff8;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(82, 247, 212, 0.14);
}

.ws-chip--live {
  color: #03111a;
  background: linear-gradient(135deg, #00d1ff 0%, #8bffb7 100%);
  border-color: transparent;
}

.ws-hero-card {
  height: 100%;
  min-height: 100%;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--ws-new-line);
  background:
    linear-gradient(180deg, rgba(5, 12, 24, 0.98) 0%, rgba(7, 16, 32, 0.94) 100%);
  box-shadow: var(--ws-new-shadow);
}

.ws-hero-card__value {
  margin: 10px 0 8px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f5ffd2;
  line-height: 1.2;
}

.ws-hero-card p {
  color: var(--ws-new-text-soft);
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
}

.ws-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 6px 8px;
  margin-bottom: 8px;
  border-radius: 18px;
  border: 1px solid var(--ws-new-line);
  background: rgba(6, 13, 25, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  align-items: center;
  z-index: 40;
}

body.ws-modern-new:not(.dark-theme) .ws-command {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(0, 194, 255, 0.14);
  box-shadow: 0 16px 36px rgba(59, 107, 161, 0.12);
}

.ws-command__search {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  width: 100%;
}

.ws-command__label {
  display: block;
  margin-bottom: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #d7fff4;
  letter-spacing: 0.08em;
}

body.ws-modern-new:not(.dark-theme) .ws-command__label,
body.ws-modern-new:not(.dark-theme) .ws-panel__kicker {
  color: #0aa0bd;
}

.ws-command__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 3px 5px 3px 9px;
  border-radius: 14px;
  background: rgba(163, 191, 255, 0.08);
  border: 1px solid rgba(82, 247, 212, 0.14);
  width: 100%;
}

body.ws-modern-new:not(.dark-theme) .ws-command__field {
  background: rgba(223, 242, 255, 0.92);
  border-color: rgba(0, 194, 255, 0.14);
}

.ws-command__leading {
  color: #8cfde3;
  font-size: 0.92rem;
}

body.ws-modern-new:not(.dark-theme) .ws-command__leading {
  color: #099db9;
}

.ws-command__input {
  flex: 1 1 auto;
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: #f3fffd;
  font-size: 0.9rem;
  padding-right: 10px;
}

body.ws-modern-new:not(.dark-theme) .ws-command__input {
  color: #17324f;
}

.ws-command__input::placeholder {
  color: #7b93b8;
}

body.ws-modern-new:not(.dark-theme) .ws-command__input::placeholder {
  color: #6d86a3;
}

.ws-command__icon,
.ws-command__submit,
.ws-action-btn {
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ws-command__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #c8fff5;
  background: rgba(255, 255, 255, 0.035);
}

.ws-command__submit {
  min-width: 64px;
  height: 32px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #04111a;
  background: linear-gradient(135deg, #00d1ff 0%, #c5ff47 100%);
  box-shadow: 0 0 24px rgba(0, 209, 255, 0.16);
}

.ws-command__icon:hover,
.ws-command__submit:hover,
.ws-action-btn:hover {
  transform: translateY(-1px);
}

.ws-command__actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  align-self: end;
  min-height: 42px;
  justify-self: end;
  white-space: nowrap;
}

.ws-action-btn,
.ws-modern-new .theme-toggle-btn,
.ws-modern-new .action-btn {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #d5fff5;
  border: 1px solid rgba(82, 247, 212, 0.14);
  box-shadow: none;
}

body.ws-modern-new:not(.dark-theme) .ws-action-btn,
body.ws-modern-new:not(.dark-theme) .theme-toggle-btn,
body.ws-modern-new:not(.dark-theme) .action-btn {
  background: rgba(237, 248, 255, 0.94);
  color: #153652;
  border-color: rgba(0, 194, 255, 0.16);
}

.ws-modern-new .favorite-controls,
.ws-modern-new .header-action-buttons {
  position: static !important;
  margin: 0 !important;
}

.ws-modern-new #siteFavButtons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ws-modern-new .settings-group {
  position: relative;
  z-index: 120;
}

.ws-modern-new .settings-menu {
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  border-radius: 18px;
  background: rgba(5, 12, 24, 0.97);
  border: 1px solid rgba(82, 247, 212, 0.14);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.36);
  z-index: 4000;
}

body.ws-modern-new:not(.dark-theme) .settings-menu {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 194, 255, 0.16);
  box-shadow: 0 20px 40px rgba(54, 105, 160, 0.14);
}

.ws-modern-new .settings-item {
  color: #d9e7ff;
}

body.ws-modern-new:not(.dark-theme) .settings-item,
body.ws-modern-new:not(.dark-theme) .settings-item {
  color: #163451;
}

.ws-modern-new .settings-item:hover {
  background: rgba(120, 166, 255, 0.12);
}

.ws-panel,
.ws-results {
  border: 1px solid var(--ws-new-line);
  background:
    linear-gradient(180deg, rgba(5, 12, 24, 0.97) 0%, rgba(8, 15, 29, 0.92) 100%);
  box-shadow: var(--ws-new-shadow);
  position: relative;
  overflow: hidden;
}

body.ws-modern-new:not(.dark-theme) .ws-panel,
body.ws-modern-new:not(.dark-theme) .ws-results {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 249, 255, 0.93) 100%);
  border-color: rgba(0, 194, 255, 0.14);
  box-shadow: 0 16px 34px rgba(54, 110, 166, 0.1);
}

.ws-panel {
  border-radius: 22px;
  padding: 12px;
}

.ws-results {
  border-radius: 22px;
  padding: 12px;
}

.ws-panel--filters,
.ws-panel--insight {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.ws-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.ws-panel__header--tight {
  margin-bottom: 8px;
}

.ws-panel-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #cce8ff;
  font-size: 0.7rem;
  font-weight: 600;
}

.ws-panel-toggle i {
  font-size: 0.74rem;
}

body.ws-modern-new:not(.dark-theme) .ws-panel-toggle {
  background: rgba(255, 255, 255, 0.88);
  color: #173652;
  border-color: rgba(0, 194, 255, 0.14);
}

.ws-panel-toggle:hover {
  background: rgba(76, 148, 188, 0.18);
  border-color: rgba(92, 180, 214, 0.28);
}

.ws-panel--filters.is-collapsed .ws-grid,
.ws-panel--filters.is-collapsed .ws-search-history {
  display: none;
}

.ws-panel--filters.is-collapsed .ws-panel__header {
  margin-bottom: 0;
}

.ws-panel__header h2,
.ws-results__header h2 {
  margin: 5px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: #effffd;
}

.ws-panel__header p,
.ws-results__header p,
.ws-panel__hint {
  margin: 0;
  color: var(--ws-new-text-soft);
  font-size: 0.72rem;
}

body.ws-modern-new:not(.dark-theme) .ws-panel__header h2,
body.ws-modern-new:not(.dark-theme) .ws-results__header h2,
body.ws-modern-new:not(.dark-theme) .ws-block h6 {
  color: #173652;
}

body.ws-modern-new:not(.dark-theme) .ws-panel__header p,
body.ws-modern-new:not(.dark-theme) .ws-results__header p,
body.ws-modern-new:not(.dark-theme) .ws-panel__hint {
  color: #5f7896;
}

body.ws-modern-new:not(.dark-theme) .recent-label-small,
body.ws-modern-new:not(.dark-theme) .clear-btn-small,
body.ws-modern-new:not(.dark-theme) .footer--new .footer-brand span,
body.ws-modern-new:not(.dark-theme) .footer--new .footer-desc,
body.ws-modern-new:not(.dark-theme) .footer--new .footer-contact p,
body.ws-modern-new:not(.dark-theme) .footer--new .footer-links a {
  color: #4e6884;
}

.ws-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ws-panel--filters .ws-grid {
  grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr);
  align-items: stretch;
}

.ws-block {
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid rgba(82, 247, 212, 0.1);
}

body.ws-modern-new:not(.dark-theme) .ws-block {
  background: rgba(241, 250, 255, 0.9);
  border-color: rgba(0, 194, 255, 0.14);
}

.ws-modern-new .control-panel-compact,
.ws-modern-new .right-panel-compact {
  background: transparent;
  box-shadow: none;
  border: none;
}

.ws-modern-new .category-section h6,
.ws-modern-new .sites-header h6,
.ws-modern-new .ranking-section h6,
.ws-modern-new .sorting-section h6,
.ws-modern-new .ws-block h6 {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #d7fff4;
}

.ws-modern-new .category-btn-compact,
.ws-modern-new .site-btn,
.ws-modern-new .control-btn-small,
.ws-modern-new .toggle-btn,
.ws-modern-new .btn-icon,
.ws-modern-new .kw-item {
  border-radius: 999px;
  border-color: rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #d5fff5;
  padding-top: 0.28rem;
  padding-bottom: 0.28rem;
  font-size: 0.68rem;
}

body.ws-modern-new:not(.dark-theme) .category-btn-compact,
body.ws-modern-new:not(.dark-theme) .site-btn,
body.ws-modern-new:not(.dark-theme) .control-btn-small,
body.ws-modern-new:not(.dark-theme) .toggle-btn,
body.ws-modern-new:not(.dark-theme) .btn-icon,
body.ws-modern-new:not(.dark-theme) .kw-item {
  background: rgba(255, 255, 255, 0.88);
  color: #183652;
  border-color: rgba(0, 194, 255, 0.14);
}

body.ws-modern-new:not(.dark-theme) .category-btn-compact:hover,
body.ws-modern-new:not(.dark-theme) .site-btn:hover,
body.ws-modern-new:not(.dark-theme) .control-btn-small:hover,
body.ws-modern-new:not(.dark-theme) .toggle-btn:hover,
body.ws-modern-new:not(.dark-theme) .kw-item:hover {
  color: #0d2440;
}

.ws-modern-new .category-tabs-compact,
.ws-modern-new .ranking-controls-compact,
.ws-modern-new .sorting-controls-compact,
.ws-modern-new .recent-keywords-text {
  gap: 6px;
}

.ws-modern-new .category-tabs-compact,
.ws-modern-new .ranking-controls-compact,
.ws-modern-new .sorting-controls-compact {
  row-gap: 6px;
}

.ws-modern-new .site-filters-container {
  gap: 6px;
}

.ws-modern-new .category-btn-compact:hover,
.ws-modern-new .site-btn:hover,
.ws-modern-new .control-btn-small:hover,
.ws-modern-new .toggle-btn:hover,
.ws-modern-new .kw-item:hover {
  background: rgba(67, 130, 149, 0.16);
  border-color: rgba(104, 169, 188, 0.26);
  color: #f3fffd;
}

.ws-modern-new .category-btn-compact.active,
.ws-modern-new .site-btn.selected,
.ws-modern-new input[type="radio"]:checked + .control-btn-small,
.ws-modern-new .toggle-btn.active {
  background: linear-gradient(135deg, #2f6272 0%, #4f7f78 100%);
  color: #effffd;
  border-color: rgba(116, 160, 165, 0.22);
  box-shadow: 0 6px 14px rgba(24, 58, 70, 0.16);
}

body.ws-modern-new:not(.dark-theme) .category-btn-compact.active,
body.ws-modern-new:not(.dark-theme) .site-btn.selected,
body.ws-modern-new:not(.dark-theme) input[type="radio"]:checked + .control-btn-small,
body.ws-modern-new:not(.dark-theme) .toggle-btn.active {
  background: linear-gradient(135deg, #00b8f5 0%, #35e3cb 55%, #b8ff38 100%);
  color: #041827;
  border: 1px solid rgba(0, 166, 224, 0.35);
  box-shadow:
    0 10px 18px rgba(0, 184, 245, 0.18),
    0 0 0 2px rgba(0, 184, 245, 0.14);
}

.ws-modern-new .btn-special {
  border-radius: 999px;
  color: #effffd;
  background: linear-gradient(135deg, #2f6272 0%, #56837d 100%);
  border-color: rgba(116, 160, 165, 0.2);
  box-shadow: 0 6px 14px rgba(24, 58, 70, 0.16);
}

.ws-modern-new .form-select-small {
  min-width: 116px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(82, 247, 212, 0.12);
  color: #effffd;
  padding-top: 0.32rem;
  padding-bottom: 0.32rem;
  font-size: 0.7rem;
}

body.ws-modern-new:not(.dark-theme) .form-select-small {
  background: rgba(255, 255, 255, 0.9);
  color: #173550;
  border-color: rgba(0, 194, 255, 0.14);
}

.ws-search-history {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(82, 247, 212, 0.1);
  margin-top: auto;
}

.ws-insight-tools {
  margin-bottom: 6px;
}

.ws-mini-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(197, 255, 71, 0.18);
  background: rgba(197, 255, 71, 0.07);
  color: #f1ffbd;
  font-size: 0.7rem;
  font-weight: 600;
}

body.ws-modern-new:not(.dark-theme) .ws-mini-action {
  color: #7e8c12;
  border-color: rgba(190, 220, 63, 0.44);
  background: linear-gradient(180deg, rgba(248, 255, 223, 0.96) 0%, rgba(241, 251, 204, 0.92) 100%);
  box-shadow:
    0 10px 20px rgba(189, 216, 83, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

body.ws-modern-new:not(.dark-theme) .ws-mini-action i {
  color: #95a90b;
}

body.ws-modern-new:not(.dark-theme) .ws-mini-action:hover {
  color: #546200;
  border-color: rgba(165, 196, 43, 0.62);
  background: linear-gradient(135deg, #f1ffaf 0%, #dfff8f 100%);
}

.ws-modern-new #topKeywordModal .modal-dialog {
  max-width: 1120px;
}

.ws-modern-new #topKeywordModal .modal-content {
  border-radius: 26px;
  border: 1px solid rgba(82, 247, 212, 0.18);
  background:
    linear-gradient(180deg, rgba(8, 15, 28, 0.99) 0%, rgba(9, 17, 31, 0.98) 100%);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.44),
    0 0 0 1px rgba(0, 209, 255, 0.08);
  overflow: hidden;
}

.ws-modern-new #topKeywordModal .modal-header {
  padding: 1.15rem 1.4rem;
  border-bottom: 1px solid rgba(82, 247, 212, 0.12);
  background:
    linear-gradient(180deg, rgba(52, 69, 95, 0.92) 0%, rgba(42, 57, 80, 0.94) 100%);
}

.ws-modern-new #topKeywordModal .modal-title {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #effffd !important;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.ws-modern-new #topKeywordModal .modal-title .bi-fire {
  color: #ffc83a !important;
  text-shadow: 0 0 18px rgba(255, 200, 58, 0.28);
}

.ws-modern-new #topKeywordModal .btn-close {
  filter: none;
  opacity: 0.72;
}

.ws-modern-new #topKeywordModal .modal-body {
  padding: 1rem 1.15rem 1.15rem;
  background:
    radial-gradient(circle at top right, rgba(0, 209, 255, 0.06), transparent 26%),
    linear-gradient(180deg, rgba(9, 17, 31, 0.98) 0%, rgba(9, 17, 31, 0.98) 100%);
}

.ws-modern-new #topKeywordModal .top-keyword-list {
  gap: 0.72rem;
}

.ws-modern-new #topKeywordModal .keyword-item {
  padding: 0.95rem 1rem !important;
  border-radius: 18px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background:
    linear-gradient(135deg, rgba(56, 74, 100, 0.96) 0%, rgba(62, 79, 104, 0.92) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.ws-modern-new #topKeywordModal .keyword-item:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(82, 247, 212, 0.34);
  background:
    linear-gradient(135deg, rgba(74, 96, 132, 0.98) 0%, rgba(88, 108, 228, 0.9) 100%);
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(82, 247, 212, 0.08);
}

.ws-modern-new #topKeywordModal .keyword-item .rank-badge {
  width: 40px;
  height: 40px;
  min-width: 40px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
}

.ws-modern-new #topKeywordModal .top-keyword-link {
  color: #b8e2ff !important;
  font-size: 1.16rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

.ws-modern-new #topKeywordModal .keyword-item:hover .top-keyword-link {
  color: #f5fffd !important;
}

.ws-modern-new #topKeywordModal .text-muted,
.ws-modern-new #topKeywordModal .small {
  color: #d8e6ff !important;
  opacity: 0.9;
}

.ws-modern-new #topKeywordModal .badge.bg-primary {
  border: 1px solid rgba(116, 182, 255, 0.18);
  background: linear-gradient(135deg, #2d74ff 0%, #3d8bff 100%) !important;
  color: #f7fbff;
  border-radius: 999px;
  min-width: 50px;
  padding: 0.42rem 0.8rem;
  font-size: 1.05rem !important;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .modal-content {
  border-color: rgba(0, 194, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(250, 253, 255, 0.99) 0%, rgba(240, 248, 255, 0.98) 100%);
  box-shadow:
    0 22px 60px rgba(39, 90, 140, 0.16),
    0 0 0 1px rgba(0, 194, 255, 0.08);
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .modal-header {
  background:
    linear-gradient(180deg, rgba(228, 239, 250, 0.98) 0%, rgba(217, 232, 247, 0.98) 100%);
  border-bottom-color: rgba(0, 194, 255, 0.12);
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .modal-title {
  color: #14324f !important;
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .modal-body {
  background:
    radial-gradient(circle at top right, rgba(0, 194, 255, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(244, 251, 255, 0.98) 0%, rgba(238, 248, 255, 0.98) 100%);
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .keyword-item {
  border-color: rgba(0, 194, 255, 0.12);
  background:
    linear-gradient(135deg, rgba(225, 236, 247, 0.96) 0%, rgba(212, 227, 244, 0.94) 100%);
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .keyword-item:hover {
  border-color: rgba(0, 184, 245, 0.28);
  background:
    linear-gradient(135deg, rgba(192, 223, 255, 0.98) 0%, rgba(171, 212, 255, 0.96) 100%);
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .top-keyword-link {
  color: #18466d !important;
}

body.ws-modern-new:not(.dark-theme) #topKeywordModal .text-muted,
body.ws-modern-new:not(.dark-theme) #topKeywordModal .small {
  color: #496985 !important;
}

.wordcloud-section-compact {
  flex: 1;
  display: flex;
  min-height: 0;
}

.ws-modern-new .wordcloud-container-compact {
  width: 100%;
  height: 100%;
  min-height: 206px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top, rgba(0, 209, 255, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(4, 11, 21, 0.99) 0%, rgba(5, 12, 24, 0.97) 100%);
  border: 1px solid rgba(82, 247, 212, 0.12);
}

body.ws-modern-new:not(.dark-theme) .wordcloud-container-compact {
  background:
    radial-gradient(circle at top, rgba(0, 194, 255, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(247, 252, 255, 0.98) 0%, rgba(234, 246, 252, 0.97) 100%);
  border-color: rgba(0, 194, 255, 0.14);
}

.ws-results {
  margin-top: 8px;
}

.ws-results__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.ws-results__body {
  position: relative;
  z-index: 1;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ws-published-section {
  position: relative;
  margin-top: 14px;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background:
    radial-gradient(circle at top left, rgba(0, 209, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(6, 13, 25, 0.99) 0%, rgba(5, 11, 21, 0.95) 100%);
  box-shadow: var(--ws-new-shadow);
  overflow: hidden;
}

body.ws-modern-new:not(.dark-theme) .ws-published-section {
  border-color: rgba(0, 194, 255, 0.12);
  background:
    radial-gradient(circle at top left, rgba(0, 194, 255, 0.08), transparent 38%),
    linear-gradient(180deg, rgba(249, 252, 255, 0.98) 0%, rgba(239, 247, 252, 0.95) 100%);
  box-shadow: 0 18px 36px rgba(54, 110, 166, 0.08);
}

.ws-published-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.ws-published-section__header h2 {
  margin: 3px 0 2px;
  color: #f3fbff;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.ws-published-section__header p {
  margin: 0;
  color: #9db2cf;
  font-size: 0.84rem;
  line-height: 1.45;
  max-width: 52rem;
}

body.ws-modern-new:not(.dark-theme) .ws-published-section__header h2 {
  color: #143652;
}

body.ws-modern-new:not(.dark-theme) .ws-published-section__header p {
  color: #55728d;
}

.ws-published-section__more {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(82, 247, 212, 0.16);
  background: rgba(255, 255, 255, 0.03);
  color: #d7fff4;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.ws-published-section__more:hover {
  transform: translateY(-1px);
  border-color: rgba(82, 247, 212, 0.3);
  background: rgba(0, 209, 255, 0.08);
  color: #f2fffb;
}

body.ws-modern-new:not(.dark-theme) .ws-published-section__more {
  color: #15506f;
  border-color: rgba(0, 194, 255, 0.15);
  background: rgba(255, 255, 255, 0.75);
}

body.ws-modern-new:not(.dark-theme) .ws-published-section__more:hover {
  background: rgba(0, 194, 255, 0.08);
  color: #0f4362;
}

.ws-published-section__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(0, 0.96fr);
  gap: 14px;
  align-items: stretch;
}

.ws-published-list{
  display:grid;
  gap:10px;
  min-width:0;
}

.ws-published-hero,
.ws-published-mini {
  min-width: 0;
}

.ws-published-hero__link,
.ws-published-mini__link {
  display: flex;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.ws-published-hero__link {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(220px, 0.84fr);
  gap: 14px;
  min-height: 286px;
  padding: 16px;
  border-radius: 24px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.015) 100%);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.ws-published-hero__link:hover {
  transform: translateY(-1px);
  border-color: rgba(82, 247, 212, 0.25);
  background: rgba(0, 209, 255, 0.05);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
}

body.ws-modern-new:not(.dark-theme) .ws-published-hero__link {
  border-color: rgba(0, 194, 255, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

body.ws-modern-new:not(.dark-theme) .ws-published-hero__link:hover {
  border-color: rgba(0, 194, 255, 0.25);
  background: rgba(0, 194, 255, 0.05);
}

.ws-published-hero__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 10px;
  padding: 2px 2px 2px 0;
}

.ws-published-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #9ab3d3;
  font-size: 0.76rem;
  letter-spacing: -0.01em;
}

.ws-published-card__dot {
  color: rgba(154, 179, 211, 0.55);
}

.ws-published-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 209, 255, 0.18), rgba(82, 247, 212, 0.18));
  border: 1px solid rgba(82, 247, 212, 0.18);
  color: #dffdfa;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ws-published-hero__content .ws-published-card__meta,
.ws-published-mini__content .ws-published-card__meta {
  margin-bottom: 2px;
}

.ws-published-hero__title {
  margin: 0;
  color: #f5fbff;
  font-size: clamp(1.25rem, 2vw, 1.85rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.04em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ws-published-hero__summary {
  margin: 0;
  color: #b9cade;
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ws-published-hero__foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #7fa0bf;
  font-size: 0.78rem;
}

.ws-published-hero__slug {
  color: #79e7d0;
}

.ws-published-hero__thumb {
  position: relative;
  min-width: 0;
  min-height: 250px;
  border-radius: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(0, 209, 255, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(82, 247, 212, 0.1);
}

.ws-published-hero__thumb img,
.ws-published-mini__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ws-published-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(183, 213, 236, 0.68);
  font-size: 2rem;
}

.ws-published-mini {
  margin-bottom: 0;
}

.ws-published-mini__link {
  align-items: center;
  gap: 12px;
  min-height: 88px;
  padding: 11px 12px;
  border-radius: 18px;
  border: 1px solid rgba(82, 247, 212, 0.1);
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.ws-published-mini__link:hover {
  transform: translateY(-1px);
  border-color: rgba(82, 247, 212, 0.22);
  background: rgba(0, 209, 255, 0.05);
}

body.ws-modern-new:not(.dark-theme) .ws-published-mini__link {
  border-color: rgba(0, 194, 255, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

body.ws-modern-new:not(.dark-theme) .ws-published-mini__link:hover {
  border-color: rgba(0, 194, 255, 0.22);
  background: rgba(0, 194, 255, 0.05);
}

.ws-published-mini__thumb {
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(0, 209, 255, 0.15), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(82, 247, 212, 0.08);
}

.ws-published-mini__content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ws-published-mini__title {
  margin: 0;
  color: #f4fbff;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ws-published-mini__summary {
  margin: 0;
  color: #a7bdd8;
  font-size: 0.82rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.ws-modern-new:not(.dark-theme) .ws-published-section__header p,
body.ws-modern-new:not(.dark-theme) .ws-published-card__meta,
body.ws-modern-new:not(.dark-theme) .ws-published-hero__summary,
body.ws-modern-new:not(.dark-theme) .ws-published-hero__foot,
body.ws-modern-new:not(.dark-theme) .ws-published-mini__summary,
body.ws-modern-new:not(.dark-theme) .ws-published-mini__title {
  color: #1a3853;
}

@media (max-width: 768px) {
  .ws-published-section {
    margin-top: 12px;
    padding: 14px;
    border-radius: 22px;
  }

  .ws-published-section__header {
    align-items: flex-start;
    margin-bottom: 12px;
  }

  .ws-published-section__header h2 {
    font-size: 1.16rem;
  }

  .ws-published-section__grid {
    grid-template-columns: 1fr;
  }

  .ws-published-list{
    gap:8px;
  }

  .ws-published-hero__link {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 12px;
  }

  .ws-published-hero__thumb {
    min-height: 188px;
    order: -1;
  }

  .ws-published-hero__title {
    font-size: 1.18rem;
    -webkit-line-clamp: 2;
  }

  .ws-published-hero__summary {
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
  }

  .ws-published-hero__foot {
    font-size: 0.72rem;
  }

  .ws-published-mini__link {
    min-height: 78px;
    padding: 10px;
  }

  .ws-published-mini__thumb {
    width: 52px;
    height: 52px;
  }

  .ws-published-mini__title {
    font-size: 0.92rem;
  }

  .ws-published-mini__summary {
    font-size: 0.77rem;
    -webkit-line-clamp: 2;
  }
}

.ws-modern-new #viewModeIcons .btn {
  min-width: 38px;
  border-radius: 12px;
  border-color: rgba(82, 247, 212, 0.12);
  color: #d7fff4;
  background: rgba(255, 255, 255, 0.03);
}

.ws-modern-new #viewModeIcons .btn.active,
.ws-modern-new #viewModeIcons .btn:hover {
  background: linear-gradient(135deg, #00d1ff 0%, #52f7d4 100%);
  border-color: transparent;
  color: #051019;
}

.ws-modern-new .data-table th {
  color: #7fe8d4;
  border-bottom-color: rgba(82, 247, 212, 0.08);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

body.ws-modern-new:not(.dark-theme) .data-table th {
  color: #3f8ba0;
  border-bottom-color: rgba(0, 194, 255, 0.12);
}

.ws-modern-new .data-row,
.ws-modern-new .data-card,
.ws-modern-new .image-card,
.ws-modern-new .ultra-item {
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(82, 247, 212, 0.08);
  border-radius: 14px;
}

body.ws-modern-new:not(.dark-theme) .data-row,
body.ws-modern-new:not(.dark-theme) .data-card,
body.ws-modern-new:not(.dark-theme) .image-card,
body.ws-modern-new:not(.dark-theme) .ultra-item {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 194, 255, 0.1);
}

.ws-modern-new .data-row:hover,
.ws-modern-new .data-card:hover,
.ws-modern-new .image-card:hover,
.ws-modern-new .ultra-item:hover {
  background: rgba(0, 209, 255, 0.06);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.ws-modern-new .title-link,
.ws-modern-new .card-title,
.ws-modern-new .image-title,
.ws-modern-new .ultra-title {
  color: #effffd;
}

body.ws-modern-new:not(.dark-theme) .title-link,
body.ws-modern-new:not(.dark-theme) .card-title,
body.ws-modern-new:not(.dark-theme) .image-title,
body.ws-modern-new:not(.dark-theme) .ultra-title,
body.ws-modern-new:not(.dark-theme) .data-row td,
body.ws-modern-new:not(.dark-theme) .meta-item,
body.ws-modern-new:not(.dark-theme) .author-cell,
body.ws-modern-new:not(.dark-theme) .date-cell,
body.ws-modern-new:not(.dark-theme) .view-cell,
body.ws-modern-new:not(.dark-theme) .price-cell,
body.ws-modern-new:not(.dark-theme) .u-author,
body.ws-modern-new:not(.dark-theme) .u-time,
body.ws-modern-new:not(.dark-theme) .u-price,
body.ws-modern-new:not(.dark-theme) .u-views,
body.ws-modern-new:not(.dark-theme) .u-comments {
  color: #17324f;
}

.ws-modern-new .site-badge,
.ws-modern-new .rank-badge,
.ws-modern-new .rank-number {
  border-radius: 999px;
}

.ws-modern-new .site-badge {
  background: rgba(255, 255, 255, 0.05);
  color: #cffff3;
  border: 1px solid rgba(82, 247, 212, 0.12);
}

body.ws-modern-new:not(.dark-theme) .site-badge {
  background: rgba(228, 245, 252, 0.92);
  color: #28556f;
  border-color: rgba(0, 194, 255, 0.12);
}

.ws-modern-new .rank-1 {
  background: linear-gradient(135deg, #c5ff47 0%, #52f7d4 100%);
}

.ws-modern-new .rank-2 {
  background: linear-gradient(135deg, #b5f8ff 0%, #79d6ff 100%);
}

.ws-modern-new .rank-3 {
  background: linear-gradient(135deg, #ff94ea 0%, #7a82ff 100%);
}

.ws-modern-new .rank-top10 {
  background: linear-gradient(135deg, #00d1ff 0%, #6478ff 100%);
}

.footer--new {
  background: transparent;
  padding-top: 12px;
}

.ws-dashboard .row {
  --bs-gutter-x: 0.8rem;
  --bs-gutter-y: 0.8rem;
  align-items: stretch;
}

@media (min-width: 1200px) {
  .ws-panel--filters .ws-grid > .ws-block:nth-child(1),
  .ws-panel--filters .ws-grid > .ws-block:nth-child(3) {
    min-height: 88px;
  }

  .ws-panel--filters .ws-grid > .ws-block:nth-child(2),
  .ws-panel--filters .ws-grid > .ws-block:nth-child(4) {
    min-height: 88px;
  }

  .ws-panel--filters .category-tabs-compact,
  .ws-panel--filters .ranking-controls-compact {
    align-items: flex-start;
  }

  .ws-panel--filters .recent-header-compact {
    margin-bottom: 0.35rem;
  }

  .ws-panel--filters .recent-keywords-text {
    gap: 0.2rem;
  }
}

.footer--new .footer-brand span,
.footer--new .footer-desc,
.footer--new .footer-contact p,
.footer--new .footer-links a {
  color: #b8c6e6;
}

@media (max-width: 991px) {
  .ws-command,
  .ws-panel__header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .ws-results__header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .ws-command__actions {
    justify-content: flex-end;
    width: 100%;
    min-height: 0;
    flex-wrap: nowrap;
    gap: 6px;
  }

  .ws-grid {
    grid-template-columns: 1fr;
  }

  .ws-panel--filters .ws-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --ws-shell-padding-x: 16px;
  }

  .ws-new-shell {
    padding-top: 10px;
  }

  .ws-dashboard .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0.8rem;
  }

  .ws-dashboard .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }

  .ws-command,
  .ws-results {
    padding: 12px;
    border-radius: 22px;
  }

  .ws-panel {
    padding: 12px;
    border-radius: 22px;
  }

  .ws-results {
    position: relative;
    border: 1px solid rgba(82, 247, 212, 0.12);
    background: linear-gradient(180deg, rgba(5, 12, 24, 0.97) 0%, rgba(8, 15, 29, 0.93) 100%);
    box-shadow: var(--ws-new-shadow);
    overflow: hidden;
  }

  .ws-results::before {
    content: none;
    display: none;
  }

  .ws-results__header {
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
  }

  .ws-results__header > div:first-child {
    min-width: 0;
  }

  .ws-modern-new #viewModeIcons {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-shrink: 0;
  }

  .ws-modern-new #viewModeIcons .btn {
    min-width: 0;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
  }

  .ws-results__body {
    position: relative;
    z-index: 1;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .ws-command__field {
    min-height: 42px;
    padding: 4px 6px 4px 9px;
  }

  .ws-command__submit {
    min-width: 58px;
  }

  .ws-command__actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
  }

  .ws-modern-new .favorite-controls {
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
  }

  .ws-modern-new #siteFavButtons {
    flex-wrap: nowrap;
    gap: 4px;
  }

  .ws-modern-new .mobile-ultra-list {
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(82, 247, 212, 0.08);
    background: rgba(255, 255, 255, 0.02);
  }

  .ws-modern-new .mobile-ultra-list .ultra-item {
    padding: 9px 10px;
    border-bottom-color: rgba(82, 247, 212, 0.08) !important;
  }

  .ws-modern-new .mobile-ultra-list .ultra-item:last-child {
    border-bottom: none;
  }

  .ws-modern-new .ultra-line1 {
    gap: 6px;
  }

  .ws-modern-new .ultra-rank {
    width: auto;
    min-width: 22px;
    text-align: left;
    font-weight: 700;
    color: #8cfde3;
    font-size: 12px;
  }

  .ws-modern-new .ultra-title {
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.18;
  }

  .ws-modern-new .ultra-line2 {
    margin-top: 2px;
    gap: 4px;
    font-size: 8.8px;
    flex-wrap: wrap;
  }

  .ws-modern-new .ultra-site {
    font-size: 8.8px;
  }

  body.ws-modern-new:not(.dark-theme) .mobile-ultra-list {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(0, 194, 255, 0.12);
  }

  body.ws-modern-new:not(.dark-theme) .ultra-rank {
    color: #0aa0bd;
  }

  body.ws-modern-new:not(.dark-theme) .ws-results {
    border-color: rgba(0, 194, 255, 0.12);
    background: linear-gradient(180deg, rgba(250, 253, 255, 0.98) 0%, rgba(240, 248, 255, 0.95) 100%);
    box-shadow: 0 16px 34px rgba(54, 110, 166, 0.1);
  }
}

@media (max-width: 1199px) {
  .ws-dashboard .row {
    --bs-gutter-x: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .ws-dashboard .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .ws-panel {
    border-radius: 22px;
  }

  .ws-panel--filters,
  .ws-panel--insight {
    width: 100%;
  }

  .ws-results {
    width: 100%;
  }

  .ws-modern-new .data-table {
    font-size: 0.8rem;
  }

  .ws-modern-new .data-table th {
    font-size: 0.66rem;
    padding: 0.62rem 0.72rem;
  }

  .ws-modern-new .data-table td {
    font-size: 0.78rem;
    padding: 0.62rem 0.72rem;
  }

  .ws-modern-new .mobile-ultra-list .ultra-item {
    padding: 7px 10px !important;
  }

  .ws-modern-new .ultra-rank {
    min-width: 18px !important;
    font-size: 10px !important;
  }

  .ws-modern-new .ultra-title {
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
  }

  .ws-modern-new .ultra-site,
  .ws-modern-new .ultra-line2 {
    font-size: 8px !important;
  }

  .ws-modern-new .ultra-line2 {
    gap: 4px !important;
    margin-top: 1px !important;
  }
}

/* Final panel locks for the New page.
   Keep these at the very end so earlier inlined/base rules cannot drift the shell shape. */
body.ws-modern-new {
  --ws-section-radius: 22px;
}

body.ws-modern-new .ws-panel.ws-panel--filters,
body.ws-modern-new .ws-panel.ws-panel--insight,
body.ws-modern-new .ws-results {
  border-radius: var(--ws-section-radius) !important;
  overflow: hidden;
}

body.ws-modern-new .category-tabs-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  row-gap: 8px;
}

body.ws-modern-new .category-btn-compact {
  flex: 0 1 auto;
  white-space: nowrap;
}

body.ws-modern-new .ws-dashboard .row > [class*="col-"] {
  display: flex;
}

body.ws-modern-new .ws-dashboard .row > [class*="col-"] > .ws-panel {
  flex: 1 1 auto;
}

/* Final entry locks for list/card/image views */
body.ws-modern-new {
  --ws-entry-radius: 18px;
  --ws-list-title-size: 13.5px;
  --ws-list-meta-size: 9.2px;
  --ws-card-title-size: 13.5px;
  --ws-card-meta-size: 9.2px;
}

body.ws-modern-new .mobile-ultra-list {
  padding: 0;
  border-radius: var(--ws-entry-radius);
  overflow: hidden;
}

body.ws-modern-new .mobile-ultra-list .ultra-item,
body.ws-modern-new .data-card,
body.ws-modern-new .image-card {
  border-radius: var(--ws-entry-radius) !important;
}

body.ws-modern-new .mobile-ultra-list .ultra-item {
  padding: 10px 12px !important;
}

body.ws-modern-new .ultra-title {
  font-size: var(--ws-list-title-size) !important;
  line-height: 1.22 !important;
  font-weight: 500 !important;
}

body.ws-modern-new .ultra-site,
body.ws-modern-new .ultra-line2 {
  font-size: var(--ws-list-meta-size) !important;
}

body.ws-modern-new .ultra-rank {
  min-width: 22px !important;
  font-size: 12px !important;
}

body.ws-modern-new .card-grid,
body.ws-modern-new .image-grid {
  gap: 12px !important;
  padding: 4px 0 0 !important;
}

body.ws-modern-new .data-card {
  padding: 12px 14px !important;
}

body.ws-modern-new .entry-card__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

body.ws-modern-new .entry-card__content {
  flex: 1 1 auto;
  min-width: 0;
}

/* Discovery tabbed panel */
body.ws-modern-new .discovery-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

body.ws-modern-new .discovery-content {
  min-height: 0;
}

body.ws-modern-new .discovery-panel {
  display: none;
}

body.ws-modern-new .discovery-panel.is-active {
  display: block;
}

body.ws-modern-new .top-keyword-list--inline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.ws-modern-new .keyword-item--inline {
  padding: 0.82rem 0.95rem;
  border-radius: 18px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

body.ws-modern-new .keyword-inline__body {
  min-width: 0;
}

body.ws-modern-new .keyword-inline__meta {
  margin-top: 4px;
  color: #9fb7cf;
  font-size: 0.7rem;
  line-height: 1.35;
}

body.ws-modern-new .keyword-inline__count {
  min-width: 46px;
  border-radius: 999px;
  padding: 0.38rem 0.7rem;
}

body.ws-modern-new .site-heat--desktop {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.ws-modern-new .site-heat--mobile {
  display: none;
}

body.ws-modern-new .site-heat-grid__table {
  display: grid;
  gap: 8px;
  align-items: stretch;
}

body.ws-modern-new .site-heat-grid__head,
body.ws-modern-new .site-heat-grid__label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 0.6rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(82, 247, 212, 0.09);
  color: #d9fff7;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

body.ws-modern-new .site-heat-grid__corner {
  color: #80f5d8;
  letter-spacing: 0.08em;
}

body.ws-modern-new .site-heat-grid__cell {
  min-height: 44px;
  border: 1px solid rgba(82, 247, 212, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: #effffd;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.55rem 0.35rem;
  text-align: center;
  transition: var(--transition-fast);
}

body.ws-modern-new .site-heat-grid__cell:hover {
  transform: translateY(-1px);
  border-color: rgba(82, 247, 212, 0.24);
}

body.ws-modern-new .site-heat-grid__cell.is-empty {
  color: rgba(213, 255, 245, 0.35);
  background: rgba(255, 255, 255, 0.018);
}

body.ws-modern-new .site-heat-grid__cell.is-soft {
  background: rgba(0, 209, 255, 0.08);
}

body.ws-modern-new .site-heat-grid__cell.is-mild {
  background: rgba(0, 209, 255, 0.14);
}

body.ws-modern-new .site-heat-grid__cell.is-warm {
  background: rgba(82, 247, 212, 0.16);
}

body.ws-modern-new .site-heat-grid__cell.is-hot {
  background: linear-gradient(135deg, rgba(0, 209, 255, 0.22) 0%, rgba(197, 255, 71, 0.2) 100%);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

body.ws-modern-new .site-heat-highlights {
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(82, 247, 212, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

body.ws-modern-new .site-heat-highlights__title {
  margin: 0 0 10px;
  color: #baf9ee;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ws-modern-new .site-heat-highlight-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body.ws-modern-new .site-heat-highlight-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: #effffd;
  text-align: left;
}

body.ws-modern-new .site-heat-highlight-card__keyword {
  font-size: 0.94rem;
  font-weight: 700;
}

body.ws-modern-new .site-heat-highlight-card__lead {
  color: #a6bdd2;
  font-size: 0.72rem;
}

body.ws-modern-new .site-heat-highlight-card__spread {
  color: #c5ff47;
  font-size: 0.8rem;
  font-weight: 700;
}

body.ws-modern-new .site-heat-chip-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
}

body.ws-modern-new .site-heat-keyword-btn {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #d9fff7;
  font-size: 0.76rem;
  font-weight: 600;
}

body.ws-modern-new .site-heat-keyword-btn.active {
  background: linear-gradient(135deg, #2f6272 0%, #4f7f78 100%);
  color: #effffd;
  border-color: rgba(116, 160, 165, 0.22);
}

body.ws-modern-new .site-heat-mobile-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(82, 247, 212, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

body.ws-modern-new .site-heat-mobile-card__header {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}

body.ws-modern-new .site-heat-mobile-card__eyebrow {
  color: #8db2cb;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.ws-modern-new .site-heat-mobile-card__keyword {
  color: #effffd;
  font-size: 1rem;
  font-weight: 700;
}

body.ws-modern-new .site-heat-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body.ws-modern-new .site-heat-bar__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.78rem;
}

body.ws-modern-new .site-heat-bar__site {
  color: #e4f5ff;
  font-weight: 600;
}

body.ws-modern-new .site-heat-bar__value {
  color: #8cfde3;
  font-weight: 700;
}

body.ws-modern-new .site-heat-bar__track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

body.ws-modern-new .site-heat-bar__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, #00d1ff 0%, #52f7d4 100%);
}

body.ws-modern-new .site-heat-summary,
body.ws-modern-new .discovery-empty {
  margin: 12px 0 0;
  color: #97b2ca;
  font-size: 0.76rem;
  line-height: 1.5;
}

body.ws-modern-new:not(.dark-theme) .keyword-item--inline,
body.ws-modern-new:not(.dark-theme) .site-heat-grid__head,
body.ws-modern-new:not(.dark-theme) .site-heat-grid__label,
body.ws-modern-new:not(.dark-theme) .site-heat-grid__cell,
body.ws-modern-new:not(.dark-theme) .site-heat-highlights,
body.ws-modern-new:not(.dark-theme) .site-heat-highlight-card,
body.ws-modern-new:not(.dark-theme) .site-heat-mobile-card,
body.ws-modern-new:not(.dark-theme) .site-heat-keyword-btn {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 194, 255, 0.12);
  color: #17324f;
}

body.ws-modern-new:not(.dark-theme) .keyword-inline__meta,
body.ws-modern-new:not(.dark-theme) .site-heat-highlight-card__lead,
body.ws-modern-new:not(.dark-theme) .site-heat-mobile-card__eyebrow,
body.ws-modern-new:not(.dark-theme) .site-heat-summary,
body.ws-modern-new:not(.dark-theme) .discovery-empty {
  color: #4d6b85;
}

body.ws-modern-new:not(.dark-theme) .site-heat-bar__site {
  color: #183652;
}

body.ws-modern-new:not(.dark-theme) .site-heat-bar__track {
  background: rgba(0, 194, 255, 0.08);
}

body.ws-modern-new:not(.dark-theme) .site-heat-keyword-btn.active {
  background: linear-gradient(135deg, #00b8f5 0%, #35e3cb 55%, #b8ff38 100%);
  color: #041827;
  border-color: rgba(0, 166, 224, 0.35);
}

@media (max-width: 768px) {
  body.ws-modern-new .discovery-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.ws-modern-new .discovery-tab-btn[data-discovery-tab="heat"] {
    grid-column: 1 / -1;
  }

  body.ws-modern-new .site-heat--desktop {
    display: none;
  }

  body.ws-modern-new .site-heat--mobile {
    display: block;
  }

  body.ws-modern-new .wordcloud-container-compact {
    min-height: 250px;
  }

  body.ws-modern-new .keyword-item--inline {
    padding: 0.72rem 0.82rem;
  }

  body.ws-modern-new .top-keyword-list--inline {
    gap: 8px;
  }
}

body.ws-modern-new .entry-card__header {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0.35rem;
}

body.ws-modern-new .card-title,
body.ws-modern-new .image-title {
  font-size: var(--ws-card-title-size) !important;
  line-height: 1.28 !important;
  font-weight: 600 !important;
  margin-bottom: 0.35rem !important;
}

body.ws-modern-new .card-meta {
  gap: 10px !important;
  margin-top: 8px !important;
  padding-top: 8px !important;
  flex-wrap: wrap;
}

body.ws-modern-new .meta-item,
body.ws-modern-new .image-meta,
body.ws-modern-new .image-meta span,
body.ws-modern-new .image-meta .price-text {
  font-size: var(--ws-card-meta-size) !important;
  line-height: 1.2;
}

body.ws-modern-new .image-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

body.ws-modern-new .image-card {
  aspect-ratio: 1.95 / 1;
}

body.ws-modern-new .image-overlay {
  padding: 12px !important;
}

body.ws-modern-new .mobile-thumb {
  width: 56px;
  height: 72px;
  border-radius: 12px;
}

@media (max-width: 1199px) {
  body.ws-modern-new .card-grid,
  body.ws-modern-new .image-grid {
    grid-template-columns: 1fr !important;
  }

  body.ws-modern-new .image-card {
    aspect-ratio: 2 / 1;
  }
}

body.ws-modern-new.ws-ai-open {
  overflow: hidden;
}

body.ws-modern-new .ws-ai-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1250;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(82, 247, 212, 0.22);
  background: linear-gradient(135deg, #00c7f3 0%, #53f6d4 55%, #b8ff38 100%);
  color: #041827;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.32);
}

body.ws-modern-new .ws-ai-fab i {
  font-size: 1rem;
}

body.ws-modern-new .ws-ai-overlay {
  position: fixed;
  inset: 0;
  z-index: 1238;
  background: rgba(4, 10, 20, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

body.ws-modern-new .ws-ai-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.ws-modern-new .ws-ai-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1240;
  width: min(420px, 92vw);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 18px 18px;
  background: rgba(9, 17, 32, 0.96);
  border-left: 1px solid rgba(82, 247, 212, 0.16);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.36);
  transform: translateX(104%);
  transition: transform 0.24s ease;
  backdrop-filter: blur(16px);
}

body.ws-modern-new .ws-ai-panel.is-open {
  transform: translateX(0);
}

body.ws-modern-new .ws-ai-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

body.ws-modern-new .ws-ai-panel__kicker {
  display: block;
  color: #7be7ff;
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  margin-bottom: 8px;
}

body.ws-modern-new .ws-ai-panel__title {
  margin: 0;
  color: #f4f9ff;
  font-size: 1.18rem;
  font-weight: 800;
}

body.ws-modern-new .ws-ai-panel__caption {
  margin: 6px 0 0;
  color: #95acc6;
  font-size: 0.82rem;
  line-height: 1.45;
}

body.ws-modern-new .ws-ai-panel__close {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 14px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #effffd;
}

body.ws-modern-new .ws-ai-panel__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

body.ws-modern-new .ws-ai-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.ws-modern-new .ws-ai-context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #d6f8ff;
  font-size: 0.74rem;
  font-weight: 600;
}

body.ws-modern-new .ws-ai-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  max-height: 132px;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: flex-start;
  padding-right: 2px;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.ws-modern-new .ws-ai-prompts::-webkit-scrollbar {
  display: none;
}

body.ws-modern-new .ws-ai-prompt {
  min-height: 36px;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: #effffd;
  font-size: 0.77rem;
  font-weight: 600;
  text-align: left;
}

body.ws-modern-new .ws-ai-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 2px;
  padding-bottom: 6px;
}

body.ws-modern-new .ws-ai-message {
  display: flex;
}

body.ws-modern-new .ws-ai-message--user {
  justify-content: flex-end;
}

body.ws-modern-new .ws-ai-message__bubble {
  max-width: 92%;
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(82, 247, 212, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #effffd;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ws-modern-new .ws-ai-message--user .ws-ai-message__bubble {
  background: linear-gradient(135deg, rgba(0, 199, 243, 0.22) 0%, rgba(83, 246, 212, 0.16) 100%);
}

body.ws-modern-new .ws-ai-answer__heading {
  color: #effffd;
  font-size: 0.94rem;
  font-weight: 800;
  margin-bottom: 8px;
}

body.ws-modern-new .ws-ai-answer__question {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 199, 243, 0.14);
  color: #8cfde3;
  font-size: 0.73rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ws-modern-new .ws-ai-answer__summary {
  margin: 0;
  color: #dcebf7;
  font-size: 0.83rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ws-modern-new .ws-ai-answer__bullets {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #9fb4cb;
  font-size: 0.78rem;
  line-height: 1.6;
}

body.ws-modern-new .ws-ai-answer__posts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}

body.ws-modern-new .ws-ai-related-post {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #effffd;
  text-decoration: none;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ws-modern-new .ws-ai-related-post strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ws-modern-new .ws-ai-related-post span {
  color: #93abc4;
  font-size: 0.74rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.ws-modern-new .ws-ai-answer__footer {
  margin: 12px 0 0;
  color: #6f8ca8;
  font-size: 0.72rem;
  line-height: 1.5;
}

body.ws-modern-new .ws-ai-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 14px;
}

/* Direct chat input is temporarily hidden while keeping prompt buttons active. */
body.ws-modern-new .ws-ai-form {
  display: none;
}

body.ws-modern-new .ws-ai-input {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: #effffd;
  padding: 0 16px;
  font-size: 0.86rem;
}

body.ws-modern-new .ws-ai-input::placeholder {
  color: #8197b3;
}

body.ws-modern-new .ws-ai-submit {
  min-width: 72px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: linear-gradient(135deg, #00c7f3 0%, #53f6d4 55%, #b8ff38 100%);
  color: #041827;
  font-weight: 800;
}

body.ws-modern-new:not(.dark-theme) .ws-ai-panel {
  background: rgba(245, 251, 255, 0.96);
  border-left-color: rgba(0, 184, 245, 0.18);
}

body.ws-modern-new:not(.dark-theme) .ws-ai-panel__title,
body.ws-modern-new:not(.dark-theme) .ws-ai-panel__close,
body.ws-modern-new:not(.dark-theme) .ws-ai-prompt,
body.ws-modern-new:not(.dark-theme) .ws-ai-message__bubble,
body.ws-modern-new:not(.dark-theme) .ws-ai-context-chip,
body.ws-modern-new:not(.dark-theme) .ws-ai-input,
body.ws-modern-new:not(.dark-theme) .ws-ai-related-post {
  color: #17324f;
}

body.ws-modern-new:not(.dark-theme) .ws-ai-panel__caption,
body.ws-modern-new:not(.dark-theme) .ws-ai-answer__bullets,
body.ws-modern-new:not(.dark-theme) .ws-ai-related-post span,
body.ws-modern-new:not(.dark-theme) .ws-ai-answer__footer {
  color: #4c6b88;
}

body.ws-modern-new:not(.dark-theme) .ws-ai-answer__question {
  background: rgba(0, 184, 245, 0.12);
  color: #11607c;
}

body.ws-modern-new:not(.dark-theme) .ws-ai-context-chip,
body.ws-modern-new:not(.dark-theme) .ws-ai-prompt,
body.ws-modern-new:not(.dark-theme) .ws-ai-message__bubble,
body.ws-modern-new:not(.dark-theme) .ws-ai-related-post,
body.ws-modern-new:not(.dark-theme) .ws-ai-input,
body.ws-modern-new:not(.dark-theme) .ws-ai-panel__close {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 184, 245, 0.14);
}

@media (max-width: 768px) {
  body.ws-modern-new .ws-ai-fab {
    right: 14px;
    bottom: 14px;
    min-height: 48px;
    padding: 0 16px;
  }

  body.ws-modern-new .ws-ai-panel {
    top: auto;
    bottom: 0;
    right: 0;
    width: 100%;
    max-height: 86vh;
    height: auto;
    border-left: none;
    border-top: 1px solid rgba(82, 247, 212, 0.16);
    border-radius: 24px 24px 0 0;
    transform: translateY(104%);
  }

  body.ws-modern-new .ws-ai-panel.is-open {
    transform: translateY(0);
  }

  body.ws-modern-new .ws-ai-panel__title {
    font-size: 1.04rem;
  }

  body.ws-modern-new .ws-ai-prompts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 124px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 0;
    align-content: start;
  }

  body.ws-modern-new .ws-ai-prompt {
    min-width: 0;
    width: 100%;
    min-height: 42px;
    padding: 0.7rem 0.85rem;
    font-size: 0.8rem;
  }

  body.ws-modern-new .ws-ai-message__bubble {
    max-width: 100%;
  }

  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile {
    padding-top: 14px;
  }

  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile .ws-ai-panel__header {
    margin-bottom: 8px;
  }

  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile .ws-ai-panel__kicker {
    margin-bottom: 4px;
    font-size: 0.68rem;
  }

  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile .ws-ai-panel__title {
    font-size: 0.96rem;
  }

  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile .ws-ai-panel__caption,
  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile .ws-ai-context,
  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile .ws-ai-message--welcome {
    display: none;
  }

  body.ws-modern-new .ws-ai-panel.ws-ai-panel--compact-mobile .ws-ai-panel__body {
    gap: 10px;
  }
}

body.ws-modern-new.ws-ai-open .ws-ai-fab {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.92);
}

body.ws-modern-new .ws-ai-prompt-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(82, 247, 212, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #d6f8ff;
  font-size: 0.75rem;
  font-weight: 700;
  width: fit-content;
}

body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-panel__header {
  align-items: center;
  margin-bottom: 8px;
}

body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-panel__kicker,
body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-panel__caption,
body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-context,
body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-message--welcome {
  display: none;
}

body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-panel__title {
  font-size: 1rem;
}

body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-panel__body {
  gap: 10px;
}

body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-prompt-toggle {
  display: inline-flex;
}

body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-prompts {
  max-height: 120px;
  overflow-y: auto;
  padding-right: 2px;
}

body.ws-modern-new .ws-ai-panel--prompts-collapsed .ws-ai-prompts {
  display: none;
}

body.ws-modern-new .ws-ai-form {
  flex: 0 0 auto;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(9, 17, 32, 0) 0%, rgba(9, 17, 32, 0.96) 24%);
}

body.ws-modern-new:not(.dark-theme) .ws-ai-prompt-toggle {
  color: #17324f;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 184, 245, 0.14);
}

body.ws-modern-new:not(.dark-theme) .ws-ai-form {
  background: linear-gradient(180deg, rgba(245, 251, 255, 0) 0%, rgba(245, 251, 255, 0.96) 24%);
}

@media (max-width: 768px) {
  body.ws-modern-new .ws-ai-prompt-toggle {
    width: 100%;
  }

  body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-panel__title {
    font-size: 0.98rem;
  }

  body.ws-modern-new .ws-ai-panel--chat-mode .ws-ai-prompts {
    max-height: 112px;
    grid-template-columns: 1fr;
  }
}
