/* Hythm Players — one look for video, motion, sites and audio. Dark glass that also fits the light theme. */
.hp { --hp-bg: #0d0f17; --hp-bar: rgba(16,18,28,.92); --hp-line: rgba(255,255,255,.1); --hp-text: #eef0f7; --hp-muted: rgba(160,166,190,.45); --hp-accent: #3b82f6;
  position: relative; display: flex; flex-direction: column; width: 100%; border-radius: 18px; overflow: hidden; background: var(--hp-bg); color: var(--hp-text); border: 1px solid var(--hp-line);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.6); font: 13px/1.4 system-ui, "Segoe UI", sans-serif; outline: none; }
.hp:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--hp-accent) 50%, transparent); }
.hp-title { padding: 10px 14px; font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--hp-line); }
.hp-stage { position: relative; display: grid; place-items: center; background: #000; }
.hp-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--hp-bar); border-top: 1px solid var(--hp-line); direction: ltr; }
.hp-b { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--hp-text); cursor: pointer; transition: background .15s; }
.hp-b:hover { background: rgba(255,255,255,.08); } .hp-b svg { width: 19px; height: 19px; }
.hp-time { flex: none; font: 600 12px ui-monospace, "JetBrains Mono", monospace; color: rgba(238,240,247,.8); min-width: 84px; text-align: center; }
.hp-scrub { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.hp-scrub::before, .hp-scrub u, .hp-scrub i { content: ""; position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; }
.hp-scrub::before { right: 0; background: var(--hp-muted); } .hp-scrub u { background: rgba(255,255,255,.28); width: 0; } .hp-scrub i { background: var(--hp-accent); width: 0; }
.hp-scrub b { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.5); transform: scale(0); transition: transform .15s; }
.hp-scrub:hover b, .hp:focus-within .hp-scrub b { transform: scale(1); }
.hp-scrub:hover::before, .hp-scrub:hover u, .hp-scrub:hover i { height: 6px; margin-top: -3px; }
.hp-speed { flex: none; height: 30px; border: 1px solid var(--hp-line); background: transparent; color: var(--hp-text); border-radius: 8px; padding: 0 6px; font: inherit; font-size: 12px; cursor: pointer; }
.hp-speed option { color: #000; }
.hp-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: rgba(255,255,255,.06); gap: 2px; flex: none; }
.hp-seg button { border: 0; background: transparent; color: rgba(238,240,247,.7); border-radius: 7px; padding: 5px 9px; font: 600 11.5px ui-monospace, monospace; cursor: pointer; display: grid; place-items: center; }
.hp-seg button svg { width: 17px; height: 17px; } .hp-seg button.on { background: var(--hp-accent); color: #fff; }
.hp-sp { flex: 1; } .hp-size { font: 11.5px ui-monospace, monospace; color: rgba(238,240,247,.55); }

/* video */
.hp-video video { width: 100%; max-height: 72vh; display: block; background: #000; cursor: pointer; }
.hp-big { position: absolute; width: 74px; height: 74px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(12,14,22,.6); color: #fff; backdrop-filter: blur(8px); cursor: pointer; transition: transform .2s, opacity .2s; }
.hp-big svg { width: 32px; height: 32px; margin-left: 4px; } .hp-big:hover { transform: scale(1.06); }
.hp.playing .hp-big { opacity: 0; pointer-events: none; }
.hp-video.idle .hp-bar { opacity: 0; } .hp-video .hp-bar { transition: opacity .3s; }
.hp-video.idle { cursor: none; }

/* motion */
.hp-motion .hp-stage { background: radial-gradient(circle at 50% 40%, #1a1f33, #07080d); padding: 14px; }
.hp-frame { position: relative; width: 100%; aspect-ratio: 16/9; max-height: 70vh; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.55); transition: aspect-ratio .3s, width .3s; background: #000; }
.hp-frame[data-f="9:16"] { aspect-ratio: 9/16; width: auto; height: min(70vh, 640px); } .hp-frame[data-f="1:1"] { aspect-ratio: 1; width: auto; height: min(70vh, 560px); } .hp-frame[data-f="4:5"] { aspect-ratio: 4/5; width: auto; height: min(70vh, 600px); }
.hp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* site */
.hp-site .hp-stage { background: repeating-conic-gradient(#11131c 0 25%, #0d0f17 0 50%) 0 0 / 22px 22px; padding: 16px; min-height: 420px; }
.hp-device { display: flex; flex-direction: column; width: 100%; height: 62vh; max-height: 760px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.5); transition: width .35s cubic-bezier(.2,.7,.2,1), height .35s; }
.hp-device[data-d="tab"] { width: min(100%, 560px); height: min(62vh, 760px); border-radius: 22px; }
.hp-device[data-d="phone"] { width: min(100%, 320px); height: min(62vh, 660px); border-radius: 30px; border: 8px solid #0b0d16; }
.hp-device[data-d="phone"] .hp-chrome, .hp-device[data-d="tab"] .hp-chrome { display: none; }
.hp-chrome { flex: none; display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: #eef0f5; }
.hp-chrome i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .hp-chrome i:nth-child(2) { background: #febc2e; } .hp-chrome i:nth-child(3) { background: #28c840; }
.hp-url { margin-left: 10px; flex: 1; max-width: 420px; height: 22px; display: flex; align-items: center; padding: 0 12px; border-radius: 11px; background: #fff; color: #6b7280; font-size: 11.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; direction: ltr; }
.hp-device iframe { flex: 1; width: 100%; border: 0; background: #fff; }
.hp-codeview { position: absolute; inset: 12px; margin: 0; padding: 14px; overflow: auto; border-radius: 12px; background: rgba(8,10,16,.96); color: #c9d1e9; font: 12.5px/1.6 ui-monospace, "JetBrains Mono", monospace; white-space: pre; }

/* audio */
.hp-audio { flex-direction: column; }
.hp-audio .hp-stage { display: block; background: var(--hp-bg); }
.hp-aud { display: flex; align-items: center; gap: 14px; padding: 14px 16px 8px; }
.hp-round { width: 50px !important; height: 50px !important; border-radius: 50% !important; background: var(--hp-accent) !important; color: #fff !important; }
.hp-round svg { width: 24px !important; height: 24px !important; }
.hp-wave-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.hp-atitle { font-weight: 700; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-wave { width: 100%; height: 48px; cursor: pointer; display: block; }
.hp-arow { display: flex; justify-content: space-between; font: 11.5px ui-monospace, monospace; color: rgba(238,240,247,.6); }
.hp-audio .hp-bar { justify-content: flex-end; padding: 4px 10px 8px; background: transparent; border-top: 0; }

/* light theme */
html[data-theme="light"] .hp { --hp-bg: #ffffff; --hp-bar: rgba(246,247,251,.95); --hp-line: rgba(15,18,34,.1); --hp-text: #0f1222; --hp-muted: rgba(15,18,34,.18); }
html[data-theme="light"] .hp-b:hover { background: rgba(15,18,34,.06); } html[data-theme="light"] .hp-time, html[data-theme="light"] .hp-arow { color: rgba(15,18,34,.7); }
html[data-theme="light"] .hp-seg { background: rgba(15,18,34,.06); } html[data-theme="light"] .hp-seg button { color: rgba(15,18,34,.7); }
html[data-theme="light"] .hp-scrub u { background: rgba(15,18,34,.2); }
@media (max-width: 600px) { .hp-bar { flex-wrap: wrap; } .hp-scrub { order: -1; flex-basis: 100%; } .hp-pip, .hp-size { display: none; } }
@media (prefers-reduced-motion: reduce) { .hp *, .hp { transition: none !important; } }
