/* URILIVE 공통 화면 다듬기: 각 페이지의 기본 스타일 뒤에 불러와 모양만 바꿔요 (기능 변경 없음) */
@font-face { font-family: "Pretendard"; src: local("Pretendard Variable"), local("Pretendard"), url("/fonts/PretendardVariable.woff2") format("woff2-variations"); font-weight: 45 920; font-display: swap; }
:root {
  --r: 14px; --accent2: #5b6cff; --grad: linear-gradient(135deg, #ff4d6d, #ff8a5a); --ease: cubic-bezier(.2, .7, .2, 1);
  --sh: 0 1px 2px rgba(20, 24, 40, .06), 0 6px 18px rgba(20, 24, 40, .08); --sh-hi: 0 2px 4px rgba(20, 24, 40, .08), 0 14px 30px rgba(20, 24, 40, .16);
  --ring: color-mix(in srgb, var(--accent) 24%, transparent);
}
body { font-family: "Pretendard", "Noto Sans KR", system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--sub) 45%, transparent) transparent; }

/* 상단 바 */
header { background: color-mix(in srgb, var(--panel) 90%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.logo em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 버튼·입력 */
button, .btn, a.btn { transition: background .15s, transform .1s var(--ease), box-shadow .15s, filter .15s, border-color .15s, color .15s; }
button:not(:disabled):active, .btn:active { transform: scale(.97); }
#userbox button.primary, button.primary, .btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
#userbox button.primary:hover, button.primary:hover:not(:disabled), .btn.primary:hover { filter: brightness(1.06); }
input:focus, select:focus, textarea:focus, #search input:focus, #msg:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--ring); outline: none; }
dialog { border-radius: 16px; box-shadow: 0 24px 64px rgba(0, 0, 0, .35); border-color: transparent; }
dialog::backdrop { background: rgba(10, 12, 20, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.box { border-radius: var(--r); box-shadow: var(--sh); border-color: transparent !important; }

/* 메인: 구역 제목·배너·카드 */
.sec h3::before { content: ""; display: inline-block; width: 4px; height: 18px; margin-right: 9px; border-radius: 2px; background: var(--grad); vertical-align: -2px; }
#banner { box-shadow: var(--sh); }
.card .thumb { border-radius: var(--r); box-shadow: var(--sh); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.card:not(.off):hover .thumb { transform: translateY(-3px); box-shadow: var(--sh-hi); }
.card .thumb img { transition: transform .35s var(--ease); }
.thumb .badge:not(.off):not(.yt):not(.a19)::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: #fff; vertical-align: 1px; animation: uriPulse 1.5s ease-in-out infinite; }
.view { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.info .t { letter-spacing: -.02em; }
.card .info .n { display: flex; align-items: center; }
.empty::before { content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 14px; background: url(/logo.svg) center / contain no-repeat; opacity: .5; }
main { animation: uriFade .3s var(--ease); }

/* 불러오는 중 회색 틀 */
.skel .thumb { background: linear-gradient(100deg, var(--hover) 30%, color-mix(in srgb, var(--hover) 55%, var(--panel)) 50%, var(--hover) 70%); background-size: 220% 100%; animation: uriShimmer 1.3s linear infinite; box-shadow: none; }
.skel .bar { height: 12px; border-radius: 6px; margin-top: 10px; background: var(--hover); } .skel .bar.s { width: 55%; height: 10px; }

/* 시청 화면: 채팅·방송 정보·영상 */
video { box-shadow: none; }
#info { box-shadow: var(--sh); position: relative; z-index: 1; }
#info .act { transition: background .15s, transform .1s var(--ease), border-color .15s; }
#chat { box-shadow: -1px 0 0 var(--line); }
#log > div { border-radius: 10px; }
#log > div + div { margin-top: 1px; }
#log .sys { font-style: normal; opacity: .75; padding: 6px 10px; margin: 3px 0; border-radius: 10px; background: color-mix(in srgb, var(--accent2) 10%, transparent); font-size: .92em; }
#form { background: var(--panel); }
#msg { background: var(--bg); }
#send { background: var(--grad); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent); }
#stBox { box-shadow: var(--sh); border-color: transparent !important; border-radius: var(--r) !important; }
.rc .th { border-radius: 12px; box-shadow: var(--sh); transition: transform .22s var(--ease), box-shadow .22s var(--ease); outline: 0 !important; }
.rc:hover .th { transform: translateY(-3px); box-shadow: var(--sh-hi); }
#toast { box-shadow: 0 8px 24px rgba(0, 0, 0, .3); animation: uriToast .25s var(--ease); }

/* 모바일 하단 탭 바 */
#tabbar { display: none; }
@media (max-width: 760px) {
  #tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 18; height: calc(58px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); background: color-mix(in srgb, var(--panel) 92%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-top: 1px solid var(--line); }
  #tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 44px; border: 0; background: none; color: var(--sub); font-size: 11px; font-weight: 600; border-radius: 12px; position: relative; }
  #tabbar button svg { width: 24px; height: 24px; }
  #tabbar button.on { color: var(--accent); }
  #tabbar button.on::before { content: ""; position: absolute; top: 0; width: 22px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad); }
  #tabbar .dot::after { content: ""; position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--panel); }
  body.hasTabbar main { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  body.hasTabbar #side { bottom: calc(58px + env(safe-area-inset-bottom)); }
  body.hasTabbar .foot { margin-bottom: 20px; }
  .btn:not(.sm), header button { min-height: 36px; }
}

@keyframes uriPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }
@keyframes uriFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes uriShimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes uriToast { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
