/* himmsu playlist — 내부 UI (영상은 상단 히어로에서 재생) */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
:root{
  --bg:#0e0e11;
  --surface:#1a1a1e;
  --border:#2a2a32;
  --text:#ffffff;
  --muted:#a1a1aa;
  --muted-2:#7c7c86;
  --accent:#ff3b30;
  --accent-text:#ff6b5e;
}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif;background:var(--bg);color:var(--text);padding-bottom:185px}
button{font-family:inherit}

/* ===== 입장 화면 ===== */
.entry{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg)}
.entry-inner{width:100%;max-width:400px}
.logo{width:64px;height:64px;border-radius:18px;background:linear-gradient(135deg,#ff6a3d 0%,#e86a2a 35%,#9a8a2e 70%,#7a8a2e 100%);display:flex;align-items:flex-end;justify-content:center;gap:5px;padding:14px 12px}
.logo span{display:block;width:7px;border-radius:3px;background:#ffe9a8}
.logo span:nth-child(1){height:26px}
.logo span:nth-child(2){height:36px}
.logo span:nth-child(3){height:18px}
.logo span:nth-child(4){height:30px}
.entry h1{font-size:28px;line-height:1.25;font-weight:800;letter-spacing:-.5px;margin:22px 0 12px}
.entry .sub{font-size:15px;line-height:1.6;color:var(--muted);margin:0 0 22px}
.entry input{width:100%;padding:15px 16px;border-radius:12px;border:1px solid #2e2e36;background:#1e1e24;color:#fff;font-size:15px;outline:none}
.entry input::placeholder{color:#6b6b75}
.entry input:focus{border-color:#44444e}
.entry .primary{width:100%;margin-top:14px;padding:15px;border:0;border-radius:12px;background:var(--accent);color:#fff;font-size:16px;font-weight:700;cursor:pointer}
.entry .note{text-align:center;font-size:12px;color:var(--muted-2);margin-top:14px}

/* ===== 메인 헤더 ===== */
header{padding:18px 18px 8px;display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
header h1{font-size:22px;margin:0;font-weight:800;letter-spacing:-.4px}
header p{margin:6px 0 0;color:var(--muted);font-size:12px}
.copy-btn{display:flex;align-items:center;gap:6px;background:#1e1e24;border:1px solid #2e2e36;color:#fff;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;flex-shrink:0}
.copy-btn svg{width:14px;height:14px;flex-shrink:0}

/* ===== 상단 영상 히어로 ===== */
.hero{margin:10px 16px 18px;height:200px;border-radius:20px;position:relative;overflow:hidden;background:linear-gradient(135deg,#7c3aed 0%,#5b21b6 55%,#3b1a8a 100%);cursor:pointer;border:0;width:calc(100% - 32px);padding:0;display:block}
.hero.playing{background:#000}
#yt-player{position:absolute;inset:0;width:100%;height:100%;background:#000}
#yt-player iframe{width:100%;height:100%;display:block}
.hero-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:2;pointer-events:none;
  background:
  radial-gradient(circle at 50% 118%, rgba(255,255,255,.35) 0 42%, transparent 43%),
  radial-gradient(circle at 50% 118%, rgba(255,255,255,.18) 0 62%, transparent 63%),
  radial-gradient(circle at 50% 118%, rgba(255,255,255,.10) 0 82%, transparent 83%);
}
.hero.playing .hero-overlay{opacity:0}
.hero-overlay .hero-dot{position:absolute;left:50%;top:calc(50% + 38px);transform:translateX(-50%);width:38px;height:38px;border-radius:50%;background:#f9a8d4;opacity:.9}
.hero-play{position:relative;width:58px;height:58px;border-radius:50%;background:var(--accent);border:0;color:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 8px 24px rgba(0,0,0,.35);pointer-events:auto}
.hero-play svg{width:26px;height:26px}

/* ===== 플레이리스트 헤더 ===== */
.pl-head{display:flex;align-items:center;justify-content:space-between;padding:0 18px 10px}
.pl-head .left{display:flex;align-items:baseline;gap:8px}
.pl-head .title{font-size:16px;font-weight:700}
.pl-head .total{font-size:13px;color:var(--muted)}
.add-btn{background:var(--accent);color:#fff;border:0;border-radius:999px;padding:9px 14px;font-size:13px;font-weight:700;cursor:pointer}

/* ===== 곡 리스트 ===== */
main{padding:0 18px}
.status{font-size:11px;color:var(--muted);margin:0 0 8px;display:flex;align-items:center;gap:6px}
.status .dot{width:6px;height:6px;border-radius:50%;background:#34d399;flex-shrink:0}
.status.offline .dot{background:#f59e0b}
.list{display:flex;flex-direction:column}
.track{display:flex;gap:12px;padding:12px 8px;border-radius:12px;border-bottom:1px solid #1f1f25;cursor:pointer;align-items:center}
.track:last-child{border-bottom:0}
.track.active{background:#1c1c22;border-bottom-color:transparent}
.thumb{width:48px;height:48px;object-fit:cover;border-radius:10px;background:#222;flex-shrink:0}
.info{flex:1;min-width:0}
.info .title{font-size:15px;font-weight:700;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.info .meta{font-size:13px;color:var(--muted);margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.right{flex-shrink:0;display:flex;flex-direction:column;align-items:flex-end;gap:3px;min-width:88px}
.right .added-row{display:flex;align-items:center;gap:8px}
.right .added{font-size:12px;color:var(--muted);white-space:nowrap}
.right .dur{font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.del-btn{background:transparent;border:0;color:#6b6b75;cursor:pointer;padding:4px;line-height:1;min-width:28px;min-height:28px;display:flex;align-items:center;justify-content:center;border-radius:8px}
.del-btn:hover{color:#fff;background:#26262e}
.del-btn svg{width:14px;height:14px}
.empty{padding:36px 16px;text-align:center;color:var(--muted);border:1px dashed #2e2e36;border-radius:16px;font-size:14px;line-height:1.6;margin-top:8px}

/* ===== 하단 플레이어 (영상 없음 — 영상은 상단에서만) ===== */
.player{position:fixed;left:0;right:0;bottom:0;z-index:20;background:#141418;border-top:1px solid #26262e;padding:10px 16px calc(12px + env(safe-area-inset-bottom))}
.progress{margin:2px 0 6px}
.progress-track{height:4px;background:#2a2a32;border-radius:99px;position:relative;cursor:pointer;padding:8px 0;background:transparent}
.progress-track::before{content:"";position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:4px;background:#2a2a32;border-radius:99px}
.progress-fill{position:absolute;left:0;top:50%;transform:translateY(-50%);height:4px;background:#fff;border-radius:99px;width:0%;z-index:1}
.progress-dot{position:absolute;top:50%;left:0%;transform:translate(-50%,-50%);width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.5);z-index:2}
.progress-times{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:2px;font-variant-numeric:tabular-nums}
.player-row{display:flex;gap:12px;align-items:center;margin-top:8px}
.player-thumb{width:44px;height:44px;border-radius:10px;object-fit:cover;background:#222;flex-shrink:0}
.player-info{flex:1;min-width:0}
.player-info .t{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.player-info .s{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}
.player-info .s b{color:var(--accent-text);font-weight:600}
.controls{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:8px}
.ctl-btn{background:transparent;border:0;color:#a1a1aa;cursor:pointer;display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;position:relative;-webkit-tap-highlight-color:transparent}
.ctl-btn svg{width:22px;height:22px;display:block}
.ctl-btn.active{color:#fff;background:#26262e}
.ctl-btn.play{width:56px;height:56px;border-radius:50%;background:#fff;color:#000;box-shadow:0 4px 16px rgba(0,0,0,.4)}
.ctl-btn.play svg{width:26px;height:26px}
.ctl-btn:active{transform:scale(.94)}
.repeat-one-badge{position:absolute;top:2px;right:2px;min-width:14px;height:14px;border-radius:7px;background:var(--accent);color:#fff;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 3px}

/* ===== 시트 ===== */
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:30;background:#17171d;border-top-left-radius:20px;border-top-right-radius:20px;border-top:1px solid #2c2c34;padding:12px 18px calc(20px + env(safe-area-inset-bottom));transform:translateY(105%);transition:transform .25s ease;max-height:85vh;overflow:auto}
.sheet.open{transform:translateY(0)}
.sheet-handle{width:40px;height:5px;border-radius:99px;background:#3a3a44;margin:0 auto 14px}
.sheet h3{margin:2px 0 14px;font-size:16px;font-weight:700}
input[type=text].field{width:100%;padding:14px 15px;border-radius:12px;border:1px solid #2e2e36;background:#0f0f13;color:#fff;font-size:15px;outline:none}
input[type=text].field:focus{border-color:#44444e}
.hint{font-size:12px;color:var(--muted);margin-top:10px;line-height:1.6}
.error{font-size:13px;color:#ff8a8a;margin-top:8px;display:none}
.sheet .primary{width:100%;margin-top:14px;padding:14px;border:0;border-radius:12px;background:var(--accent);color:#fff;font-size:15px;font-weight:700;cursor:pointer}
.backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:29;display:none}
.backdrop.show{display:block}
.hidden{display:none!important}
