:root{
  --bg-color:#FDFDFD;
  --card-bg:#FFFFFF;
  --text-main:#333333;
  --text-sub:#777777;
  --gold-accent:#B08D55;
  --border-color:#EAEAEA;
  --shadow:0 4px 12px rgba(0,0,0,0.03);
  --star-color:#F1C40F;
}

.wm-app-root {
  font-family: 'Pretendard', system-ui, -apple-system, sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  position: relative;
  z-index: auto; 
}

/* Header */
.wm-header{
  text-align:center;
  padding: 10px 0; 
  background:#fff;
}
/* [추가] 헤더 상단 탑바 영역 */
.wm-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px 10px;
  border-bottom: 1px solid #f5f5f5;
  margin-bottom: 14px;
}
/* [추가] 상단 미니 선곡표 버튼 */
.wm-top-my-btn {
  background: #fff;
  border: 1px solid var(--gold-accent);
  color: var(--gold-accent);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.wm-top-my-btn:hover { background: var(--gold-accent); color: #fff; }

.wm-brand-name{
  display:block;
  font-family:'Cinzel', serif;
  font-size:13px;
  letter-spacing:1px;
  font-weight:700;
  color:var(--gold-accent);
}
.wm-header-title{
  margin:0;
  font-family:'Noto Serif KR', serif;
  font-size:20px;
  font-weight:300;
  color:#111;
  letter-spacing:-0.5px;
  line-height:1.2;
}
.wm-header-title span{ font-weight:700; }
.wm-subtitle{
  margin:8px 0 0;
  font-size:13px;
  line-height:1.6;
  color:var(--text-sub);
}
@media (max-width:768px){
  .wm-header-title{ font-size:19px; }
}

.wm-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100 !important; 
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  box-shadow: 0 5px 10px rgba(0,0,0,0.02);
  transition: top 0.3s;
}
.wm-main-tabs{
  display:flex;
  justify-content:center;
  gap:8px;
  padding: 14px 0 0;
  max-width: 920px;
  margin: 0 auto;
}
.wm-tab-btn{
  border:1px solid #ddd;
  background:#fff;
  padding:10px 14px;
  border-radius: 999px;
  font-size:13px;
  font-weight:600;
  color:#555;
  cursor:pointer;
  transition: .2s;
  white-space:nowrap;
  flex:1;
  text-align:center;
  font-family:'Noto Serif KR', serif;
}
.wm-tab-btn.active{
  background: var(--gold-accent);
  color:#fff;
  border-color: var(--gold-accent);
}
@media (max-width:768px){
  .wm-tab-btn{ font-size:12px; padding:9px 10px; }
}

.wm-sort-controls{
  display:flex;
  justify-content:center;
  gap:18px;
  margin-top:12px;
}
.wm-sort-btn{
  background:transparent;
  border:none;
  color:#999;
  font-size:12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
}
.wm-sort-btn.active{
  color: var(--gold-accent);
  font-weight:800;
}

/* List */
.wm-list{
  max-width: 920px;
  margin:0 auto;
  padding: 10px 0 120px; /* 하단 플로팅 버튼 공간 확보 */
}
.wm-empty{ color:#999; padding: 24px 4px; text-align: center; }

.wm-item{
  background: var(--card-bg);
  border:1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 18px;
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom: 14px;
  min-height: 78px;
}
.wm-rank{
  font-family:'Cinzel', serif;
  font-size:16px;
  font-weight:700;
  color: var(--gold-accent);
  width:48px;
  text-align:center;
  flex-shrink:0;
}
.wm-info{ flex:1; min-width:0; }

.wm-song-title{
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  word-break: keep-all;
}

.wm-usage{
  margin-top:4px;
  font-size:12px;
  color:#999;
}

/* Star */
.wm-star{
  all: unset;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:10px;
  font-size:22px;
  line-height:1;
  color:#d7d7d7;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}
.wm-star:hover{ background: rgba(0,0,0,0.04); }
.wm-star.active{ color: var(--star-color); }

/* Listen */
.wm-play{
  border:1px solid #ddd;
  background:#fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:#333;
  text-decoration: none;
}
.wm-play::before{ content:'▶'; font-size:9px; }

/* [수정] Floating Button (가시성 대폭 강화) */
.wm-floating {
  position: fixed;
  right: 20px;
  bottom: 30px;
  z-index: 9000;
  border: none;
  background: var(--gold-accent); /* 브랜드 컬러 사용 */
  color: #fff;
  border-radius: 50px;
  padding: 14px 24px;
  box-shadow: 0 6px 20px rgba(176, 141, 85, 0.4);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 800;
  font-size: 14px;
  transition: transform 0.2s, background 0.2s;
}
.wm-floating:hover {
  transform: translateY(-2px);
  background: #9a7b4a;
}
.wm-floating:active {
  transform: scale(0.95);
}
/* 모바일 중앙 정렬 */
@media (max-width: 600px) {
  .wm-floating {
    bottom: 24px;
    right: 50%;
    transform: translateX(50%);
    width: auto;
    white-space: nowrap;
  }
  .wm-floating:hover { transform: translateX(50%) translateY(-2px); }
  .wm-floating:active { transform: translateX(50%) scale(0.95); }
}

/* [추가] 버튼 꿀렁임 애니메이션 */
@keyframes wm-bump-anim {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.wm-floating.bump {
  animation: wm-bump-anim 0.3s ease-out;
}
/* 모바일용 꿀렁임 (transform 충돌 방지) */
@media (max-width: 600px) {
  @keyframes wm-bump-mobile {
    0% { transform: translateX(50%) scale(1); }
    50% { transform: translateX(50%) scale(1.1); }
    100% { transform: translateX(50%) scale(1); }
  }
  .wm-floating.bump { animation: wm-bump-mobile 0.3s ease-out; }
}

.wm-badge{
  background:#fff;
  color:var(--gold-accent);
  padding: 2px 8px;
  border-radius: 999px;
  font-size:12px;
  font-weight:900;
  min-width: 20px;
  text-align: center;
}

/* [추가] Toast Notification */
.wm-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, bottom 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  white-space: nowrap;
  pointer-events: none;
}
.wm-toast.show {
  opacity: 1;
  visibility: visible;
  bottom: 100px; /* 살짝 올라오는 효과 */
}


/* Video Modal & My Modal (기존 유지) */
.wm-video-overlay, .wm-my-overlay{
  display:none;
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.65);
  z-index: 4000;
  align-items:center;
  justify-content:center;
  padding: 20px;
}
.wm-video-overlay.is-open, .wm-my-overlay.is-open{ display:flex; }

.wm-video-container{
  width:100%;
  max-width: 860px;
  background:#fff;
  border-radius: 14px;
  overflow:hidden;
  position:relative;
  box-shadow: 0 14px 40px rgba(0,0,0,0.35);
}
.wm-video-close{
  position:absolute;
  top: 10px;
  right: 12px;
  border:none;
  background: rgba(0,0,0,0.55);
  color:#fff;
  border-radius: 10px;
  width: 38px;
  height: 38px;
  font-size: 24px;
  cursor:pointer;
  z-index: 5;
}
.wm-video-wrapper{ width:100%; aspect-ratio: 16/9; background:#000; }
#wm-yt-player{ width:100%; height:100%; border:none; }
.wm-video-info{ display:flex; align-items:center; justify-content:space-between; padding: 14px 16px; border-top: 1px solid #f2f2f2; }
.wm-video-meta{ display:flex; align-items:center; gap:12px; min-width:0; }
.wm-video-rank{ font-family:'Cinzel', serif; font-weight:900; color: var(--gold-accent); font-size:18px; min-width: 52px; }
.wm-video-text{ min-width:0; }
.wm-video-title{ font-size:14px; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wm-video-sub{ margin-top:2px; font-size:12px; color:#999; }
.wm-video-star{ all: unset; cursor:pointer; font-size: 26px; color:#ddd; padding: 6px 10px; border-radius: 10px; }
.wm-video-star.is-on{ color: var(--star-color); }
.wm-video-star:hover{ background: rgba(0,0,0,0.04); }

.wm-my-modal{ width:100%; max-width: 520px; background:#fff; border-radius: 14px; overflow:hidden; box-shadow: 0 12px 30px rgba(0,0,0,0.20); }
.wm-my-head{ display:flex; align-items:center; justify-content:space-between; padding: 16px 18px; border-bottom:1px solid #f1f1f1; }
.wm-my-title{ font-weight:900; font-size:16px; }
.wm-my-close{ all: unset; cursor:pointer; font-size: 26px; padding: 4px 10px; color:#555; }
.wm-my-list{ max-height: 55vh; overflow:auto; padding: 12px 18px; }
.wm-my-item{ display:flex; align-items:center; justify-content:space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f6f6f6; }
.wm-my-meta{ flex:1; min-width:0; }
.wm-my-cat{ font-size:11px; color: var(--gold-accent); margin-bottom: 4px; }
.wm-my-song{ font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wm-my-actions-row{ display:flex; align-items:center; gap:10px; }
.wm-my-remove{ all: unset; cursor:pointer; font-size: 22px; color:#bbb; padding: 4px 8px; }
.wm-my-remove:hover{ color:#777; }
.wm-my-actions{ display:flex; gap:10px; padding: 14px 18px 18px; }
.wm-my-btn{ flex:1; border:none; background:#eee; border-radius: 10px; padding: 12px 10px; cursor:pointer; font-weight:900; }
.wm-my-btn-dark{ background:#222; color:#fff; }

/* 테마 간섭 방지 */
.wm-app-root .counter, .wm-app-root .count, .wm-app-root .countup, .wm-app-root [class*="counter"], .wm-app-root [class*="count"], .wm-app-root [data-count], .wm-app-root [data-counter]{ animation: none !important; }