﻿@charset "UTF-8";

/* ==========================================================================
   글로벌 및 기본 스타일
   ========================================================================== */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* 모바일에서 가로 스크롤 방지 위해 body에만 적용, html에서는 제거 고려 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
  color: #ffffff;
  font-size: 16px;
}

/* 오버레이 활성 시 body 스크롤 방지 */
body.overlay-active {
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

/* 스크롤바 기본 스타일 (숨김 처리) */
body,
#left-sidebar,
#main-content,
#right-sidebar #queue-list,
#search-results-area .album-tracklist {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
body::-webkit-scrollbar,
#left-sidebar::-webkit-scrollbar,
#main-content::-webkit-scrollbar,
#right-sidebar #queue-list::-webkit-scrollbar,
#search-results-area .album-tracklist::-webkit-scrollbar {
  display: none;
}

/* 기본 버튼 스타일 초기화 (필요시) */
button,
input[type="range"] {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: inherit;
  vertical-align: middle;
}
input[type="range"] {
  cursor: pointer;
}
input[type="text"] {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ==========================================================================
   레이아웃
   ========================================================================== */

#app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#app-body {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
}

#left-sidebar {
  flex: 0 0 18.5%;
  max-width: 280px;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.02);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  padding: 1rem 1rem calc(1rem + 90px) 1rem; /* 플레이어 바 높이만큼 하단 패딩 추가 */
  overflow-y: auto;
}

#left-sidebar .sidebar-logo {
  display: flex;
  align-items: center;
  padding: 0.75rem 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e0e0e0;
}

#left-sidebar .sidebar-logo i.fa-headphones {
  margin-right: 0.6rem;
  font-size: 1.3rem;
  color: #7e8eff;
  line-height: 1;
}

#left-sidebar .sidebar-logo span {
  line-height: 1;
}

#app-container {
  display: flex;
  flex-grow: 1;
  overflow: hidden; /* 내부 콘텐츠 스크롤은 #main-content에서 담당 */
}

#main-content {
  flex-grow: 1;
  overflow-y: auto;
  position: relative; /* sticky 헤더 등을 위해 */
  padding-bottom: 100px; /* 플레이어 바 높이(약 90px)보다 넉넉하게 */
}

#right-sidebar {
  flex: 0 0 22.2%;
  max-width: 400px;
  min-width: 300px;
  background-color: #040404;
  padding: 1rem 0;
  border-left: 1px solid #282828;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow: hidden; /* 내부 스크롤은 #queue-list에서 담당 */
}

#right-sidebar #youtube-player-right-wrapper {
  width: calc(100% - 2rem); /* 양쪽 패딩 1rem씩 제외 */
  padding-top: 56.25%; /* 16:9 비율 */
  position: relative;
  background-color: #000;
  margin: 0 1rem 1rem 1rem;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0; /* 내용이 많아도 줄어들지 않도록 */
}
#right-sidebar #youtube-player-right,
#right-sidebar #youtube-player-right-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

#right-sidebar #queue-list {
  list-style: none;
  flex-grow: 1; /* 남은 공간 모두 차지 */
  overflow-y: auto; /* 내용 많으면 스크롤 */
  margin: 0;
  padding: 0 1rem; /* 좌우 패딩 */
  padding-bottom: 100px; /* 하단 여백 (플레이어 바 등 고려) */
  min-height: 0; /* flex 아이템이 내용보다 작아질 수 있도록 */
}

#right-sidebar #queue-list li {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
#right-sidebar #queue-list li:hover {
  background-color: rgba(255, 255, 255, 0.08);
}
#right-sidebar #queue-list li.playing {
  background-color: rgba(102, 126, 234, 0.2);
}
#right-sidebar #queue-list li img {
  width: 35px;
  height: 35px;
  object-fit: cover;
  border-radius: 3px;
  margin-right: 0.8rem;
  flex-shrink: 0;
}
#right-sidebar #queue-list li .queue-track-info {
  overflow: hidden;
  white-space: nowrap;
}
#right-sidebar #queue-list li .queue-track-title {
  font-size: 0.9rem;
  font-weight: 500;
  text-overflow: ellipsis;
  overflow: hidden;
  display: block;
}
#right-sidebar #queue-list li .queue-track-artist {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  text-overflow: ellipsis;
  overflow: hidden;
  display: block;
}
#right-sidebar #queue-list li.empty-queue {
  color: #666;
  text-align: center;
  padding: 2rem 0;
  cursor: default;
}
#right-sidebar #queue-list li.empty-queue:hover {
  background: none;
}

#player-bar {
  height: 90px;
  background: rgba(0, 0, 0, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1001; /* 다른 요소들 위에 오도록 */
}

/* ==========================================================================
   상단 네비게이션 바 및 사용자 정보
   ========================================================================== */

#main-content .content-navigation-wrapper {
  padding: 0.5rem 1.5rem;
  position: sticky;
  top: 0px;
  z-index: 100; /* 이전 section.css의 z-index:100과 통일, 검색결과보다 위에 오도록 */
  margin-bottom: 0; /* section.css와 통일 */
  background: transparent; /* 기본 투명 */
  border-bottom: 1px solid transparent; /* 기본 투명 테두리 */
  transition: background-color 0.3s ease-out, border-color 0.3s ease-out, backdrop-filter 0.3s ease-out; /* backdrop-filter 추가 */
}

#main-content .content-navigation-wrapper.scrolled {
  background: rgba(15, 15, 35, 0.85); /* 스크롤 시 배경 */
  -webkit-backdrop-filter: blur(8px); /* 블러 효과 */
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* 스크롤 시 테두리 */
}

#main-content .content-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0; /* section.css와 통일 */
  min-height: 40px; /* section.css와 통일 */
}

#main-content .content-navigation .navigation-buttons {
  display: flex;
  gap: 0.8rem;
}

/* 모바일 헤더 로고 (HTML 인라인 스타일 제거 후 CSS로 제어) */
#mobile-header-logo {
  text-decoration: none;
  color: #ffffff;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  display: none; /* 기본 숨김 (모바일에서 보이도록 미디어쿼리에서 제어) */
}
.mobile-header-logo-icon {
  color: #7e8eff;
}
.mobile-header-logo-text {
  background: linear-gradient(135deg, #a68fff, #fdd835);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-right {
  flex-shrink: 0; /* 내용이 많아도 줄어들지 않도록 */
  margin-left: auto; /* 오른쪽 정렬 */
}

/* 사용자 메뉴 드롭다운은 JS로 제어되므로, 기본 숨김 처리된 ul 스타일은 유지 */
.header-right ul {
  display: none !important; /* Rhymix 기본 동작 유지 */
}

/* ==========================================================================
   컴포넌트 스타일
   ========================================================================== */

/* 섹션 제목 공통 스타일 (HTML 인라인 스타일 제거 후 CSS로 제어) */
.section-title-white {
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #ffffff;
}
.section-title-spacing {
  /* Charts 제목 같이 추가적인 상단 마진이 필요한 경우 */
  margin-top: 3rem;
}

#ai-search-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.5rem 3rem 1.5rem;
  text-align: center;
}

.ai-search-title {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  color: transparent;
}
.ai-search-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 300;
  margin-bottom: 40px;
  max-width: none;
} /* max-width: 600px; 제거 */
#ai-search-section .page-search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 8px 8px 8px 16px;
  margin: 0 auto 24px;
  transition: all 0.3s ease;
}
#ai-search-section .page-search-form:focus-within {
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}
#ai-search-section .page-search-form .search-icon-ai {
  color: #667eea;
  font-size: 20px;
  margin-right: 12px;
  flex-shrink: 0;
}
#ai-search-section .page-search-form .page-search-input {
  flex-grow: 1;
  padding: 12px 0;
  border: none;
  background-color: transparent;
  color: #ffffff;
  font-size: 16px;
  outline: none;
}
#ai-search-section .page-search-form .page-search-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}
#ai-search-section .page-search-form .page-search-button-ai {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 8px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
#ai-search-section .page-search-form .page-search-button-ai:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
  background: linear-gradient(135deg, #768eea 0%, #865bb2 100%);
}
#ai-search-section .page-search-form .page-search-button-ai i {
  font-size: 16px;
}

/* 칩 버튼 공통 스타일 */
.chip-button {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}
.chip-button:hover {
  background-color: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
  color: #ffffff;
}
/* 개별 칩 버튼 스타일 (공통 스타일에서 제외된 부분만 남기거나, 필요한 경우 추가) */
.example-queries {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
/* .example-query-btn 스타일은 .chip-button으로 대체되었으므로, 특별한 추가 스타일이 없다면 제거 가능 */

.icon-button,
#main-content .content-navigation .nav-btn {
  background-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.icon-button:hover,
#main-content .content-navigation .nav-btn:hover:not(:disabled) {
  background-color: rgba(102, 126, 234, 0.2);
  color: white;
  border-color: #667eea;
}
#main-content .content-navigation .nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
}

#left-sidebar ul.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
#left-sidebar ul.sidebar-nav li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 12px 8px;
  margin-bottom: 4px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
}
#left-sidebar ul.sidebar-nav li a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}
#left-sidebar ul.sidebar-nav li a.active {
  color: #ffffff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
#left-sidebar ul.sidebar-nav li a i.fa-fw {
  margin-right: 12px;
  font-size: 1.1rem;
  width: 16px;
  text-align: center;
}
#left-sidebar ul.sidebar-nav li a span {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-section-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 1rem 0.5rem;
}
.sidebar-section-title {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-bottom: 12px;
  padding: 0 8px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}
.sidebar-section-title i {
  margin-right: 12px;
  font-size: 1.5em;
  vertical-align: -1px;
} /* section.css 에서 이동 */

#search-results-area {
  padding: 0 1.5rem calc(1.5rem + 90px) 1.5rem;
} /* 플레이어 바 높이 고려 */
#search-results-area .initial-message,
#search-results-area .error-message,
#search-results-area .no-results-message {
  text-align: center;
  padding: 3rem 0;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
}

#search-results-area .loading-spinner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.6);
  /* background-color: transparent; 오류 수정 -> 원래 없었음 */
}
#search-results-area .loading-spinner i {
  margin: 0 0 1rem 0;
  animation: spin 1.5s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

#search-results-area .search-results-container {
  padding: 0;
}
#search-results-area .search-results-container section {
  margin-bottom: 2.5rem;
}
#search-results-area .search-results-container section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffffff;
}
#search-results-area .exact-title-match-section h3 {
  font-size: 0.9rem;
  font-weight: 400;
}

#search-results-area .artist-highlight-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  background-color: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s, border-color 0.2s;
  cursor: default;
}

#search-results-area .artist-highlight-card:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

#search-results-area .card-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}

#search-results-area .artist-thumbnail-wrapper {
  flex-shrink: 0;
}
#search-results-area .artist-thumbnail {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 이미지 없을 때 배경 */
}
#search-results-area .artist-info {
  flex-grow: 1;
}
#search-results-area .artist-name {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.3rem 0;
}
#search-results-area .artist-category {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

#search-results-area .card-bottom {
  display: flex;
  gap: 0.8rem;
  align-self: flex-start; /* 위쪽 정렬 유지 */
}

#search-results-area .card-bottom .btn {
  flex-grow: 1; /* 버튼들이 공간을 채우도록 */
  flex-basis: 0; /* 버튼 너비 동일하게 */
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
}
.btn i {
  margin-right: 0.5rem;
  font-size: 0.9em;
}
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}
.btn-primary:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}
.btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.all-tracks-list,
.album-tracklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.all-tracks-list li,
.album-tracklist li {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: default; /* 기본적으로는 default, 재생 가능하면 pointer */
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.all-tracks-list li:hover,
.album-tracklist li:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
.track-start-section {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 16px;
  position: relative;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
}
.album-tracklist .track-start-section {
  margin-right: 1rem;
  background: transparent;
} /* 앨범 트랙리스트는 다른 배경 */
.track-number {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  text-align: center;
  width: 100%;
  transition: opacity 0.2s ease;
  text-decoration: none !important;
  user-select: none;
}
.track-play-button {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  padding: 0.4rem;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.all-tracks-list li:hover .track-start-section .track-number,
.album-tracklist li:hover .track-start-section .track-number {
  opacity: 0;
}
.all-tracks-list li:hover .track-start-section .track-play-button,
.album-tracklist li:hover .track-start-section .track-play-button {
  opacity: 1;
}
.equalizer-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 16px;
  display: none;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 1;
}
.equalizer-indicator .eq-bar {
  width: 3px;
  height: 100%;
  background-color: #667eea;
  transform-origin: bottom;
  transform: scaleY(0.1);
}
li:not(.playing):hover .track-start-section .track-number {
  opacity: 0;
}
li:not(.playing):hover .track-start-section .track-play-button {
  opacity: 1;
}
li.playing {
  background-color: rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}
li.playing .track-start-section .track-number {
  opacity: 0;
}
li.playing .track-start-section .track-play-button {
  display: none;
}
li.playing .track-start-section .equalizer-indicator {
  display: flex;
}
li.playing .equalizer-indicator .eq-bar {
  animation: eq-play 1.2s infinite ease-in-out;
  background-color: #667eea;
} /* section.css에서 이동 */
li.playing .track-title {
  color: #667eea;
}
@keyframes eq-play {
  0% {
    transform: scaleY(0.1);
  }
  20% {
    transform: scaleY(0.8);
  }
  40% {
    transform: scaleY(0.3);
  }
  60% {
    transform: scaleY(1);
  }
  80% {
    transform: scaleY(0.5);
  }
  100% {
    transform: scaleY(0.1);
  }
} /* section.css에서 이동 */
li.playing .equalizer-indicator .eq-bar:nth-child(1) {
  animation-delay: -1.1s;
} /* section.css에서 이동 */
li.playing .equalizer-indicator .eq-bar:nth-child(2) {
  animation-delay: -0.9s;
} /* section.css에서 이동 */
li.playing .equalizer-indicator .eq-bar:nth-child(3) {
  animation-delay: -0.7s;
} /* section.css에서 이동 */
li.playing .equalizer-indicator .eq-bar:nth-child(4) {
  animation-delay: -0.5s;
} /* section.css에서 이동 */
.track-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 16px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 이미지 없을 때 배경 */
}
.track-details {
  flex-grow: 1;
  overflow: hidden;
  margin-right: 1rem;
}
.track-title {
  display: block;
  font-weight: 500;
  color: white;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.track-artist-album {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-duration {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 1rem;
  text-align: right;
  min-width: 40px;
}
.track-play-button[disabled] {
  color: rgba(255, 255, 255, 0.2) !important;
  cursor: not-allowed;
  opacity: 0.5 !important;
} /* !important 유지 (JS로 제어될 수 있으므로) */
li:has(.track-play-button[disabled]) {
  opacity: 0.6;
  cursor: default;
  background-color: transparent !important;
} /* !important 유지 */
.btn-show-more-artist-songs,
.btn-collapse-artist-songs {
  display: block;
  margin: 1rem 0 0 auto;
  width: fit-content;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.btn-show-more-artist-songs:hover,
.btn-collapse-artist-songs:hover {
  color: white;
  background-color: rgba(102, 126, 234, 0.2);
  border-color: #667eea;
}
.btn-show-more-artist-songs.hidden,
.btn-collapse-artist-songs.hidden {
  display: none;
}
#search-results-area .album-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
#search-results-area .album-list-item {
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background-color: rgba(255, 255, 255, 0.03);
}
#search-results-area .album-list-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  position: relative;
  background-color: rgba(255, 255, 255, 0.05);
  cursor: default;
}
#search-results-area .album-card-top {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
}
#search-results-area .album-list-thumbnail {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 이미지 없을 때 배경 */
}
#search-results-area .album-list-details {
  flex-grow: 1;
  min-width: 0; /* flex 아이템 내용 넘칠 때 대비 */
}
#search-results-area .album-list-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
#search-results-area .album-list-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
}
#search-results-area .album-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
}
#search-results-area .no-tracks-info {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.8rem;
  width: 100%;
}
#search-results-area .btn-toggle-album-tracks {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 20px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
#search-results-area .btn-toggle-album-tracks:hover {
  background-color: rgba(255, 255, 255, 0.2);
}
#search-results-area .btn-toggle-album-tracks .toggle-icon {
  transition: transform 0.2s ease;
  margin-left: 0.2rem;
}
#search-results-area .btn-toggle-album-tracks[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

#search-results-area .album-tracklist {
  list-style: none;
  padding: 0.5rem;
  margin: 0;
  background-color: rgba(0, 0, 0, 0.1);
  transition: opacity 0.3s ease-out, visibility 0.3s ease-out, padding 0.3s ease-out, border-top 0s linear 0.3s, height
    0.3s ease-out; /* height 추가 */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  opacity: 1;
  visibility: visible;
  height: auto; /* 기본 높이 auto */
}
#search-results-area .album-tracklist.collapsed {
  padding-top: 0; /* 부드러운 효과 위해 */
  padding-bottom: 0; /* 부드러운 효과 위해 */
  overflow: hidden;
  border-top: none;
  opacity: 0;
  visibility: hidden;
  height: 0;
  transition: opacity 0.3s ease-out, visibility 0s linear 0.3s, height 0.3s ease-out, padding 0.3s ease-out, border-top
    0s linear 0.3s;
}
#search-results-area .album-tracklist li {
  border-radius: 8px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  background: transparent;
  padding-left: 1rem;
  padding-right: 1rem;
}
#search-results-area .album-tracklist li:last-child {
  margin-bottom: 0;
}
#search-results-area .album-tracklist li.playing {
  border: 1px solid #667eea;
  background-color: rgba(102, 126, 234, 0.1) !important; /* JS에서 직접 스타일링 할 수 있으므로 important 유지 고려 */
}
#search-results-area .album-tracklist .track-title {
  font-weight: 400;
}

#player-bar #player-left {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 180px;
  overflow: hidden;
  gap: 16px;
}
#player-bar .player-thumbnail {
  width: 56px;
  height: 56px;
  margin-right: 0;
  border-radius: 8px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 이미지 없을 때 배경 */
}
#player-bar .track-text {
  overflow: hidden;
  margin-right: 0; /* gap으로 대체 */
}
#player-bar .player-track-title {
  font-size: 14px;
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#player-bar .player-track-artist {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#player-bar #like-button {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  padding: 8px;
  transition: color 0.2s ease;
  flex-shrink: 0;
}
#player-bar #like-button:hover {
  color: #ff6b6b;
}
#player-bar #like-button.active {
  color: #ff6b6b;
}
#player-bar #player-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 600px;
  padding: 0 1rem;
  gap: 8px;
}

#player-bar .player-ctrl-btn {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  padding: 8px;
  transition: all 0.2s ease;
  line-height: 1;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#player-bar .player-ctrl-btn:hover:not(#play-pause-button) {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

#player-bar #center-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}
#player-bar #center-controls .player-ctrl-btn.active {
  color: #667eea;
}
/* #player-bar #center-controls #center-controls 중복 제거 */
#player-bar #center-controls .player-ctrl-btn#repeat-button.active-one {
  position: relative;
  overflow: visible;
}
#player-bar #center-controls .player-ctrl-btn#repeat-button.active-one::after,
#player-bar #center-controls .player-ctrl-btn#repeat-button.active-all::after {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  color: #ffffff;
  font-weight: bold;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.8);
  position: absolute;
  z-index: 10;
  pointer-events: none;
}
#player-bar #center-controls .player-ctrl-btn#repeat-button.active-one::after {
  content: "1";
  font-size: 0.7em;
  top: -2px;
  right: 2px;
}
#player-bar #center-controls .player-ctrl-btn#repeat-button.active-all::after {
  content: "ALL";
  font-size: 0.5em;
  letter-spacing: 0px;
  top: 0px;
  right: 0px;
}
#player-bar #center-controls .player-ctrl-btn#repeat-button.active-all {
  position: relative;
  overflow: visible;
}

#player-bar #center-controls #play-pause-button {
  width: 40px;
  height: 40px;
  background-color: #ffffff;
  color: #000000;
  border-radius: 50%;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: all 0.2s ease;
}
#player-bar #center-controls #play-pause-button:hover {
  background-color: #f0f0f0;
  transform: scale(1.05);
}
#player-bar #center-progress {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
}
#player-bar #center-progress span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  min-width: 32px;
  text-align: center;
  user-select: none;
}
#player-bar input[type="range"]#progress-bar {
  flex-grow: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(
    to right,
    #667eea var(--progress-percent, 0%),
    rgba(255, 255, 255, 0.2) var(--progress-percent, 0%)
  );
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: background 0.1s ease;
}
#player-bar input[type="range"]#progress-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
  opacity: 1;
  margin-top: -4px; /* thumb 위치 조정 */
}
#player-bar input[type="range"]#progress-bar::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease;
  opacity: 1;
}
#player-bar input[type="range"]#progress-bar:hover::-webkit-slider-thumb,
#player-bar input[type="range"]#progress-bar:active::-webkit-slider-thumb {
  background: #667eea;
}
#player-bar input[type="range"]#progress-bar:hover::-moz-range-thumb,
#player-bar input[type="range"]#progress-bar:active::-moz-range-thumb {
  background: #667eea;
}
/* #player-bar #progress-bar { position: relative; } 불필요 */
#player-bar #player-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 180px;
  gap: 8px;
}

/* 이퀄라이저 아이콘 스타일 (section.css에서 이동 및 통합) */
#player-bar #equalizer-button {
  display: none; /* JS로 제어 */
  position: relative; /* pulse 애니메이션 기준점 */
  align-items: center;
  justify-content: center;
  /* width: 32px; height: 32px; player-ctrl-btn 에서 이미 정의 */
}
#player-bar #equalizer-button.blinking-eq {
  animation: pulse-green 2s infinite;
  cursor: pointer;
}
#player-bar #equalizer-button.is-on {
  cursor: default;
  animation: none;
}
.custom-eq-icon {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 18px;
  height: 18px;
}
.eq-bar-custom {
  width: 2px;
  height: 100%;
  background-color: #555;
  border-radius: 1px;
  position: relative;
}
.eq-slider-custom {
  width: 6px;
  height: 6px;
  background-color: #999;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.2s ease;
}
.eq-bar-custom:nth-child(1) .eq-slider-custom {
  top: calc(75% - 2px);
}
.eq-bar-custom:nth-child(2) .eq-slider-custom {
  top: calc(25% + 2px);
}
#player-bar #equalizer-button.blinking-eq .eq-slider-custom,
#player-bar #equalizer-button.is-on .eq-slider-custom {
  background-color: #4ade80;
}
@keyframes pulse-green {
  /* section.css에서 이동 */
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(74, 222, 128, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
  }
}

#player-bar #volume-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
#player-bar #volume-button {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  padding: 8px;
} /* player-ctrl-btn에서 상속받으므로 중복 제거 가능 */
#player-bar #volume-button:hover {
  color: white;
}
#player-bar #volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
#player-bar #volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0; /* 기본 숨김, 호버 시 보이도록 */
}
#player-bar #volume-slider:hover::-webkit-slider-thumb {
  opacity: 1;
  background: #667eea;
}
#player-bar #queue-toggle-button {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  padding: 8px;
  margin-left: 0; /* player-ctrl-btn에서 상속 */
}
#player-bar #queue-toggle-button:hover {
  color: white;
}
#player-bar #queue-toggle-button.active {
  color: #667eea;
}
#player-bar.loading .player-thumbnail {
  opacity: 0.6;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}
#youtube-player-wrapper {
  position: absolute;
  top: -1000px;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
} /* 화면 밖에 숨겨진 유튜브 플레이어 */

/* 검색 결과 - 아티스트/앨범 외 다른 콘텐츠 유형 (예: 플레이리스트, 비디오 등) */
#search-results-area .view-content-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
#search-results-area .view-content-list li {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
#search-results-area .view-content-list li:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}
#search-results-area .view-content-list li img.view-item-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 16px;
  flex-shrink: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); /* 이미지 없을 때 배경 */
}
#search-results-area .view-content-list li .view-item-details {
  flex-grow: 1;
  overflow: hidden;
  margin-right: 1rem;
}
#search-results-area .view-content-list li .view-item-title {
  display: block;
  font-weight: 500;
  color: white;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
#search-results-area .view-content-list li .view-item-artist {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#search-results-area .view-content-list li .play-view-item-button {
  color: rgba(255, 255, 255, 0.6);
  font-size: 1rem;
  line-height: 1;
  padding: 0.4rem;
  margin-left: auto;
  flex-shrink: 0;
  transition: color 0.2s ease;
  opacity: 0;
}
#search-results-area .view-content-list li:hover .play-view-item-button,
#search-results-area .view-content-list li.playing .play-view-item-button {
  opacity: 1;
}
#search-results-area .view-content-list li .play-view-item-button:hover {
  color: #ffffff;
}
#search-results-area .view-content-list li.playing .view-item-title {
  color: #667eea;
}
#search-results-area .view-content-list li.playing .play-view-item-button {
  color: #667eea;
}

/* 셔플 버튼 활성 상태 */
#search-results-area .artist-actions .btn-shuffle-all-artist-tracks.active-shuffle,
#search-results-area .album-list-actions .btn-shuffle-artist-album.active-shuffle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
}
#search-results-area .artist-actions .btn-shuffle-all-artist-tracks.active-shuffle i,
#search-results-area .album-list-actions .btn-shuffle-artist-album.active-shuffle i {
  color: white;
}

/* 페이지 로드 시 콘텐츠 섹션 기본 숨김 (번쩍임 방지) - JS로 제어하므로 유지 */
#content-container > section {
  display: none;
}

/* HTML에서 옮겨온 스타일 */
.empty-library-placeholder {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 3rem;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 1.5rem; /* Your Songs 섹션의 경우 */
}
.empty-library-icon {
  font-size: 4rem;
  color: #667eea;
  margin-bottom: 1rem;
}
.empty-library-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #ffffff;
}
.empty-library-text {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}
.empty-library-message {
  /* Your Songs, Your Artists 에서 사용 */
  text-align: center;
  padding: 20px;
  color: #888;
  margin-top: 1.5rem; /* Your Songs 목록이 없을 때 */
}
#your-songs-section .all-tracks-list,
#your-artists-section .all-tracks-list {
  /* Your Songs/Artists 목록 기본 스타일 */
  list-style: none;
  padding: 0;
  margin-top: 1.5rem;
}
#your-songs-section .all-tracks-list:empty + #no-your-songs-message,
#your-artists-section .all-tracks-list:empty + #no-your-artists-message {
  display: block; /* 목록이 비었을 때 메시지 표시 (JS 로직과 연동 필요) */
}
#your-songs-section .song-actions,
#your-artists-section .song-actions {
  /* Your Songs/Artists 삭제 버튼 영역 */
  margin-left: auto;
  padding-left: 10px;
  flex-shrink: 0;
}

/* ==========================================================================
   모바일 하단 네비게이션
   ========================================================================== */
#mobile-bottom-nav {
  display: none; /* PC에서는 숨김 */
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #0c0c1a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1002; /* 플레이어 바보다 위에 오도록 */
  justify-content: space-around;
  align-items: stretch; /* 내부 아이템들이 높이를 꽉 채우도록 */
}

#mobile-bottom-nav .nav-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  transition: color 0.2s ease;
  gap: 4px;
  -webkit-tap-highlight-color: transparent; /* 모바일 클릭 시 파란 배경 제거 */
  background: none; /* 버튼 기본 스타일 제거 */
  border: none; /* 버튼 기본 스타일 제거 */
  padding: 5px 0; /* 내부 여백 */
  cursor: pointer;
}

#mobile-bottom-nav .nav-item:hover,
#mobile-bottom-nav .nav-item.active {
  color: #ffffff;
}

#mobile-bottom-nav .nav-item i {
  font-size: 20px;
  line-height: 1; /* 아이콘 정렬 */
}

/* ==========================================================================
   반응형 스타일
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  /* 태블릿 가로 모드 등 */
  #right-sidebar {
    display: none;
  }
  #player-bar #player-left {
    min-width: 0;
    margin-right: 1rem;
  } /* 태블릿에서 왼쪽 플레이어 영역 축소 */
  #left-sidebar {
    flex: 0 0 240px; /* 태블릿에서 사이드바 너비 약간 증가 */
  }
}

@media (max-width: 768px) {
  /* 모바일 및 태블릿 세로 모드 */
  html,
  body {
    overflow-x: hidden;
  } /* 가로 스크롤 확실히 방지 */

  #left-sidebar {
    display: none;
  } /* 모바일에서 왼쪽 사이드바 숨김 */
  #app-body {
    padding-bottom: 1px;
  } /* 1px은 왜 있는지 확인 필요, 보통 불필요 */
  #app-container {
    width: 100%;
    margin-left: 0;
  } /* 왼쪽 사이드바 없으므로 margin 제거 */

  #mobile-bottom-nav {
    display: flex;
  } /* 모바일 하단 네비게이션 표시 */

  #mobile-header-logo {
    display: flex !important; /* 모바일에서 헤더 로고 표시 (!important 유지 또는 CSS 구체성으로 해결) */
  }

  #player-bar {
    height: 80px;
    padding: 0 16px;
    justify-content: space-between;
    gap: 16px;
    bottom: 60px; /* 모바일 하단 네비게이션 바 위로 */
  }
  #player-bar #player-left {
    display: flex !important;
    flex: 0 0 auto;
    min-width: auto;
  } /* !important 유지 (JS 제어 가능성) */
  #player-bar #player-left .player-thumbnail,
  #player-bar #player-left .track-text {
    display: none;
  } /* 모바일에서 앨범아트와 트랙정보 숨김 */
  #player-bar #player-center {
    flex: 1 1 auto;
    padding: 0;
    max-width: none;
    justify-content: center;
  }
  #player-bar #center-controls {
    gap: 1rem;
  }
  #player-bar #center-controls #play-pause-button {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  #player-bar #center-progress {
    display: none;
  } /* 모바일에서 진행바 숨김 */
  #player-bar #player-right {
    display: flex !important;
    flex: 0 0 auto;
    min-width: auto;
  } /* !important 유지 */
  #player-bar #player-right #volume-controls,
  #player-bar #player-right #equalizer-button {
    display: none !important;
  } /* !important 유지 */
  #player-bar #player-right #queue-toggle-button {
    display: flex !important;
  } /* !important 유지 */

  #main-content {
    margin-left: 0;
    padding: 0 10px 150px 10px;
  } /* 하단 패딩은 플레이어바+모바일네비 높이 고려 */
  #main-content .content-navigation-wrapper {
    padding: 0.8rem 1rem;
  }

  #search-results-area {
    padding: 0 1rem calc(1rem + 140px) 1rem;
  } /* 하단 패딩 조정 */
  #search-results-area .artist-highlight-card {
    padding: 1.25rem;
  }
  #search-results-area .artist-highlight-card .card-top {
    align-items: center;
    gap: 1rem;
  }
  #search-results-area .artist-highlight-card .artist-thumbnail {
    width: 80px;
    height: 80px;
  }
  #search-results-area .artist-highlight-card .artist-name {
    font-size: 1.2rem;
  }
  #search-results-area .artist-highlight-card .card-bottom {
    gap: 0.5rem;
  }
  #search-results-area .artist-highlight-card .btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }

  #search-results-area .album-list-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.8rem;
  }
  #search-results-area .album-card-top {
    gap: 1rem;
  }
  #search-results-area .album-list-thumbnail {
    width: 60px;
    height: 60px;
  }
  #search-results-area .album-list-title {
    font-size: 0.9rem;
    white-space: normal;
  } /* 제목 여러 줄 표시 가능하도록 */
  #search-results-area .album-list-actions {
    flex-wrap: wrap;
  }
  #search-results-area .album-list-actions .btn,
  #search-results-area .btn-toggle-album-tracks {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  #right-sidebar {
    /* 모바일에서 오른쪽 사이드바는 전체 화면처럼 동작 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100% - 140px); /* 플레이어바 + 모바일네비 제외한 높이 */
    z-index: 2000;
    background-color: #0f0f23;
    border-left: none;
    padding-top: 1rem;
  }

  #ai-search-section {
    padding: 1rem 1rem 2rem 1rem;
  }
  .ai-search-title {
    font-size: 28px;
  }
  .ai-search-subtitle {
    font-size: 16px;
    margin-bottom: 24px;
  }
  #ai-search-section .page-search-form {
    max-width: 100%;
    padding: 6px 6px 6px 12px;
  }
  #ai-search-section .page-search-form .page-search-input {
    font-size: 14px;
    padding: 10px 0;
  }
  #ai-search-section .page-search-form .search-icon-ai {
    font-size: 18px;
    margin-right: 8px;
  }
  #ai-search-section .page-search-form .page-search-button-ai {
    width: 40px;
    height: 40px;
  }
  #ai-search-section .page-search-form .page-search-button-ai i {
    font-size: 14px;
  }
  .example-queries {
    gap: 8px;
  }
  .chip-button.example-query-btn {
    font-size: 12px;
    padding: 6px 12px;
  } /* .chip-button으로 통합 후 세부 조정 */

  /* section.css 에서 가져온 모바일 제목 스타일 */
  .section-title-white /* 공통 섹션 제목 */,
  .recent-section-title,
  .your-music-title /* section.css 에 정의된 특정 섹션 제목들 */,
  .discovery-section-title /* recomend.css 에 정의된 제목 */,
  #discover-section #charts-title /* discover.css 에 정의된 제목 (ID 기반이므로 그대로 두거나 클래스로 변경) */ {
    font-size: 1.4rem; /* !important 제거 시도, 필요시 구체성으로 해결 */
    padding-left: 10px; /* 텍스트를 오른쪽으로 10px 이동 */
  }
}

@media (max-width: 480px) {
  /* 더 작은 모바일 화면 */
  #main-content .content-navigation-wrapper {
    padding: 0.5rem;
  }

  #search-results-area {
    padding: 0 0.5rem calc(0.5rem + 140px) 0.5rem;
  }

  /* ======== ▼▼▼ 노래 제목 공간 확보를 위한 수정 ▼▼▼ ======== */
  #search-results-area .all-tracks-list .track-thumbnail,
  #discover-section .track-thumbnail /* discover.css 에도 영향 줄 수 있음 */,
  #your-songs-section .track-thumbnail,
  #your-artists-section .track-thumbnail {
    /* your-artists-section 추가 */
    display: none;
  }

  #search-results-area .all-tracks-list li,
  #search-results-area .album-tracklist li,
  #discover-section .all-tracks-list li /* discover.css 에도 영향 */,
  #your-songs-section .all-tracks-list li,
  #your-artists-section .all-tracks-list li {
    /* your-artists-section 추가 */
    padding: 0.4rem 0.3rem;
  }

  #search-results-area .track-start-section,
  #discover-section .track-start-section /* discover.css 에도 영향 */,
  #your-songs-section .track-start-section,
  #your-artists-section .track-start-section {
    /* your-artists-section 추가 */
    width: 2.3em;
    margin-right: 0.3rem;
    background: transparent; /* 작은 화면에서는 그라데이션 배경 제거 */
  }

  #search-results-area .track-details,
  #discover-section .track-details /* discover.css 에도 영향 */,
  #your-songs-section .track-details,
  #your-artists-section .track-details {
    /* your-artists-section 추가 */
    margin-right: 0.3rem;
  }

  #search-results-area .all-tracks-list .track-title,
  #search-results-area .album-tracklist .track-title,
  #discover-section .track-title /* discover.css 에도 영향 */,
  #your-songs-section .track-title,
  #your-artists-section .track-title {
    /* your-artists-section 추가 */
    font-size: 0.85rem;
  }

  #search-results-area .all-tracks-list .track-artist-album,
  #discover-section .track-artist-album /* discover.css 에도 영향 */,
  #your-songs-section .track-artist-album,
  #your-artists-section .track-artist-album {
    /* your-artists-section 추가 */
    font-size: 0.7rem;
  }

  #search-results-area .all-tracks-list .track-duration,
  #search-results-area .album-tracklist .track-duration,
  #discover-section .track-duration /* discover.css 에도 영향 */,
  #your-songs-section .track-duration,
  #your-artists-section .track-duration {
    /* your-artists-section 추가 */
    font-size: 0.7rem;
    padding-left: 0.2rem;
    min-width: 35px;
  }

  #your-songs-section .song-actions,
  #your-artists-section .song-actions {
    /* your-artists-section 추가 */
    padding-left: 0.3rem;
  }
  #your-songs-section .song-actions .btn-delete-song,
  #your-artists-section .song-actions .btn-delete-song {
    /* your-artists-section 추가 */
    padding: 0.3rem;
    font-size: 0.9em;
  }
  /* ======== ▲▲▲ 노래 제목 공간 확보 수정 완료 ▲▲▲ ======== */

  #search-results-area .album-list-thumbnail {
    width: 50px;
    height: 50px;
  }
  #search-results-area .album-list-title {
    font-size: 0.85rem;
  }
  #search-results-area .album-list-meta {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  #search-results-area .album-list-actions {
    gap: 0.5rem;
  }
  #search-results-area .album-list-actions .btn,
  #search-results-area .btn-toggle-album-tracks {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
  }

  #search-results-area .album-tracklist li {
    padding: 0.5rem 0.8rem;
  }

  #ai-search-section {
    padding: 0.5rem 0.5rem 1.5rem 0.5rem;
  }
  .ai-search-title {
    font-size: 24px;
  }
  .ai-search-subtitle {
    font-size: 14px;
    margin-bottom: 1rem;
  }
  #ai-search-section .page-search-form {
    padding: 4px 4px 4px 10px;
  }
  #ai-search-section .page-search-form .page-search-input {
    font-size: 13px;
    padding: 8px 0;
  }
  #ai-search-section .page-search-form .search-icon-ai {
    font-size: 16px;
    margin-right: 6px;
  }
  #ai-search-section .page-search-form .page-search-button-ai {
    width: 36px;
    height: 36px;
  }
  #ai-search-section .page-search-form .page-search-button-ai i {
    font-size: 13px;
  }
  .chip-button.example-query-btn {
    font-size: 11px;
    padding: 5px 10px;
  }
}

/* ==========================================================================
   햄버거 메뉴 및 오버레이 스타일
   ========================================================================== */

.menu-toggle {
  display: flex; /* 기본값, 모바일에서만 보이도록 JS 또는 미디어쿼리 제어 */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 2000; /* 오버레이보다 위에 오도록 */
}
.menu-toggle .bar {
  width: 100%;
  height: 3px;
  background-color: #fdd835; /* 메뉴 아이콘 색상 */
  border-radius: 2px;
  transition: all 0.3s ease;
}

.sidebar-logo-link {
  text-decoration: none;
  color: inherit;
  display: inline-block; /* 로고 영역만큼만 클릭되도록 */
}

#side-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* 반투명 배경 */
  z-index: 2500; /* 최상단에 오도록 */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s 0.3s; /* 사라질 때 즉시 숨김 */
}

#side-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease; /* 나타날 때 부드럽게 */
}

#side-menu-overlay .overlay-panel {
  position: fixed;
  top: 0;
  right: 0; /* 오른쪽에서 나오도록 */
  height: 100%;
  width: 320px; /* 패널 너비 */
  background: #0f0f23; /* 패널 배경색 */
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2); /* 그림자 효과 */
  transform: translateX(100%); /* 기본적으로 화면 밖에 숨김 */
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

#side-menu-overlay.is-open .overlay-panel {
  transform: translateX(0); /* 열릴 때 제자리로 */
}

.overlay-header {
  display: none; /* 기본 숨김, 모바일에서만 표시 */
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0; /* 내용 많아도 줄어들지 않도록 */
}

.overlay-header .sidebar-logo {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #e0e0e0;
}
.overlay-header .sidebar-logo i {
  margin-right: 0.6rem;
  font-size: 1.3rem;
  color: #7e8eff;
}

.menu-close {
  font-size: 2.5rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  padding: 0.5rem;
}

.overlay-nav-content {
  padding: 1rem;
  overflow-y: auto; /* 내용 많으면 스크롤 */
  flex-grow: 1; /* 남은 공간 채우기 */
}

.overlay-nav-content .overlay-section-divider /* 중복 클래스명, 하나로 통일 가능 */,
.overlay-nav-content .sidebar-section-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0.5rem;
}

.overlay-nav-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.overlay-nav-content ul li a,
.overlay-nav-content ul li {
  /* li 자체도 스타일 가질 수 있도록 */
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  padding: 12px 8px;
  border-radius: 8px;
  transition: background-color 0.2s ease, color 0.2s ease;
  text-decoration: none;
  font-weight: 500;
}
.overlay-nav-content ul li a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.overlay-nav-content ul li i.fa-fw {
  margin-right: 1rem;
  font-size: 1.2rem;
  width: 20px; /* 아이콘 정렬 위해 */
  text-align: center;
}
.overlay-nav-content ul li strong {
  /* 사용자 이름 등 강조 */
  color: #fff;
}

@media (max-width: 768px) {
  /* 모바일에서 오버레이 패널 스타일 */
  #side-menu-overlay .overlay-panel {
    width: 100%; /* 전체 너비 사용 */
    background-color: rgba(15, 15, 35, 0.85); /* 반투명 배경 */
    -webkit-backdrop-filter: blur(10px); /* 블러 효과 */
    backdrop-filter: blur(10px);
  }
  .overlay-header {
    display: flex; /* 모바일에서 헤더 표시 */
  }
}

@media (min-width: 769px) {
  /* PC에서 닫기 버튼 위치 (필요시) */
  .menu-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
  }
}
