/* Reset & Base */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

table {
  letter-spacing: 0.09em; /* 적당히 넓게 늘림, 숫자 조정 가능 */
}

body {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #e2e8f0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1800px;
  margin: 0 auto;
}

/* header 스타일을 찾아서 아래와 같이 수정 */
header {
  display: flex;
  justify-content: space-between; /* 👈 flex-start에서 변경 */
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  margin-bottom: 25px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 32px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-actions {
  display: flex;
  gap: 12px;
}

.refresh-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  /* font-weight: 600; */
  transition: transform 0.2s, box-shadow 0.2s;
}

.refresh-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.refresh-btn:active {
  transform: translateY(0);
}

/* Filters */
.filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  flex-wrap: wrap;
  gap: 16px;
}

.brand-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-label {
  color: #94a3b8;
  font-size: 14px;
  /* font-weight: 600; */
  margin-right: 8px;
}

.brand-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  /* font-weight: 500; */
  transition: all 0.2s;
}

.brand-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.brand-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Date Picker */
.date-picker-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.date-picker-container > label {
  color: #94a3b8;
  font-size: 13px;
  /* font-weight: 600; */
}

.date-inputs {
  display: flex;
  align-items: center;
  justify-content: space-between; /* ✨ 핵심: 자식 요소들을 좌우 끝으로 밀어냅니다. */
  /* gap 속성은 더 이상 필요 없으므로 제거합니다. */
}

.date-input {
  margin: 3px 0px;
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
  flex-grow: 1; /* ✨ 핵심: 두 input이 남는 공간을 똑같이 나누어 갖도록 합니다. */
  text-align: center; /* (선택사항) 날짜 텍스트를 중앙 정렬하여 보기 좋게 만듭니다. */
}

.date-input:hover {
  border-color: #3b82f6;
}

.date-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.date-separator {
  /* (선택사항) 화면이 줄어들 때 '~'가 찌그러지는 것을 방지합니다. */
  flex-shrink: 0;

  /* ✨ 핵심: 좌우에 12px(원하는 만큼)의 여백을 추가합니다. ✨ */
  margin-left: 12px;
  margin-right: 12px;

  /* 위 두 줄을 한 줄로 표현: */
  /* margin: 0 12px; */
}

.quick-buttons {
  display: flex;
  gap: 6px;
}

.quick-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  /* font-weight: 500; */
  transition: all 0.2s;
  white-space: nowrap;
}

.quick-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.quick-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Table */
.table-container {
  background: rgba(30, 41, 59, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  overflow-x: auto;
}

th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  border-right: 1px solid rgba(51, 65, 85, 0.3);
}

th {
  font-size: 12px;
  /* font-weight: 600; */
  color: #94a3b8;
  text-transform: uppercase;
  background: rgba(15, 23, 42, 0.8);
  position: sticky;
  top: 0;
  z-index: 10;
}

.sticky-col {
  position: sticky;
  left: 0;
  background: rgb(15, 23, 42) !important;
  white-space: nowrap;
  z-index: 11;
  /* 너비는 기본 CSS에서 지정, JS에서 제어하지 않도록 */
  width: 220px; /* 명확히 고정으로 지정 */
}

.sticky-col-2 {
  position: sticky;
  left: 220px;
  background: rgb(15, 23, 42) !important;
  white-space: nowrap;
  z-index: 11;
  min-width: 80px;
  max-width: 300px;
  text-align: center;
  font-size: 14px;
  /* font-weight: 600; */
  /* border-right: 1px solid rgba(51, 65, 85, 0.3); */
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

/* 제품 정보 컬럼 (테이블 헤더 부분만 중앙 정렬 및 강조) */
thead th.sticky-col {
  text-align: center !important;
  font-size: 14px;
  /* font-weight: 600; */
}

.sticky-col,
.sticky-col-2 {
  will-change: left;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* 키워드 실제 텍스트 셀 */
.keyword-cell {
  font-size: 14px;
  /* font-weight: 600; */
  color: #cbd5e1;
  white-space: nowrap;
  text-align: center;
  overflow: visible;
  /* border: none; */
}

/* 제품 그룹 행 아래쪽 얇은 선 */
.product-group-even td,
.product-group-odd td {
  border-bottom: 1px solid rgba(72, 94, 121, 0.4); /* 연한 푸른색 선 */
}

/* 제품 그룹 경계: 진한 파란색 두꺼운 상단 테두리 */
.product-group-odd + .product-group-even td,
.product-group-even + .product-group-odd td {
  border-top: 20px solid rgba(72, 94, 121, 0.4) !important; /* 진한 파란색, 주요 구분선 */
}

/* 호버 시 강조 색 */
/* tbody tr:hover td,
tbody tr:hover .sticky-col,
tbody tr:hover .sticky-col-2 {
  background: #36567a !important;
} */

/* 테이블 */
table {
  border-collapse: collapse;
  table-layout: auto; /* 추가 */
  width: auto; /* 추가 */
}

/* 날짜 컬럼 */
th:not(.sticky-col):not(.sticky-col-2) {
  width: 90px !important;
  min-width: 100px !important;
  max-width: 100px !important;
}

td:not(.sticky-col):not(.sticky-col-2) {
  width: 90px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  white-space: nowrap;
  overflow: hidden;
}

tbody tr {
  transition: background 0.2s;
}

/* tbody tr:hover {
  background: rgba(51, 65, 85, 0.3);
} */

/* 제품 정보 */
/* style.css 중간쯤 위치 */
.product-info {
  display: flex;
  align-items: center; /* 수직 중앙 */
  justify-content: flex-start !important; /* 수평 왼쪽 시작 (중요) */
  gap: 14px; /* 이미지와 텍스트 사이 간격 */
  width: 100%;
}

/* 제품 이미지 */
.product-image {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: #1e293b;
  flex-shrink: 0;
  border: 1px solid #334155;
}

/* 이미지 로딩 실패 시 대체 아이콘 */
.product-image-fallback {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  flex-shrink: 0;
  border: 1px solid #334155;
}

.product-details {
  display: inline-flex; /* 변경 */
  flex-direction: column;
  gap: 4px;
  white-space: nowrap; /* 추가 */
}

/* 제품명 */
.product-name {
  /* font-weight: 500; */
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
  word-wrap: break-word;
  line-height: 1.4;
  display: inline-block; /* 추가 */
}

/* 브랜드명 */
.product-brand {
  font-size: 14px;
  /* font-weight: 600; */
  color: #e2e8f0;
  white-space: nowrap;
  word-wrap: break-word;
  line-height: 1.4;
  display: inline-block; /* 추가 */
}

/* .keyword-cell {
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
} */

/* Rank Display */
.rank-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: #cbd5e1;
}

.rank-badge {
  font-size: 14px;
  /* font-weight: 500; */
  color: #cbd5e1;
}

/* ★★★ 요청하신 고정 크기 및 클릭 영역 설정 ★★★ */
.rank-badge[data-keyword] {
  display: inline-flex; /* 내부 컨텐츠(숫자)를 중앙 정렬하기 위해 flex 사용 */
  justify-content: center;
  align-items: center;
  width: 50px; /* 고정 너비 */
  height: 50px; /* 고정 높이 */
  cursor: pointer; /* 클릭 가능한 커서 모양 */
}

.keyword-badge {
  cursor: pointer; /* 클릭 가능한 커서 모양 */
  padding: 20px;
}

/* Loading */
.loading-spinner {
  text-align: center;
  padding: 60px;
  color: #64748b;
  font-size: 16px;
}

/* Responsive */
@media (max-width: 1200px) {
  .container {
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-filters,
  .actions {
    width: 100%;
    justify-content: flex-start;
  }

  .date-inputs {
    flex-wrap: wrap;
  }

  .quick-buttons {
    flex-wrap: wrap;
  }
}

/* Time Filter Buttons */
.time-filter {
  display: flex;
  gap: 6px;
}

.time-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  /* font-weight: 500; */
  transition: all 0.2s;
  white-space: nowrap;
}

.time-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.time-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  /* box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); */
}

/* Device Filter Buttons (디바이스 선택 버튼) */
.device-filter {
  display: flex;
  gap: 6px;
}

.device-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  /* font-weight: 500; */
  transition: all 0.2s;
  white-space: nowrap;
}

.device-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
}

.device-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  /* box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3); */
}

.device-highlight {
  color: #09ff00; /* 선명한 파란색 */
  /* font-weight: 700; */
}

.time-highlight {
  color: #00ffaa; /* 선명한 초록색 */
  /* font-weight: 700; */
}

.sticky-col {
  background: rgb(15, 23, 42) !important; /* 투명도 제거, 불투명 짙은 배경 */
}

.sticky-col-2 {
  background: rgb(15, 23, 42) !important; /* 투명도 제거 */
}

.product-details {
  flex: 1;
  min-width: 0;
}

.favorite-btn {
  background: none;
  border: none;
  font-size: 24px; /* 아이콘 크기 증가 */
  cursor: pointer;
  color: #5d6f8a; /* 비활성 별 색상 */
  padding: 20px 20px; /* 클릭 영역 확보 */
  flex-shrink: 0;
  margin-left: auto;
  line-height: 1;
  transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

.favorite-btn:hover {
  color: #e2e8f0; /* 호버 시 밝은 색상 */
  /* transform: scale(1.05); 호버 시 아이콘 확대 */
}

.favorite-btn.active {
  color: #cca952; /* 활성화 시 노란색 */
  text-shadow: 0 0 8px rgba(251, 253, 219, 0.3); /* 네온 효과 */
}

/* .favorite-btn:active {
  transform: scale(0.95); 클릭 시 아이콘 축소 (눌리는 효과)
  transition-duration: 0.1s;
} */

/* 활성화된 버튼을 클릭할 때의 스타일 */
.favorite-btn.active:active {
  color: #fceb00; /* 더 진한 노란색으로 변경 */
}

/* =============================
   MODAL POPUP + TABLE 최종 정돈본 (폰트·강조·헤더 중앙, 라운딩·색 일반 유지)
   ============================= */

/* --- Overlay --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 41, 59, 0.68);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade-in 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modal-fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* --- Modal Content --- */
.modal-content {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
  border-radius: 16px;
  border: 1px solid rgba(51, 65, 85, 0.55);
  /* box-shadow: 0 8px 38px rgba(30, 41, 59, 0.32); */
  width: 95vw;
  max-width: 1260px;
  min-width: 430px;
  padding: 34px 40px 20px;
  color: #cbd5e1;
  font-size: 14px;
  overflow: hidden;
}

/* --- Modal Header --- */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(51, 65, 85, 0.35);
  padding-bottom: 8px;
  margin-bottom: 20px;
}
.modal-header h3 {
  flex: 1;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 400;
  color: inherit;
  background: none;
}
.close-btn {
  font-size: 1.8rem;
  color: #94a3b8;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.close-btn:hover {
  color: #e2e8f0;
}

/* --- Modal Body --- */
.modal-body {
  max-height: 67vh;
  overflow-y: auto;
  padding-right: 4px;
}
.modal-body::-webkit-scrollbar {
  width: 10px;
}
.modal-body::-webkit-scrollbar-thumb {
  background: #35405b;
  border-radius: 8px;
}
.modal-body::-webkit-scrollbar-track {
  background: #232b3a;
}

/* =============================
   TABLE (라운드 효과 유지, 폰트·강조·헤더 중앙 일관)
   ============================= */
.detail-rank-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(30, 41, 59, 0.6);
  /* font-family: "Inter", "Noto Sans KR", sans-serif; */
  box-shadow: 0 2px 12px rgba(23, 28, 48, 0.1);

  backdrop-filter: blur(10px);
  border-radius: 12px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  overflow-x: auto;
}

/* 폰트 크기·강조 일괄 통일 + 헤더 완전 중앙정렬 */
.detail-rank-table th,
.detail-rank-table td {
  padding: 12px 12px !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  border-bottom: 1px solid #343e56 !important;
  background: transparent;
  text-align: center !important;
  white-space: nowrap;
  vertical-align: middle !important;
}

/* 순위 컬럼: 현재 폭 그대로 유지 */
.detail-rank-table th.rank-col,
.detail-rank-table td.rank-col {
  width: 66px !important; /* 66px 고정 */
  min-width: 66px !important; /* 더 줄어들지 않음 */
  max-width: 66px !important; /* 더 커지지 않음 */
  text-align: center !important;
  padding: 12px 4px !important;
  box-sizing: border-box;
}

.detail-rank-table th.info-col,
.detail-rank-table td.info-col {
  width: auto !important; /* 남은 공간 모두 차지 */
  text-align: left !important; /* 왼쪽 정렬 강제 */
  padding: 12px 16px !important;
  white-space: normal !important; /* 내부 컨텐츠가 자연스럽게 배치되도록 */
  vertical-align: middle !important;
}

/* 1. 헤더(제목)는 중앙 정렬 */
.detail-rank-table th.info-col {
  text-align: center !important;
}

/* 2. 본문(내용)은 왼쪽 정렬 (이게 없으면 공통 설정 때문에 가운데로 가버림) */
.detail-rank-table td.info-col {
  text-align: left !important;
}

/* 가격 컬럼: 콘텐츠 너비에 맞춤 */
.detail-rank-table th.price-col,
.detail-rank-table td.price-col {
  width: auto !important; /* 내용에 맞게 자동 */
  max-width: none !important; /* 제한 해제 */
  font-variant-numeric: tabular-nums;
  text-align: center !important;
}

/* 카테고리 컬럼: 콘텐츠 너비에 맞춤 */
.detail-rank-table th.category-col,
.detail-rank-table td.category-col {
  width: auto !important; /* 내용에 맞게 자동 */
  max-width: none !important;
  text-align: center !important;
}

/* 상품명 컬럼: 나머지 공간 전체 차지 */
.detail-rank-table th.prodname-col,
.detail-rank-table td.prodname-col {
  min-width: 120px !important;
  width: 100% !important; /* 남는 공간 모두 차지 */
  text-align: center !important;
}

/* 광고 row */
.detail-rank-table .my-ad-row {
  background: #2c3448 !important;
  color: #ffd755 !important;
  font-weight: 400 !important;
}

/* 행 hover */
.detail-rank-table tbody tr:hover {
  background: #283b58 !important;
  transition: background 0.16s;
}

/* 이미지 크게, 둥글기 그대로 */
.detail-rank-table td img {
  width: 65px !important;
  height: 65px !important;
  border-radius: 9px;
  object-fit: cover;
  margin-right: 12px;
  background: #282e3a;
  border: 1px solid #212843;
  vertical-align: middle;
}

/* 테이블 둥글게 효과 유지 */
.detail-rank-table thead th:first-child {
  border-top-left-radius: 10px;
}
.detail-rank-table thead th:last-child {
  border-top-right-radius: 10px;
}
.detail-rank-table tr:last-child td {
  border-bottom: 0 !important;
}
.detail-rank-table td:last-child,
.detail-rank-table th:last-child {
  border-right: 0 !important;
}

/* 헤더 sticky 모두 해제 */
.detail-rank-table th {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}

/* 모든 칼럼 크기/굵기/폰트 완전 통레일 */
.detail-rank-table td,
.detail-rank-table th {
  /* font-family: "Noto Sans KR", "Inter", sans-serif !important; */
  font-size: 14px !important;
  font-weight: 400 !important;
  background: transparent;
}

.popup-product-name {
  color: #e2e8f0;
}
.detail-rank-table .my-ad-row td.prodname-col .popup-product-name {
  color: #ffd755 !important;
}

.detail-rank-table th {
  padding: 16px !important;
  background-color: rgb(15, 23, 42) !important;
}

#modalTitle {
  margin-bottom: 14px;
}

.modal-content {
  padding: 40px 34px 34px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-spacer {
  width: 50px; /* 버튼 예상 너비와 동일하게 맞춤 */
  visibility: hidden; /* 공간만 차지, 실제로는 안 보임 */
}

.close-btn {
  width: 50px; /* 명확히 고정폭 설정 */
  padding-top: 3px;
  cursor: pointer;
}

#modalTitle {
  flex: 1;
  text-align: center; /* 확실한 중앙 정렬 */
  margin: 0;
}

/* ✨ (추가) header의 좌/우 영역 스타일 */
.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 20px; /* 기존 header의 gap 값을 여기에 적용 */
}

/* ✨ (추가) 네이버쇼핑/파워링크 버튼 그룹 스타일 */
.search-type-filter {
  display: flex;
  gap: 6px;
}

/* ✨ (추가) 네이버쇼핑/파워링크 버튼 개별 스타일 */
.search-type-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  /* font-weight: 500; */
  transition: all 0.2s;
  white-space: nowrap;
}

.search-type-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
}

/* 활성화된 버튼에는 주황색 계열 그라데이션 적용 */
.search-type-btn.active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: transparent;
  /* box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3); */
}

/* =========================================
   우측 고정 리모콘 (스크롤 반응형)
   ========================================= */

/* =========================================
   우측 고정 리모콘 (수정본)
   ========================================= */
.floating-remote {
  position: fixed;
  top: 50%;
  right: 24px;

  /* 기본 상태 */
  transform: translateY(-40%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  /* 디자인 */
  background: rgba(30, 41, 59, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(51, 65, 85, 0.6);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 14px;
  width: 100px;
  z-index: 100;

  /* ✨ [수정 1] all 대신 변경되는 속성만 콕 집어서 지정 */
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;

  /* ✨ [수정 2] 브라우저 최적화 (GPU 가속 유도) */
  will-change: opacity, transform;

  /* ✨ [수정 3] 렌더링 보정 (선택사항: 글자 흔들림 방지) */
  -webkit-font-smoothing: antialiased;
}

/* 나타날 때 스타일 */
.floating-remote.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%);
}

/* ... (이하 .remote-group 등 내부 스타일은 기존 코드 유지) ... */
.remote-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.remote-label {
  color: #94a3b8;
  font-size: 11px;
  /* font-weight: 700; */
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.remote-divider {
  height: 1px;
  background: rgba(51, 65, 85, 0.5);
  width: 100%;
}

.floating-btn {
  width: 100%;
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  padding: 10px 0;
  border-radius: 8px;
  cursor: pointer;
  /* font-size: 13px; */
  /* font-weight: 500; */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.floating-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  /* transform: translateY(-2px); */
  /* box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2); */
}

.floating-btn.active {
  /* 채도를 살짝 낮춘 깊은 블루 그라데이션 */
  background: linear-gradient(135deg, #0f172a 100%, #1e293b 100%);

  /* 테두리를 살짝 밝게 주어 경계를 명확히 함 */
  border: 1px solid #475569;

  color: #e2e8f0;
  /* .floating-btn.active 안에 적용 */
  /* box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4); */
  /* box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); */
}

@media (max-width: 1400px) {
  .floating-remote {
    display: none !important; /* 화면 작으면 아예 숨김 */
  }
}

//* =========================================
파워링크 소재 정보 스타일 (정렬 및 간격 완벽 수정)
   ========================================= */

/* 1. 컨텐츠 박스 레이아웃 */
.info__box.content {
  flex: 1;
  width: 100%;
  min-width: 0;

  display: flex;
  flex-direction: column;

  /* ▼▼▼ [수정] 고르게 분포시키기 ▼▼▼ */
  justify-content: space-evenly; /* 요소들 사이와 양 끝에 균등한 여백을 줌 */
  /* 또는 justify-content: space-between; (양 끝에 딱 붙이고 사이만 벌림) */

  align-items: flex-start !important;
  text-align: left !important;
  margin-left: 0 !important;

  /* gap은 제거하거나 줄여서 space-evenly가 작동할 공간 확보 */
  gap: 0;

  /* 높이가 충분해야 분포가 됨 */
  height: 100%; /* 부모 높이를 꽉 채움 */
  min-height: 80px; /* 최소 높이 보장 */

  padding-right: 12px;
}

/* 2. 내부 요소들의 불규칙한 마진 모두 제거 (gap으로만 간격 조절) */
.info__box .display-url,
.info__box .lnk_url,
.info__box .title,
.info__box .description {
  margin: 0 !important; /* 위아래 제각각인 여백 강제 제거 */
  padding: 0;
  line-height: 1.6; /* 줄 높이 통일하여 시각적 균형 맞춤 */
}

/* --- 개별 폰트 스타일 설정 --- */

/* (1) URL 링크 (맨 위) */
.info__box .display-url {
  text-decoration: none;
  display: block; /* 블록으로 잡아서 높이 확보 */
}

.info__box .lnk_url {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* (2) 제목 (중간) */
.info__box .title {
  display: block;
}

.info__box .title a {
  font-size: 16px;
  color: #e2e8f0;
  text-decoration: none;
  /* font-weight: 700;  */
  /* 제목이 너무 길면 한 줄 말줄임 (선택사항) */
  /*
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  */
}

/* (3) 설명글 (아래) */
.info__box .description {
  font-size: 14px; /* 제목과 구분되도록 살짝 작게 */
  color: #94a3b8;

  /* 설명글 한 줄 말줄임 처리 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* 호버 인터랙션 */
.info__box .display-url:hover .lnk_url,
.info__box .title a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* 내 광고 행(.my-ad-row) 내부의 모든 링크와 텍스트 색상을 노란색으로 변경 */
.detail-rank-table .my-ad-row .info__box .title a,
.detail-rank-table .my-ad-row .info__box .lnk_url,
.detail-rank-table .my-ad-row .info__box .description {
  color: #ffd755 !important;
}

table tbody tr:last-child td {
  border-bottom: 0px solid rgba(51, 65, 85, 0.5) !important;
}
