/* 🎧 클럽 더위너스 — 화면 (검정 + 네온 핑크/시안, 클럽 조명처럼) */
:root {
  --pink: #ff2fa0;
  --cyan: #38e8ff;
  --violet: #a06bff;
  --gold: #ffd23f;
  --bg: #05040a;
  --ink: #f4f0ff;
  --dim: #9d93b8;
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(14, 11, 24, 0.88);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: Pretendard, "Malgun Gothic", system-ui, -apple-system, sans-serif;
  overscroll-behavior: none; overflow: hidden;
}
body { position: fixed; inset: 0; }
canvas#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ── 로딩 ─────────────────────────────────────────────────────────── */
.boot { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: radial-gradient(120% 90% at 50% 20%, #12061f 0%, #05040a 62%); }
.boot-inner { text-align: center; width: min(88vw, 420px); }
.boot-mark { font-size: 46px; filter: drop-shadow(0 0 18px var(--pink)); animation: pump 1.1s infinite; }
@keyframes pump { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
.boot-logo { margin: 8px 0 2px; font-size: 27px; letter-spacing: .16em; font-weight: 900;
  background: linear-gradient(92deg, var(--pink), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-logo span { display: block; margin-top: 8px; font-size: 13px; letter-spacing: .34em; color: var(--dim);
  -webkit-text-fill-color: var(--dim); }
.boot-sub { margin: 4px 0 22px; font-size: 11px; letter-spacing: .3em; color: #6f6690; }
.boot-bar { height: 3px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 34%; border-radius: 3px;
  background: linear-gradient(90deg, var(--pink), var(--cyan)); animation: slide 1.3s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -34%; } 100% { margin-left: 100%; } }
.boot-hint { margin: 14px 0 0; font-size: 12px; color: var(--dim); }

/* ── 입장 ─────────────────────────────────────────────────────────── */
.entry { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(90% 70% at 50% 0%, rgba(90, 10, 80, .5), rgba(5, 4, 10, .92) 70%); }
.entry-card { width: min(96vw, 900px); max-height: 94vh; overflow: auto;
  background: linear-gradient(180deg, rgba(20, 14, 34, .96), rgba(9, 7, 16, .98));
  border: 1px solid rgba(255, 47, 160, .3); border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 30px 90px rgba(255, 47, 160, .12), 0 0 90px rgba(56, 232, 255, .07) inset; }
.entry-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.entry-title { font-size: 22px; letter-spacing: .14em; font-weight: 900; }
.entry-title b { color: var(--cyan); }
.entry-title em { font-style: normal; color: var(--pink); }
.entry-sub { margin-top: 4px; font-size: 11.5px; letter-spacing: .1em; color: var(--dim); }
.entry-body { display: grid; grid-template-columns: 300px 1fr; gap: 18px; padding: 16px 20px 20px; }
.preview-wrap { position: relative; border-radius: 16px; overflow: hidden;
  background: radial-gradient(70% 60% at 50% 80%, rgba(255, 47, 160, .28), rgba(8, 6, 16, .9) 70%);
  border: 1px solid rgba(56, 232, 255, .18); min-height: 320px; }
#preview { width: 100%; height: 100%; display: block; }
.preview-glow { position: absolute; inset: auto 0 0; height: 42%;
  background: linear-gradient(0deg, rgba(255, 47, 160, .16), transparent); pointer-events: none; }
.entry-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--dim); }
.field input { height: 44px; padding: 0 12px; border-radius: 11px; font-size: 15px; color: var(--ink);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); outline: none; }
.field input:focus { border-color: rgba(56, 232, 255, .55); box-shadow: 0 0 0 3px rgba(56, 232, 255, .1); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg { display: flex; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { flex: 1; height: 36px; border-radius: 8px; font-size: 13px; color: var(--dim); }
.seg button.on { background: linear-gradient(100deg, rgba(255,47,160,.24), rgba(56,232,255,.18)); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips.small button { padding: 6px 9px; font-size: 11.5px; }
.chips button { padding: 8px 11px; border-radius: 9px; font-size: 12.5px; color: var(--dim);
  background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.chips button.on { color: #fff; border-color: rgba(255, 47, 160, .7); background: rgba(255, 47, 160, .16); }
.entry-actions { display: grid; gap: 9px; margin-top: 4px; }
.btn { border-radius: 12px; padding: 13px 16px; font-size: 14px; font-weight: 700;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); }
.btn.big { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 13px 16px; }
.btn.big b { font-size: 16px; }
.btn.big span { font-size: 11.5px; font-weight: 500; color: var(--dim); }
.btn.primary { background: linear-gradient(100deg, var(--pink), #b12bff 55%, var(--cyan)); color: #fff;
  border: 0; box-shadow: 0 12px 30px rgba(255, 47, 160, .26); }
.btn.primary span { color: rgba(255,255,255,.82); }
.btn.ghost { background: rgba(56, 232, 255, .07); border-color: rgba(56, 232, 255, .28); }
.entry-note { margin: 2px 0 0; font-size: 11px; color: #766d92; line-height: 1.5; }

/* ── HUD ─────────────────────────────────────────────────────────── */
.hud { position: fixed; top: max(12px, env(safe-area-inset-top)); right: 12px; z-index: 20; display: flex; gap: 8px; }
.hud-btn { width: 42px; height: 42px; border-radius: 50%; font-size: 17px; color: #fff;
  background: rgba(12, 9, 20, .62); border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px); display: grid; place-items: center; }
.hud-btn:active { transform: scale(.94); }
.hud-btn.off { color: #8c84a6; }

/* ── 지금 나오는 곡 ────────────────────────────────────────────────── */
.now-playing { position: fixed; left: 14px; bottom: 16px; z-index: 18; display: flex; align-items: center; gap: 8px;
  padding: 8px 13px; border-radius: 999px; font-size: 12px; color: #e9e3ff;
  background: rgba(10, 7, 18, .72); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(8px);
  max-width: min(70vw, 420px); transition: opacity .5s; }
.now-playing i { width: 7px; height: 7px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.now-playing span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing em { font-style: normal; font-size: 10.5px; color: var(--cyan); letter-spacing: .06em; }

/* ── 춤 바 ────────────────────────────────────────────────────────── */
.dance-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 19; display: flex; gap: 6px; padding: 7px; border-radius: 16px; max-width: 94vw; overflow-x: auto;
  background: rgba(9, 6, 16, .68); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(10px);
  scrollbar-width: none; }
.dance-bar::-webkit-scrollbar { display: none; }
.dance-bar button { flex: 0 0 auto; padding: 8px 12px; border-radius: 10px; font-size: 12px; color: #cfc7e8;
  border: 1px solid transparent; }
.dance-bar button.on { color: #fff; background: linear-gradient(100deg, rgba(255,47,160,.34), rgba(56,232,255,.22));
  border-color: rgba(255, 47, 160, .5); }

/* ── 조이스틱 ─────────────────────────────────────────────────────── */
.joy { position: fixed; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 19; }
.joy-base { width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(255,255,255,.07), rgba(255,255,255,.02) 70%);
  border: 1px solid rgba(255,255,255,.14); touch-action: none; }
.joy-knob { width: 48px; height: 48px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.85), rgba(255, 47, 160, .75));
  box-shadow: 0 0 22px rgba(255, 47, 160, .6); transition: transform .06s linear; }

/* ── 상황 버튼 ────────────────────────────────────────────────────── */
.ctx-bar { position: fixed; right: 14px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 118px);
  z-index: 19; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.ctx-btn { padding: 10px 14px; border-radius: 999px; font-size: 12.5px; color: #fff;
  background: rgba(14, 10, 24, .8); border: 1px solid rgba(56, 232, 255, .35); backdrop-filter: blur(8px); }
.ctx-btn.hot { border-color: rgba(255, 47, 160, .6); box-shadow: 0 0 20px rgba(255, 47, 160, .3); }

/* ── 패널(메뉴) ───────────────────────────────────────────────────── */
.panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: min(94vw, 400px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(17, 12, 28, .97), rgba(7, 5, 12, .98));
  border-left: 1px solid rgba(255, 255, 255, .1); box-shadow: -20px 0 60px rgba(0,0,0,.6);
  animation: slideIn .22s ease-out; }
@keyframes slideIn { from { transform: translateX(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line); }
.panel-head b { display: block; font-size: 14px; letter-spacing: .12em; color: var(--cyan); }
.panel-head span { font-size: 11.5px; color: var(--dim); letter-spacing: .08em; }
.x { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.06); font-size: 14px; }
.panel-body { padding: 14px 16px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.panel-body section h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .16em; color: var(--pink); font-weight: 700; }
.p-now { padding: 13px 14px; border-radius: 14px; background: rgba(255, 47, 160, .07);
  border: 1px solid rgba(255, 47, 160, .22); }
.p-now-label { font-size: 10.5px; letter-spacing: .18em; color: var(--dim); }
.p-now-title { margin-top: 5px; font-size: 17px; font-weight: 800; }
.p-now-meta { margin-top: 3px; font-size: 11.5px; color: var(--cyan); letter-spacing: .05em; }
.p-now-ctrl { display: flex; gap: 8px; margin-top: 10px; }
.mini { padding: 7px 12px; border-radius: 9px; font-size: 12px; background: rgba(255,255,255,.07);
  border: 1px solid var(--line); }
.dance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.dance-grid button { padding: 9px 6px; border-radius: 10px; font-size: 12px; color: #cfc7e8;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); }
.dance-grid button.on { color: #fff; background: linear-gradient(100deg, rgba(255,47,160,.3), rgba(56,232,255,.2));
  border-color: rgba(255, 47, 160, .55); }
.playlist { max-height: 240px; overflow-y: auto; border-radius: 12px; border: 1px solid var(--line); }
.playlist button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 11px; font-size: 12.5px;
  color: #cfc7e8; border-bottom: 1px solid rgba(255,255,255,.05); text-align: left; }
.playlist button > i { font-style: normal; font-size: 10px; color: var(--dim); min-width: 18px; }
.playlist button > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.playlist button > em { font-style: normal; font-size: 10px; color: #6f6690; }
.playlist button.on { color: #fff; background: rgba(255, 47, 160, .12); }
.p-info p { margin: 0; font-size: 11.5px; line-height: 1.75; color: #a99fc4; }
.p-info b { color: #fff; }

/* ── 결제 모달 ────────────────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 14px;
  background: rgba(3, 2, 8, .72); backdrop-filter: blur(4px); }
.modal-card { width: min(96vw, 440px); max-height: 92vh; overflow: auto; border-radius: 18px;
  background: linear-gradient(180deg, #16101f, #0a0711); border: 1px solid rgba(255, 47, 160, .3);
  box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line); }
.modal-head b { display: block; font-size: 15.5px; }
.modal-head span { font-size: 11.5px; color: var(--dim); }
.modal-head em { font-style: normal; color: var(--gold); font-weight: 800; }
.modal-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 11px; }
.pay-qr { display: grid; grid-template-columns: 118px 1fr; gap: 12px; align-items: center;
  padding: 10px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.pay-qr img { width: 118px; height: 118px; border-radius: 9px; background: #fff; object-fit: contain; }
.pay-qr-side p { margin: 0 0 5px; font-size: 12px; color: #d9d2ee; }
.pay-qr-side ol { margin: 0; padding-left: 16px; font-size: 11px; line-height: 1.65; color: var(--dim); }
.modal-foot { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; padding: 0 16px 16px; }
.wait-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 26px; z-index: 45;
  padding: 11px 18px; border-radius: 999px; font-size: 12.5px; color: #fff;
  background: rgba(20, 8, 30, .92); border: 1px solid rgba(255, 210, 63, .5);
  box-shadow: 0 0 26px rgba(255, 210, 63, .22); max-width: 92vw; text-align: center; }
.toast { position: fixed; left: 50%; top: 70px; transform: translate(-50%, -8px); z-index: 55;
  padding: 10px 16px; border-radius: 999px; font-size: 12.5px; color: #fff; opacity: 0; pointer-events: none;
  background: rgba(16, 10, 26, .92); border: 1px solid rgba(56, 232, 255, .4);
  transition: opacity .25s, transform .25s; max-width: 90vw; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.win { border-color: rgba(255, 47, 160, .7); box-shadow: 0 0 30px rgba(255, 47, 160, .3); }

/* ── 모바일 ───────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .entry-body { grid-template-columns: 1fr; gap: 12px; }
  .preview-wrap { min-height: 210px; max-height: 240px; }
  .entry-title { font-size: 19px; }
  .dance-bar { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 118px); max-width: 88vw; left: auto; right: 12px; transform: none; }
  .now-playing { bottom: auto; top: max(14px, env(safe-area-inset-top)); left: 12px; font-size: 11px; max-width: calc(100vw - 120px); }
  .ctx-bar { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 130px); }
  .panel { width: 100vw; }
}

/* ── 입장 게이트 안내 (35세 이상 자제) ─────────────────────────────── */
.gate { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 12px;
  background: linear-gradient(100deg, rgba(255, 210, 63, .10), rgba(255, 47, 160, .08));
  border: 1px solid rgba(255, 210, 63, .38); }
.gate-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 7px; font-size: 10px; font-weight: 800;
  letter-spacing: .16em; color: #0a0711; background: linear-gradient(100deg, #ffd23f, #ff9d3f); }
.gate-txt b { display: block; font-size: 13px; color: #ffe9a8; letter-spacing: -.01em; }
.gate-txt span { display: block; margin-top: 3px; font-size: 11px; line-height: 1.5; color: #b9aed6; }

/* ── DJ 한마디 ────────────────────────────────────────────────────── */
.dj-line { position: fixed; left: 50%; transform: translate(-50%, 6px); bottom: calc(max(16px, env(safe-area-inset-bottom)) + 132px);
  z-index: 21; padding: 8px 15px; border-radius: 999px; font-size: 12.5px; color: #fff; opacity: 0;
  background: rgba(12, 7, 22, .88); border: 1px solid rgba(56, 232, 255, .55);
  box-shadow: 0 0 26px rgba(56, 232, 255, .18); transition: opacity .25s, transform .25s;
  pointer-events: none; max-width: 90vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dj-line.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  .dj-line { bottom: calc(max(12px, env(safe-area-inset-bottom)) + 190px); font-size: 11.5px; }
}
