@font-face { font-family:'NEXON Lv1 Gothic OTF'; src:url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@2.1/NEXON Lv1 Gothic OTF.woff') format('woff'); }
div, span, table, p, input, textarea, button, select, code, h1, h2, h3 { font-family:'NEXON Lv1 Gothic OTF' !important; }

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
}

html, body {
  height: 100%;
}

body {
  background: linear-gradient(145deg, #121212 0%, #1e1e2f 100%);
/*  font-family: 'Segoe UI', 'Inter', system-ui, sans-serif; */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 0px;
}

/* 다크모드/라이트모드 변수 */
:root {
  --body-bg: #111111;
  --head-back: #364a64;
  --head-font: #ffffff;
  --theme-back: #2b3b50;
  --theme-skin: #54452f;
  --theme-impact: #ffb347;
  --player-stop: #de811d;
  --gap: 1px;
  --list-normal-font: #aaa;
  --list-impact-font: #ddd;
  --list-normal-back: #272757;
  --list-impact-back: #988686;
  --bg-main: #121212;
  --bg-card: rgba(18, 18, 24, 0.85);
  --text-primary: #eee;
  --text-secondary: #aaa;
  --border-color: rgba(255, 255, 255, 0.05);
}

body.light-mode {
  --bg-main: #f5f5f7;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-primary: #1a1a2e;
  --text-secondary: #555;
  --border-color: rgba(0, 0, 0, 0.1);
  background: linear-gradient(145deg, #e0e0e0 0%, #f5f5f7 100%);
}

body.light-mode .music-player {
  background: #2f2319;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.15);
}

body.light-mode .current-title-wrapper,
body.light-mode .now-playing {
  background: rgba(18, 18, 24, 0.98);
	border: none;
}

.current-title-wrapper, .now-playing {
	border: none;
}

body.light-mode .current-title {
  color: #f5f5f7;
}

body.light-mode .menu-container {
  background-image: linear-gradient(to right, #333, #222, #333);
/*  border-bottom: 3px groove #bba88a; */
  border-top: 3px ridge #bba88a;
}

body.light-mode .theme-search-bar {
  background-image: linear-gradient(to right, #333, #222, #333);
}

body.light-mode .playlist-ul li {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .song-title {
  color: #333;
}

body.light-mode .play-index {
  color: #ff8c00;
}

body.light-mode .playlist-header {
  background: rgba(47, 35, 25, 0.95);
}

body.light-mode .footer-note {
  color: #666;
  border-top: 3px solid rgba(0, 0, 0, 0.08);
  background: rgba(18, 18, 24, 0.98);
}

body.light-mode .controls {
  background-image: linear-gradient(to right, #333, #222, #333);
}

body.light-mode .util-btn {
  background: #e0e0e0;
  color: #ff8c00;
}

body.light-mode .search-box input {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  border: 1px solid #ccc;
}

body.light-mode .volume-slider-container {
  background: rgba(255, 255, 255, 0.95);
}

body.light-mode .modal-content {
  background: linear-gradient(145deg, #ffffff 0%, #f0f0f0 100%);
}

body.light-mode .modal-header h1 {
  color: #ff8c00;
}

body.light-mode .modal-body p {
  color: #333;
}

body.light-mode .instruction {
  background: rgba(0, 0, 0, 0.05);
}

body.light-mode .instruction ol {
  color: #555;
}

/* 스플래시 */
.splash-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 20;
  opacity: 1;
  transition: opacity 0.8s ease-out;
  pointer-events: none;
}

.splash-overlay.fade-out {
  opacity: 0;
}

/* 모바일 기본 */
body.mobile {
  height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

body.mobile .element {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body.mobile .element::-webkit-scrollbar {
  display: none;
}

/* 플레이어 컨테이너 */
.music-player {
  max-width: 980px;
  width: 100%;
  background: rgba(18, 18, 24, 0.85);
  backdrop-filter: blur(10px);
  border-radius: 2rem;
  box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
  overflow: hidden;
}

.music-player:fullscreen {
  max-width: 100%;
  width: 100%;
  height: 100vh;
  border-radius: 0;
  background: #121212;
  overflow-y: auto;
}

/* 메뉴 */
.menu-container {
  width: 100%;
  height: 73px;
  margin-top: 0px;
  padding: 4px 0px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 3px ridge var(--theme-skin);
  background-color: #444;
  background-image: linear-gradient(to right, #111, #444, #111);
}

.logo_img1 {
  position: absolute;
  padding: 0px 0px;
  left: 4px;
  top: 1px;
  width: 100px;
  height: 64px;
}
.logo_div1 { display: none; }

.menu-pl {
  position: absolute;
  width: 240px;
  right: 4px;
  top: 7px;
}

.pl-row {
  display: flex;
  width: 100%;
  justify-content: space-between;
  margin-bottom: 7px;
  gap: 6px;
}

body.mobile .pl-row-3 {
  display: none;
}

.pl-btn {
  flex: 1;
  text-align: center;
  background: rgba(255, 180, 71, 0.2);
  border: 1px solid rgba(255, 180, 71, 0.5);
  border-radius: 30px;
  padding: 7px 0;
  font-weight: 500;
  font-size: 1.0rem;
  text-decoration: none;
  color: #ffb347;
  transition: 0.2s;
  cursor: pointer;
}

.pl-btn:hover {
  background: #ffb347;
  color: #121212;
  transform: scale(0.98);
}

.pl-btn.active-category {
  background: #ffb347;
  color: #121212;
  transform: scale(0.98);
}

/* 현재 재생 */
.current-title-wrapper {
  margin-top: 0.4rem;
  padding: 13px 16px 7px 16px;
  text-align: center;
  background: rgba(0, 0, 0, 1);
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
  z-index: 1003;
	border-left: 1px solid #ffb347;
	border-right: 1px solid #ffb347;
	border-top: 1px solid #ffb347;
}

.current-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #eee;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  opacity: 0.4;
}

.video-container {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;

  border-left: 1px solid #ffb347;
  border-right: 1px solid #ffb347;
}

#youtube-player {
  width: 100%;
  height: 100%;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 10;
  cursor: default;
}

.now-playing {
  margin-bottom: 0.4rem;
  padding: 1px 2px;
  background: rgba(0, 0, 0, 1);
  border-bottom-left-radius: 7px;
  border-bottom-right-radius: 7px;
	border-left: 1px solid #ffb347;
	border-right: 1px solid #ffb347;
	border-bottom: 1px solid #ffb347;
}

/* 수정: .time-wrapper 기본 표시 (display: flex) */
.time-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0;
  margin: 0;
}

.volume-btn,
.h-btn {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #ffb347;
  font-size: 1.0rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s;
  flex-shrink: 0;
  opacity: 0.4;
}

.volume-btn:active,
.h-btn:active {
  transform: scale(0.95);
}

.volume-control {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.volume-slider-container {
  position: absolute;
  bottom: 79px;
  left: -40px;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  padding: 7px 7px;
  border-radius: 30px;
  z-index: 200;
  transform: rotate(270deg);
  transform-origin: center;
}

.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--theme-skin);
  cursor: pointer;
}

#currentTime,
#durationTime {
  font-size: 0.75rem;
  color: #ffb347;
  font-family: monospace;
  min-width: 40px;
  text-align: center;
  opacity: 0.4;
}

#seekBar {
  flex: 1;
  height: 7px;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

#seekBar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  background: #54452f;
  border-radius: 4px;
  cursor: pointer;
/*  box-shadow: 0 0 4px white; */
}

/* 컨트롤 바 */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
    padding: 0.4rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  flex-wrap: wrap;
  gap: 10px;
  background-image: linear-gradient(to right, #111, #444, #111);
  border-top: 3px ridge var(--theme-skin);
  border-bottom: 3px groove var(--theme-skin);
}

.controls-left,
.controls-right {
  flex-shrink: 0;
}

.controls-center {
  display: flex;
  gap: 1.8rem;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.controls button {
  padding: 7px;
  background-color: #eee;
  cursor: pointer;
  outline: none;
  box-shadow: 1px 4px 0 rgb(0, 0, 0, 1);
}

.controls button:active {
  box-shadow: 1px 1px 0 rgb(0, 0, 0, 0.5);
  position: relative;
  top: 2px;
  text-shadow: 0px 0px 4px #000;
}

.controls .ctrl-btn1,
.controls .ctrl-btn3 {
  width: 46px;
  height: 37px;
  border: 1px solid var(--theme-impact);
  border-radius: 8px;
  text-shadow: -1px -1px #111, 1px 1px #444;
  font-size: 10px;
  color: var(--theme-impact);
  background: var(--theme-skin);
}

.controls .ctrl-btn2 {
  width: 55px;
  height: 43px;
  text-shadow: -2px -2px #111, 1px 1px #444;
  border-radius: 7px;
  border: 1px solid var(--theme-impact);
  font-size: 16px;
  color: var(--theme-impact);
  background: var(--theme-skin);
}

.controls .ctrl-btn3 {
  border: 1px solid var(--theme-skin);
  color: #777;
  background: #333;
  border-radius: 16px;
}

/* ========== 새 테마+검색 바 (menu-container 아래) ========== */
.theme-search-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
/*  padding: 0.5rem 1rem;
  gap: 1rem; */
    padding: 0 7px;
    gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  background-image: linear-gradient(to right, #111, #444, #111);
  border-bottom: 3px groove var(--theme-skin);
}

.theme-toggle-wrapper {
  flex-shrink: 0;
}

/* 검색창 (오른쪽 끝) */
.theme-search-bar .search-box {
  flex: 0 1 auto;
  max-width: 30vw;
  margin-left: auto; /* 오른쪽 정렬 */
}

.theme-search-bar .search-box input {
  width: 100%;
    padding: 4px 30px 0px 35px;
    font-size: 0.7rem;
    border-radius: 40px;
  background: rgba(30, 30, 40, 0.9);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  outline: none;
    transition: all 0.2s;
}

/* 테마 토글 버튼 */
.theme-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 19px;
    height: 19px;
    cursor: pointer;
    font-size: 0.64rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.theme-toggle:hover {
    transform: scale(1.05);
    background: var(--bg-hover);
    border-color: var(--color-secondary);
}

/* 유틸리티 바 (버튼 영역) - 기본 숨김 */
.utility-bar {
  display: none;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.util-btn {
  background: #333;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #ffb347;
  cursor: pointer;
  transition: 0.2s;
  opacity: 0.7;
  box-sizing: border-box;
  border: 1px solid var(--theme-impact);
  border-radius: 24px;
  white-space: nowrap;
}

.util-btn:hover {
  background: #ffb347;
  color: #121212;
  transform: scale(0.98);
  opacity: 1;
}

/* 반응형: 좁은 화면에서 검색창 너비 줄임 */
@media (max-width: 640px) {
  .theme-search-bar .search-box {
    max-width: 37vw;
  }
  .util-btn {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
  }
  .utility-bar {
    gap: 0.3rem;
  }
}

/* 가로/넓은 화면에서는 검색창 더 넓게 */
@media (min-width: 641px) and (orientation: landscape) {
  .theme-search-bar .search-box {
	padding: 7 100px;
    max-width: 300px;
  }
}

/* 플레이리스트 */
.playlist-section {
  padding: 0 1rem 1.5rem 1rem;
}

body.mobile .playlist-section {
  width: calc(100% + 4px);
  padding-right: 1rem;
}

.playlist-header {
  position: sticky;
  top: 0;
  background: rgba(18, 18, 24, 0.95);
  backdrop-filter: blur(8px);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.4rem 0.1rem 0.1rem 0.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 0.4rem;
}

.playlist-head-info {
    flex-shrink: 0;
}

.utility-bar {
  flex: 0 1 auto;
  max-width: 260px;
  margin-left: auto; /* 오른쪽 정렬 */
  opacity: 0.7;
}

.playlist-count,
.playlist-title {
  font-size: 0.64rem;
  background: rgba(255, 180, 71, 0.2);
  padding: 4px 10px;
  border-radius: 40px;
  color: #ffb347;
  opacity: 0.4;
}

.playlist-title {
  font-size: 0.91rem;
}

.playlist-note {
  font-size: 0.7rem;
  padding: 4px 0px;
  border-radius: 4px;
  color: var(--theme-skin);
}

.playlist-header .ctrl-btn3 {
  background: #333;
  border: 1px solid var(--theme-skin);
  color: #777;
  border-radius: 16px;
  width: 32px;
  height: 32px;
  font-size: 0.9rem;
  padding: 0;
  margin-left: 8px;
  cursor: pointer;
  box-shadow: 1px 2px 0 rgb(0, 0, 0, 0.5);
}

.playlist-ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;  /* ✅ 부드러운 스크롤 애니메이션 */
}

.playlist-ul::-webkit-scrollbar {
  display: none;
}

.playlist-ul li {
  padding: 4px 7px;
  margin: 0;
  gap: 8px;
  border-radius: 8px;
  background: rgba(30, 30, 40, 0.7);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: 0.2s;
}

.playlist-ul li:hover {
  background: rgba(255, 180, 71, 0.2);
  transform: translateX(6px);
  border-color: rgba(255, 180, 71, 0.4);
}

.playlist-ul li.active {
  background: linear-gradient(95deg, rgba(255, 180, 71, 0.25), rgba(255, 140, 0, 0.15));
  border-left: 4px solid #ffb347;
}

.play-index {
  font-weight: 700;
  color: #ffb347;
  min-width: 38px;
  font-size: 0.85rem;
}

.song-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  color: #e4e4e4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playing-badge {
  font-size: 0.7rem;
  background: #ffb347;
  color: #121212;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: bold;
}

.search-highlight {
  background-color: #ffb347;
  color: #121212;
  font-weight: bold;
  border-radius: 4px;
  padding: 0 2px;
}

/* 푸터 */
.footer-note {
  text-align: center;
  font-size: 1.0rem;
  padding: 0.1rem 0.1rem 0.1rem 0.1rem;
  color: #7a7a8a;
  border-top: 3px solid rgba(255, 255, 255, 0.05);
}

body.mobile .footer-note {
  font-size: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-note span {
  word-break: keep-all;
}

/* 전체화면 UI */
.fullscreen-ui {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.video-container:fullscreen .fullscreen-ui,
.video-container:-webkit-full-screen .fullscreen-ui {
  display: block;
}

.fs-top-left,
.fs-top-right {
  position: absolute;
  top: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 40px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffb347;
  pointer-events: auto;
}

.fs-top-left {
  left: 16px;
  font-family: 'NEXON Lv1 Gothic OTF', sans-serif;
  letter-spacing: 1px;
}

.fs-top-right {
  right: 16px;
}

.fs-exit-btn {
  background: rgba(255, 70, 70, 0.9);
  border: none;
  color: white;
  font-size: 0.85rem;
  font-weight: bold;
  padding: 4px 14px;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
  opacity: 0.31;
}

/* 모달 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(145deg, #1e1e2f 0%, #121212 100%);
  margin: auto;
  padding: 0;
  border-radius: 24px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 180, 71, 0.3);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 10px 24px;
  border-bottom: 1px solid rgba(255, 180, 71, 0.2);
}

.modal-header h1 {
  font-size: 1.5rem;
  color: #ffb347;
  margin: 0;
}

.modal-close {
  font-size: 28px;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  transition: 0.2s;
}

.modal-close:hover {
  color: #ffb347;
}

.modal-body {
  padding: 20px 24px 30px 24px;
}

.modal-body p {
  color: #ccc;
  margin-bottom: 20px;
  text-align: center;
}

.download-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, #ffb347, #ff8c00);
  color: #121212;
  padding: 14px 20px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  margin: 20px 0;
  transition: 0.2s;
  border: none;
  cursor: pointer;
}

.download-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 5px 15px rgba(255, 180, 71, 0.3);
}

.instruction {
  background: rgba(30, 30, 40, 0.6);
  border-radius: 16px;
  padding: 16px 20px;
  margin-top: 10px;
}

.instruction h3 {
  color: #ffb347;
  font-size: 1rem;
  margin-bottom: 12px;
}

.instruction ol {
  color: #bbb;
  padding-left: 20px;
  margin: 0;
}

.instruction li {
  margin: 8px 0;
  line-height: 1.4;
}

.instruction strong {
  color: #ffb347;
}

/* 첫 터치 유도 토스트 메시지 */
.first-toast {
    position: fixed;
    top: 232px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    animation: toastFadeInOut 7s ease-in-out forwards;
}

@keyframes toastFadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
        visibility: hidden;
    }
}

.toast-content {
    background: linear-gradient(145deg, #1a1a2e, #0f0f1a);
    border-radius: 20px;
    padding: 0;
    min-width: 280px;
    max-width: 380px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 180, 71, 0.3);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

body.light-mode .toast-content {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.toast-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255, 180, 71, 0.15);
    border-bottom: 1px solid rgba(255, 180, 71, 0.2);
    font-weight: bold;
    color: #ffb347;
}

.toast-close {
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    transition: 0.2s;
}

.toast-close:hover {
    color: #ffb347;
}

.toast-body {
    padding: 16px;
}

.toast-item {
    display: flex;
    align-items: center;
    gap: 0px;
    padding: 0;		/* 8px 0; */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.toast-item .toast-img{ width: 100%; height: 100%; }

body.light-mode .toast-item {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.toast-item:last-child {
    border-bottom: none;
}

.toast-icon {
    font-size: 1.2rem;
    min-width: 36px;
    text-align: center;
}

.toast-text {
    font-size: 0.8rem;
    color: #ddd;
    line-height: 1.4;
}

body.light-mode .toast-text {
    color: #333;
}

.toast-footer {
    padding: 10px 16px;
    text-align: center;
    font-size: 0.75rem;
    color: #ffb347;
    background: rgba(255, 180, 71, 0.1);
    font-style: italic;
}

/* 모바일 대응 */
@media (max-width: 480px) {
    .toast-content {
        max-width: 320px;
        margin: 0 16px;
    }
    .toast-text {
        font-size: 0.7rem;
    }
    .toast-icon {
        font-size: 1rem;
        min-width: 30px;
    }
}

/* 반응형 (기존) */
@media (max-width: 1200px) {
  .menu-pl {
    padding: 0px;
  }
  .pl-row {
    width: 100%;
  }
  .pl-btn {
    font-size: 0.91rem;
    padding: 5px 0;
  }
}

@media (max-width: 640px) {
  .logo-mobile {
    padding: 0.91rem 0.91rem;
    display: block;
    opacity: 0.7;
    text-align: center;
  }
  body {
    padding: 0;
    background: #121212;
    height: 100%;
    align-items: flex-start;
  }
  .music-player {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    background: rgba(18, 18, 24, 0.98);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }
  .video-container {
    flex-shrink: 0;
  }
  .now-playing {
    flex-shrink: 0;
  }
  .time-wrapper {
    gap: 8px;
  }
  #currentTime,
  #durationTime {
    font-size: 0.7rem;
  }
  .controls {
    padding: 0.6rem 1rem;
  }
  .controls-center {
    gap: 1.2rem;
  }
  .playlist-section {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.8rem 0rem 0.8rem;
  }
  .playlist-ul li {
    padding: 4px 7px;
  }
  .play-index {
    min-width: 32px;
    font-size: 0.75rem;
  }
  .song-title {
    font-size: 0.8rem;
    white-space: normal;
    word-break: break-word;
  }
  .playing-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
  .footer-note {
    font-size: 0.65rem;
    padding: 0.1rem 0.1rem 0.1rem 0.1rem;
    flex-shrink: 0;
    background: rgba(18, 18, 24, 0.98);
  }
  .fs-top-left,
  .fs-top-right {
    padding: 5px 12px;
    font-size: 0.7rem;
    top: 10px;
  }
  .fs-exit-btn {
    padding: 3px 10px;
    font-size: 0.7rem;
  }
  .modal-content {
    width: 92%;
    margin: 20px auto;
  }
  .modal-header h1 {
    font-size: 1.2rem;
  }
  .download-btn {
    font-size: 1rem;
    padding: 12px 16px;
  }
  .instruction ol {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .controls-center {
    gap: 1rem;
  }
  .current-title {
    font-size: 0.82rem;
  }
  .pl-row {
    width: 100%;
  }
  .pl-btn {
    font-size: 0.70rem;
  }
}

@media (orientation: portrait) {
  .menu-container {
    display: block;
  }
  #prevSpan,
  #nextSpan,
  #top-btn-02 {
    display: none;
  }
  #titleSpan {
    width: auto;
  }
  body.mobile .pl-row-3 {
    display: none;
  }
  /* 세로 모드에서 리셋 버튼 숨김 (필요시) */
  #sequentialBtn {
    display: none;
  }
}

/* 가로모드(landscape)에서는 기본 보임 */
@media (orientation: landscape) {
  .music-player {
    border-radius: 2px;
  }

  body.mobile .pl-row-3 {
	display: block;
  }

  .time-wrapper {
    display: flex;
  }
  body.mobile {
    margin: 0;
    padding: 0;
    overflow-y: auto;
  }
  .logo_img1 { display: none; }
  .logo_div1 { display: block; }
  .logo_div1 {
    position: absolute;
    padding: 0px 0px;
    left: 10px;
    top: 1px;
	background: #000;
    color: #ffb347;
    z-index: 1971;
    opacity: 0.4;
  }
  .menu-container {
    height: 0px;
    margin: 0px;
    padding: 0px;
    border: none;
  }
  .menu-pl {
    position: fixed;
    right: 0px;
    top: 34px;
    width: 70px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1000;
    background: transparent;
    padding: 4px 1px;
  }
  .pl-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .pl-row-3 {
    display: block;
  }
  .menu-pl .pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    border-radius: 40px;
    background: rgba(30, 30, 40, 0.9);
    color: #ffb347;
    font-size: 0.73rem !important;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: 0.2s;
    border: 1px solid rgba(255, 180, 71, 0.4);
    backdrop-filter: blur(4px);
    white-space: nowrap;
    padding: 2px 4px;
    opacity: 0.4;
  }
  body.mobile .theme-search-bar,
  body.mobile .utility-bar {
    display: none;
  }
  body.mobile .video-overlay,
  body.mobile .video-container {
    margin: 0;
    padding: 0;
  }
  body.mobile #youtube-player {
    height: 100%;
  }
  .video-container {
    aspect-ratio: 16 / 9;
    max-height: 97vh;
  }
  body.mobile #buttonDiv {
    height: 16px;
  }
  body.mobile .controls-left,
  body.mobile .controls-right {
    display: none !important;
  }
  body.mobile .controls {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none;
  }
  body.mobile .controls-right {
    position: fixed;
    top: 0px;
    right: 0;
    display: flex !important;
    justify-content: center;
    align-items: center;
    background: transparent;
    padding: 2px 4px;
    z-index: 1010;
    pointer-events: auto;
    opacity: 0.4;
  }
  body.mobile .controls-center .ctrl-btn1, 
  body.mobile .controls-center .ctrl-btn2,
  body.mobile .time-wrapper .h-btn{
    display: none !important;
  }
  body.mobile .controls-right .ctrl-btn3 {
    width: 64px;
    height: 25px;
    padding: 0px 0px;
    font-size: 1.0rem;
    border-radius: 40px;
  }
  body.mobile .ctrl-btn1,
  body.mobile .ctrl-btn3 {
    width: 43px;
    height: 37px;
    font-size: 10px;
    background: var(--theme-skin);
    border: 1px solid var(--theme-impact);
    color: var(--theme-impact);
  }
  body.mobile .ctrl-btn2 {
    width: 61px;
    height: 46px;
    font-size: 22px;
    border: 1px solid var(--theme-impact);
    border-radius: 10px;
    color: var(--theme-impact);
    background: var(--theme-skin);
    text-shadow: -2px -2px #111, 1px 1px #444;
  }
  body.mobile .ctrl-btn3 {
    border: 1px solid var(--theme-skin);
    color: #777;
    background: #333;
    border-radius: 16px;
  }
  #sequentialBtn {
    display: inline-flex;
  }

  /* 추가: current-title-wrapper 높이 축소 */
  .current-title-wrapper {
  	  margin-top: 0;
    padding: 4px 16px 2px 16px !important;
	  text-align: center;
	  background: rgba(0, 0, 0, 1);
	  border-top-left-radius: 0px;
	  border-top-right-radius: 0px;
	  z-index: 1009;
  }
  .current-title {
    font-size: 0.8rem !important;
    line-height: 1.2 !important;
  }

	.now-playing {
  	  margin-bottom: 0;
	  padding: 1px 2px;
	  background: rgba(0, 0, 0, 1);
	  border-bottom-left-radius: 0px;
	  border-bottom-right-radius: 0px;
	}
	.volume-btn, .h-btn {
	  width: 22px;
	  height: 22px;
	}  

  .theme-toggle-wrapper {
    display: none;
    border: 0;
  }

	body.light-mode .current-title-wrapper,
	body.light-mode .now-playing,
	body.light-mode .video-container {
	  background: rgba(18, 18, 24, 0.98);
		border: none;
	}

	.current-title-wrapper, .now-playing, .video-container{
		border: none;
	}
}