:root{
  --bg:#111;
  --panel:#141414;
  --text:#f5f5f5;
  --muted:#b9b9b9;
  --btn:#2a2a2a;
  --btn2:#333;
  --shadow: 0 12px 30px rgba(0,0,0,.45);
  --r:16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background: radial-gradient(1200px 500px at 50% 0%, #1b1b1b 0%, #111 55%, #0e0e0e 100%);
  color:var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

.app{ min-height:100%; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: sticky;
  top: 0;
  background: rgba(17,17,17,.75);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.brand{ display:flex; gap:12px; align-items:center; }
.brandDot{
  width:14px; height:14px; border-radius:50%;
  background: radial-gradient(circle, #ddd 0%, #444 35%, #111 75%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.08) inset;
}
.brandTitle{ letter-spacing:3px; font-weight:700; font-size:14px; }
.brandSub{ color:var(--muted); font-size:12px; margin-top:2px; }

.actions{ display:flex; gap:10px; align-items:center; }
.ghostBtn{
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}

.layout{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  padding: 22px;
  align-items:start;
}

.recommend{
  background: rgba(20,20,20,.35);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r);
  padding: 18px;
  box-shadow: var(--shadow);
}
.sectionTitle{ margin:0 0 6px; font-size:18px; }
.sectionHint{ margin:0 0 16px; color:var(--muted); font-size:13px; }

.shelf{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.albumCard{
  background: rgba(23,23,23,.7);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  overflow:hidden;
  cursor:pointer;
  transition: transform .14s ease, border-color .14s ease;
}
.albumCard:hover{
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.14);
}
.albumArt{
  width:100%;
  aspect-ratio: 1 / 1;
  background:#222;
  background-size: cover;
  background-position:center;
}
.albumMeta{ padding: 10px 10px 12px; }
.albumName{
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  margin:0 0 4px;
}
.albumArtist{
  font-size: 12px;
  color: var(--muted);
  margin:0;
}

.playerPane{ position: sticky; top: 84px; }
.playerCard{
  background: rgba(20,20,20,.35);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--r);
  padding: 16px;
  box-shadow: var(--shadow);
}

.playerHeader{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding: 4px 2px 10px;
}
.playerHeaderTitle{ font-weight:700; letter-spacing: .5px; }
.playerHeaderMeta{ color: var(--muted); font-size: 12px; }

.turntable{
  width: 420px;
  height: 280px;
  margin: 6px auto 6px;
  position: relative;
  max-width: 100%;
  overflow: visible;
}

/* 중앙정렬은 wrap이 담당 -> 회전 transform과 충돌 없음 */
.vinylWrap{
  position:absolute;
  left:50%;
  top:50%;
  width:220px;
  height:220px;
  transform: translate(-50%,-50%);
}

.vinyl{
  width:220px;
  height:220px;
  border-radius:50%;
  background: radial-gradient(circle at center, #222 20%, #000 60%);
  position:relative;
}

.vinylCover{
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  background-size: cover;
  background-position: center;
}

.vinylHole{
  position:absolute;
  left:50%;
  top:50%;
  transform: translate(-50%,-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #666 20%, #222 70%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.04) inset;
}

/* 회전은 vinyl만 */
@keyframes spin { from{ transform: rotate(0deg);} to{ transform: rotate(360deg);} }
.vinyl.spinning{ animation: spin 3s linear infinite; }

/* 톤암: 네가 맞춘 “원하는 포지션” 값 */
.tonearm{
  position:absolute;
  width: 170px;
  height: 8px;
  border-radius: 6px;
  background: linear-gradient(to bottom, #848484, #f0eeee, #d6d6d6);
  left: 50%;
  top: 50%;
  transform-origin: 92% 50%;
  transform: translate(-20px, -95px) rotate(270deg);
  transition: transform .6s ease;
  z-index: 5;
}
.tonearm::before{
  content:"";
  position:absolute;
  right:-16px; top:-12px;
  width:30px; height:30px;
  border-radius:50%;
  background: radial-gradient(circle, #f0eeee, #848484, #d6d6d6);
}
.tonearm::after{
  content:"";
  position:absolute;
  left:-10px; top:-5px;
  width:22px; height:18px;
  border-radius: 2px;
  background:#f0eeee;
  box-shadow: 0 0 0 1px #bdbdbd inset;
}
.tonearm.down{
  transform: translate(-20px, -95px) rotate(295deg);
}

.nowPlaying{
  text-align:center;
  margin: 10px 0 10px;
  font-size: 14px;
}

.timeline{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 4px 6px 10px;
}
.time{
  width: 44px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  text-align:center;
}
.seek{
  flex:1;
  -webkit-appearance:none;
  appearance:none;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  outline:none;
}
.seek::-webkit-slider-thumb{
  -webkit-appearance:none;
  width: 14px;
  height: 14px;
  border-radius:50%;
  background:#fff;
  border: 2px solid rgba(0,0,0,.35);
  cursor:pointer;
}
.seek::-moz-range-thumb{
  width: 14px;
  height: 14px;
  border-radius:50%;
  background:#fff;
  border: 2px solid rgba(0,0,0,.35);
  cursor:pointer;
}

.controls{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:12px;
  margin: 4px 0 4px;
}

.iconBtn{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--btn);
  border: 1px solid rgba(255,255,255,.12);
  cursor:pointer;
  position:relative;
}
.iconBtn:hover{ background: var(--btn2); }

/* play/pause 아이콘 (CSS) */
#playBtn.play::before{
  content:"";
  position:absolute;
  left: 23px;
  top: 18px;
  width:0; height:0;
  border-left: 14px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
}
#playBtn.pause::before,
#playBtn.pause::after{
  content:"";
  position:absolute;
  top: 18px;
  width:6px;
  height:20px;
  background:#fff;
  border-radius:2px;
}
#playBtn.pause::before{ left: 19px; }
#playBtn.pause::after{ left: 31px; }

/* prev / next */
#prevBtn::before{
  content:"";
  position:absolute;
  left:16px; top:18px;
  width:4px; height:20px;
  background:#fff; border-radius:2px;
}
#prevBtn::after{
  content:"";
  position:absolute;
  left:24px; top:18px;
  width:0; height:0;
  border-right:16px solid #fff;
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
}
#nextBtn::before{
  content:"";
  position:absolute;
  right:16px; top:18px;
  width:4px; height:20px;
  background:#fff; border-radius:2px;
}
#nextBtn::after{
  content:"";
  position:absolute;
  right:24px; top:18px;
  width:0; height:0;
  border-left:16px solid #fff;
  border-top:10px solid transparent;
  border-bottom:10px solid transparent;
}

/* Curation Note (read-only) */
.curation{
  margin-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 12px;
}
.curationTop{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.curationTitle{ font-weight:700; font-size: 13px; letter-spacing:.2px; }
.noteId{ color: var(--muted); font-size: 12px; }

.noteView{
  min-height: 56px;
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.06);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.noteHint{
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}
.noteHint code{
  background: rgba(255,255,255,.08);
  padding: 1px 6px;
  border-radius: 6px;
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .playerPane{ position: relative; top: auto; }
  .turntable{ width: 100%; height: 280px; }
}

.curationSections{
  display:flex;
  flex-direction: column;
  gap: 18px;
}

.shelfSection{
  padding: 12px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 14px;
  background: rgba(23,23,23,.35);
}

.shelfHead{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.shelfTitle{
  font-weight: 750;
  letter-spacing: .2px;
}
.shelfSub{
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.shelfRow{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.viewAllRow{
  margin-top: 14px;
  display:flex;
  justify-content: flex-end;
}

/* Modal */
.hidden{ display:none; }

.modal{
  position: fixed;
  inset: 0;
  z-index: 999;
}
.modalBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
}
.modalPanel{
  position: relative;
  width: min(980px, calc(100% - 40px));
  max-height: calc(100% - 40px);
  margin: 20px auto;
  background: rgba(20,20,20,.92);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,.6);
  padding: 14px;
  overflow: auto;
}
.modalTop{
  display:flex;
  justify-content: space-between;
  align-items:center;
  gap:12px;
  margin-bottom: 12px;
}
.modalTitle{
  font-weight: 800;
  letter-spacing: .3px;
}
.modalBottom{
  display:flex;
  justify-content: center;
  margin-top: 14px;
}
/* 검색 */
.modalSearch {
  margin-bottom: 12px;
}
.modalSearch input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.4);
  color: var(--text);
  font-size: 14px;
}
.modalSearch input:focus {
  outline: 2px solid rgba(255,255,255,.15);
}

/* 리스트 보기 */
.allList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listItem {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(23,23,23,.6);
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: background .12s ease;
}
.listItem:hover {
  background: rgba(40,40,40,.8);
}

.listThumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.listMeta {
  display: flex;
  flex-direction: column;
}

.listName {
  font-size: 14px;
  font-weight: 600;
}

.listArtist {
  font-size: 12px;
  color: var(--muted);
}