/* player.css - the watch / embed page. The base (classic) first, then the designs: body.d-<design> (Manager > a
   stream > Player design). Every design uses the same elements (player.html) - only what is shown and how changes. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #000; color: #eee; font: 14px/1.4 "Segoe UI", system-ui, sans-serif; }
body.watch { display: flex; flex-direction: column; background: #0e1116; }
body.watch #stage { flex: 1 1 auto; min-height: 0; }
body.embed #info { display: none; }
#info { padding: 10px 16px; }
#title { margin: 0; font-size: 18px; font-weight: 600; }
#title small { font-size: 14px; font-weight: 400; color: #aab; margin-left: 8px; }
#desc { margin: 2px 0 0; color: #aab; font-size: 13px; }
#desc:empty { display: none; }
#stage { position: relative; width: 100%; height: 100%; background: #000; overflow: hidden; }
video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
#over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; pointer-events: none; text-align: center; padding: 16px; }
#over[hidden] { display: none; }
#msg { margin: 0; font-size: 16px; text-shadow: 0 1px 3px #000; max-width: 480px; }
#spin { width: 40px; height: 40px; border: 4px solid #fff3; border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
#spin[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
#unmute { position: absolute; top: 12px; left: 12px; background: #000b; color: #fff; border: 1px solid #fff5; border-radius: 20px; padding: 8px 14px; font: inherit; cursor: pointer; z-index: 3; }
#bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 18px 10px 8px; background: linear-gradient(transparent, #000c); opacity: 0; transition: opacity .25s; z-index: 2; }
#stage:hover #bar, #stage.idle-no #bar, #bar:focus-within { opacity: 1; }
#bar button { background: none; border: 0; color: #fff; font-size: 18px; width: 34px; height: 30px; cursor: pointer; border-radius: 4px; }
#bar button:hover { background: #fff2; }
#vol { width: 80px; accent-color: #fff; }
#live { background: #555; color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 3px; letter-spacing: .5px; }
#live.on { background: #e5484d; }
#how, #viewers { font-size: 12px; color: #ccc; }
#now { font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.grow { flex: 1; }
/* parts only some designs show */
#backdrop, #art, #eq, #side { display: none; }
@media (hover: none) { #bar { opacity: 1; } #vol { display: none; } }

/* ── Music: the artwork large, a soft blurred backdrop, the title and what plays now beside it ── */
body.d-music { background: #121014; }
body.d-music #backdrop { display: block; position: fixed; inset: -40px; background: radial-gradient(circle at 25% 30%, #b3264f 0, transparent 55%), radial-gradient(circle at 80% 70%, #3a2aa8 0, transparent 55%), #121014; filter: blur(40px); opacity: .7; z-index: 0; }
body.d-music.watch { flex-direction: row; align-items: center; justify-content: center; gap: 40px; padding: 32px; }
body.d-music #stage { position: relative; z-index: 1; flex: 0 0 auto; width: min(58vh, 46vw); height: min(58vh, 46vw); border-radius: 14px; box-shadow: 0 24px 60px #0009; background: #000; }
body.d-music video { object-fit: cover; }
body.d-music #art { display: flex; position: absolute; inset: 0; align-items: center; justify-content: center; background: linear-gradient(135deg, #e0466b, #6b3df0); }
body.d-music #art span { font-size: min(14vh, 11vw); font-weight: 700; color: #fff9; letter-spacing: -2px; }
body.d-music.playing-video #art { display: none; }
body.d-music #info { position: relative; z-index: 1; max-width: 420px; padding: 0; }
body.d-music #title { font-size: 34px; font-weight: 700; color: #fff; }
body.d-music #desc { font-size: 17px; color: #f4a3b8; margin-top: 8px; }
body.d-music #bar { opacity: 1; position: absolute; left: 12px; right: 12px; bottom: 12px; border-radius: 12px; padding: 8px 10px; background: #0007; backdrop-filter: blur(16px); }
body.d-music.embed #info { display: none; }
body.d-music.embed #stage { width: 100%; height: 100%; border-radius: 0; }
@media (max-width: 760px) { body.d-music.watch { flex-direction: column; gap: 20px; } body.d-music #stage { width: 80vw; height: 80vw; } body.d-music #info { text-align: center; } }

/* ── Tube: the picture on top, the title and the audience under it ── */
body.d-tube { background: #0f0f0f; }
body.d-tube.watch #stage { flex: 0 0 auto; height: auto; aspect-ratio: 16 / 9; max-height: 78vh; }
body.d-tube #info { padding: 14px 20px; }
body.d-tube #title { font-size: 20px; color: #f1f1f1; }
body.d-tube #desc { font-size: 14px; color: #aaa; margin-top: 6px; }
body.d-tube #bar { padding-top: 26px; }
body.d-tube #bar::before { content: ""; position: absolute; left: 10px; right: 10px; top: 12px; height: 3px; background: #ff2a2a; border-radius: 2px; }
body.d-tube #live.on { background: #ff2a2a; }
body.d-tube #vol { accent-color: #ff2a2a; }

/* ── Cinema: the picture edge to edge, a dark vignette, a big title ── */
body.d-cinema { background: #000; }
body.d-cinema #stage::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #000c 0, transparent 45%), linear-gradient(0deg, #000d 0, transparent 35%); pointer-events: none; z-index: 1; opacity: 1; transition: opacity .4s; }
body.d-cinema #stage:not(:hover)::after { opacity: .35; }
body.d-cinema.watch #info { position: absolute; left: 4vw; bottom: 14vh; z-index: 2; pointer-events: none; padding: 0; max-width: 46vw; }
body.d-cinema #title { font-size: clamp(28px, 5vw, 64px); font-weight: 800; letter-spacing: -1px; color: #fff; text-shadow: 0 2px 12px #000; }
body.d-cinema #desc { font-size: clamp(14px, 1.6vw, 20px); color: #ddd; margin-top: 10px; }
body.d-cinema #bar { padding: 24px 4vw 18px; gap: 14px; }
body.d-cinema #bar button { font-size: 24px; width: 46px; height: 42px; }
body.d-cinema #live.on { background: #c62828; }
body.d-cinema #vol { accent-color: #c62828; }

/* ── Audio: a compact sound-only player (radio, music, talk) - good for embedding in a small space ── */
body.d-audio, body.d-audio.watch { background: #1b1f27; display: flex; flex-direction: column; justify-content: center; align-items: center; }
body.d-audio #stage { width: min(460px, 100%); height: 150px; flex: 0 0 auto; border-radius: 14px; background: linear-gradient(180deg, #2a3140, #1c212c); border: 1px solid #3a4253; }
body.d-audio video { position: absolute; width: 1px; height: 1px; opacity: 0; }
body.d-audio #eq { display: flex; position: absolute; left: 18px; top: 22px; gap: 4px; align-items: flex-end; height: 44px; }
body.d-audio #eq i { width: 7px; height: 20%; background: #5ec8ff; border-radius: 2px; }
body.d-audio.playing #eq i { animation: eq 1s ease-in-out infinite; }
body.d-audio #eq i:nth-child(2) { animation-delay: -.6s; } body.d-audio #eq i:nth-child(3) { animation-delay: -.3s; }
body.d-audio #eq i:nth-child(4) { animation-delay: -.8s; } body.d-audio #eq i:nth-child(5) { animation-delay: -.45s; }
@keyframes eq { 0%, 100% { height: 18%; } 50% { height: 100%; } }
body.d-audio #info { display: block !important; position: static; width: min(460px, 100%); text-align: left; padding: 10px 4px; }
body.d-audio.embed #info { position: absolute; top: 18px; left: 76px; width: auto; padding: 0; }
body.d-audio #title { font-size: 16px; }
body.d-audio #bar { opacity: 1; background: none; padding: 10px 14px; }
body.d-audio #pip, body.d-audio #full { display: none; }
body.d-audio #unmute { left: auto; right: 12px; }
body.d-audio #over { justify-content: flex-start; padding-top: 70px; }
body.d-audio #msg { font-size: 13px; }

/* ── Archetype (after Expression Encoder's sleek template): the controls in a floating glass pill ── */
body.d-archetype { background: radial-gradient(circle at 50% 0, #22324a, #05070b 70%); }
body.d-archetype.watch #stage { margin: 2vh auto 0; width: min(96vw, 160vh); flex: 0 1 auto; aspect-ratio: 16 / 9; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px #ffffff1a, 0 20px 60px #000c; }
body.d-archetype #bar { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); border-radius: 999px; padding: 6px 14px; background: #0b0f16cc; border: 1px solid #ffffff22; backdrop-filter: blur(12px); min-width: 380px; }
body.d-archetype #info { text-align: center; }
body.d-archetype #title { font-weight: 300; font-size: 22px; letter-spacing: .5px; }

/* ── Expression (after Expression Encoder's framed template): steel title and control bars around the picture ── */
body.d-expression { background: #2b2f36; }
body.d-expression.watch { padding: 2vh 2vw; }
body.d-expression #info { order: -1; background: linear-gradient(#5b6370, #3c424c); border: 1px solid #6c7584; border-bottom: 0; border-radius: 8px 8px 0 0; padding: 6px 14px; }
body.d-expression #title { font-size: 15px; color: #f2f4f7; text-shadow: 0 1px 0 #0008; }
body.d-expression #desc { font-size: 12px; color: #cdd3dc; }
body.d-expression #stage { border-left: 1px solid #6c7584; border-right: 1px solid #6c7584; }
body.d-expression #bar { position: static; opacity: 1; background: linear-gradient(#4a515c, #2f343c); border: 1px solid #6c7584; border-top-color: #7d8696; border-radius: 0 0 8px 8px; padding: 6px 10px; }
body.d-expression.watch #stage { display: flex; flex-direction: column; }
body.d-expression.watch video { flex: 1; min-height: 0; }
body.d-expression #live.on { background: #2f7fd1; }

/* ── Graphing (after Expression Encoder's graphing template): the picture beside a live graph of what arrives ── */
body.d-graphing { background: #0b0e13; }
body.d-graphing.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-rows: minmax(0, 1fr) auto; }
body.d-graphing #stage { grid-column: 1; grid-row: 1; }
body.d-graphing #info { grid-column: 1; grid-row: 2; }
body.d-graphing #side { display: flex; flex-direction: column; gap: 12px; grid-column: 2; grid-row: 1 / span 2; padding: 16px; background: #10151d; border-left: 1px solid #1f2a38; }
body.d-graphing #graph { width: 100%; height: 160px; background: #0b1017; border: 1px solid #1f2a38; border-radius: 6px; }
body.d-graphing #stats { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: 13px; }
body.d-graphing #stats dt { color: #7d8ea3; }
body.d-graphing #stats dd { margin: 0; color: #e6edf5; font-variant-numeric: tabular-nums; }
body.d-graphing.embed { display: block; }
body.d-graphing.embed #side { display: none; }
@media (max-width: 760px) { body.d-graphing.watch { grid-template-columns: 1fr; } body.d-graphing #side { grid-column: 1; grid-row: 3; border-left: 0; } }

/* ── the station's logo (any design): the intro before the stream, the corner mark ── */
#brandIntro { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, #1b1f2e 0%, #000 70%); transition: opacity .7s ease; overflow: hidden; }
#brandIntro img { max-width: 42%; max-height: 42%; animation: brandIn 1.6s cubic-bezier(.2,.8,.2,1) both; filter: drop-shadow(0 10px 40px rgba(0,0,0,.6)); }
#brandIntro::after { content: ""; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.18), transparent); animation: brandShine 1.6s .6s ease-in-out both; }
#brandIntro p { color: rgba(255,255,255,.6); font: 13px system-ui, sans-serif; margin-top: 18px; }
#brandIntro.out { opacity: 0; }
@keyframes brandIn { 0% { opacity: 0; transform: scale(.72); letter-spacing: 0; } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }
@keyframes brandShine { 0% { left: -40%; } 100% { left: 120%; } }
#brandMark { position: absolute; z-index: 20; width: 9%; min-width: 48px; max-width: 160px; opacity: .78; pointer-events: none; }
#brandMark.pos-tr { top: 3%; right: 2.5%; } #brandMark.pos-tl { top: 3%; left: 2.5%; }
#brandMark.pos-br { bottom: 12%; right: 2.5%; } #brandMark.pos-bl { bottom: 12%; left: 2.5%; }
