/* Home Page Search Input Styling */
#home-search-input {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: #333333 !important;
  background-color: #FFFFFF !important;
}

#home-search-input::placeholder {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  color: #6B7280 !important;
}

/* Remove extra margins */

/* Ranking Table Styling - Similar to comprehensive-index */
.rank_list {
  font-family: Pretendard, "Noto Sans KR", dotum, Arial, sans-serif;
  color: #000;
}

/* Table wrapper with fade effect */
.table-wrapper {
  position: relative;
  width: 100%;
}

.table-scroll-container {
  width: 100%;
  max-height: 280px; /* Approximately 3 rows + header (adjust based on row height) */
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  /* Custom scrollbar styling */
  scrollbar-width: thin;
  scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

.table-scroll-container::-webkit-scrollbar {
  width: 6px;
}

.table-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll-container::-webkit-scrollbar-thumb {
  background-color: rgba(156, 163, 175, 0.5);
  border-radius: 3px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
  background-color: rgba(156, 163, 175, 0.8);
}

/* Fade overlay at bottom */
.table-fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 70%, rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.3s ease;
}

/* Hide fade when scrolled to bottom */
.table-wrapper.scrolled-to-bottom .table-fade-overlay {
  opacity: 0;
}

.over_cont {
  width: 100%;
  max-height: 500px;
  overflow: auto;
}

#rank_tb {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  table-layout: fixed;
  transition: opacity 0.3s ease;
}

#rank_tb th,
#rank_tb td {
  font-family: Pretendard, "Noto Sans KR", dotum, Arial, sans-serif;
  font-size: 13px;
  color: #000;
  padding: 10px 8px 10px 0;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid rgba(243, 244, 246, 0.3);
}

#rank_tb th {
  font-weight: normal;
  padding-bottom: 12px;
  padding-top: 8px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.3);
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 10;
  /* Add shadow when scrolling */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0);
  transition: box-shadow 0.3s ease;
}

.table-scroll-container.scrolled #rank_tb th {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Column width for headers and cells */
#rank_tb th:nth-child(1),
#rank_tb td:nth-child(1) {
  width: 50px; /* 순위 */
}
#rank_tb th:nth-child(2),
#rank_tb td:nth-child(2) {
  width: 100px; /* 셀럽명 */
}
#rank_tb th:nth-child(3),
#rank_tb td:nth-child(3) {
  width: 140px; /* 인스타그램 팔로워 */
}
#rank_tb th:nth-child(4),
#rank_tb td:nth-child(4) {
  width: 150px; /* 유튜브 뮤직 재생 수 */
}
#rank_tb th:nth-child(5),
#rank_tb td:nth-child(5) {
  width: 130px; /* 유튜브 조회수 */
}
#rank_tb th:nth-child(6),
#rank_tb td:nth-child(6) {
  width: 90px; /* 기사 언급 */
}
#rank_tb th:nth-child(7),
#rank_tb td:nth-child(7) {
  width: 110px; /* 랭킹 지수 */
}

#rank_tb td.stk {
  font-weight: 500;
}

.data_tr {
  border-spacing: 0;
  transition: all 0.2s ease;
}

.data_tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Text styles */
.fl_t2,
.fl_t2.pur {
  font-family: Pretendard, Arial, sans-serif;
  font-size: 16px;
  color: #808080;
  margin: 0;
  padding-right: 5px;
}

.fl_t4 {
  font-family: Pretendard, Arial, sans-serif;
  font-size: 20px;
  color: #0D0D0D;
  margin: 0;
}

.fl_t4.f600 {
  font-weight: 600;
}

.ranking-score {
  font-weight: 600;
  color: #0D0D0D;
}

#loading-indicator {
  transition: all 0.3s ease;
}


/* Layout container */
.right {
  padding-top: 24px;      /* creates space between top and search/title */
  padding-left: 0;
  padding-right: 0;
  margin: 0 auto;
  max-width: 1200px;      /* keep content centered similar to original */
}

/* Title section (🔥 실시간 AI WANY ...) */
.head_cont {
  margin-top: 16px; /* control spacing between search bar and title */
  margin-bottom: 12px;
}

/* Optional: tighten the space below the title before the table */
#rank_tb {
  margin-top: 8px;
}

/* ============================================
   HOT Sections (NEWS, ISSUE, FASHION)
   ============================================ */

#hot-sections {
  font-family: Pretendard, "Noto Sans KR", dotum, Arial, sans-serif;
}

.hot-section {
  /* Each column */
}

.hot-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #0D0D0D;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hot-section-plus {
  font-size: 20px;
  font-weight: 300;
  color: #4B5563;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
}

.hot-section-plus:hover {
  color: #0D0D0D;
}

/* HOT NEWS & HOT ISSUE list styling */
.hot-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hot-list li {
  border-bottom: 1px solid #E5E7EB;
  padding: 10px 0;
}

.hot-list li:last-child {
  border-bottom: none;
}

.hot-list a {
  font-size: 13px;
  line-height: 1.4;
  color: #4B5563;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
}

.hot-list a:hover {
  color: #0D0D0D;
  text-decoration: underline;
}

/* One-line clamp utility */
.one-line {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
}

/* HOT FASHION grid */
.hot-fashion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.hot-fashion-card {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.hot-fashion-card:hover {
  transform: translateY(-2px);
}

.hot-fashion-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 133.33%; /* 3:4 aspect ratio */
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
  background-color: #F3F4F6;
}

.hot-fashion-thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hot-fashion-caption {
  font-size: 12px;
  color: #6B7280;
  margin-top: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
