.thali-player {
    --thali-cvp-accent: #e11d48;
    --thali-cvp-controls-bg: rgba(10, 10, 12, .88);
    --thali-cvp-controls-fg: #fff;
    --thali-cvp-muted: rgba(255, 255, 255, .72);
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    background: #000;
    color: #fff;
    line-height: 1.2;
    isolation: isolate;
    border-radius: 2px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.thali-player * { box-sizing: border-box; }
.thali-player--youtube { aspect-ratio: 16 / 9; }
.thali-player--youtube > iframe,
.thali-player--youtube .thali-player-media-frame {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}
.thali-player--html5 > video,
.thali-player--html5 > .thali-player-media-frame > video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    background: #000;
}
.thali-player--html5 .thali-player-media-frame { display: block; width: 100%; }
.thali-player--light {
    --thali-cvp-controls-bg: rgba(255, 255, 255, .94);
    --thali-cvp-controls-fg: #151515;
    --thali-cvp-muted: rgba(21, 21, 21, .72);
}
.thali-player:focus { outline: 2px solid var(--thali-cvp-accent); outline-offset: 3px; }
.thali-player iframe { pointer-events: none; }
.thali-player .thali-center-play {
    position: absolute;
    z-index: 5;
    top: 50%;
    left: 50%;
    display: grid;
    width: clamp(52px, 8vw, 76px);
    height: clamp(52px, 8vw, 76px);
    padding: 0;
    place-items: center;
    transform: translate(-50%, -50%);
    color: #fff;
    background: var(--thali-cvp-accent);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .36);
    cursor: pointer;
    transition: transform .16s ease, opacity .16s ease;
}
.thali-player .thali-center-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.thali-player .thali-center-play svg { width: 32%; height: 32%; fill: currentColor; }
.thali-player.is-playing .thali-center-play { opacity: 0; pointer-events: none; }
.thali-player .thali-controls {
    position: absolute;
    z-index: 7;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    gap: clamp(4px, .7vw, 10px);
    min-height: 48px;
    padding: 10px clamp(8px, 1.5vw, 18px) 8px;
    color: var(--thali-cvp-controls-fg);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--thali-cvp-controls-bg) 30%);
    transition: opacity .22s ease;
}
.thali-player--light .thali-controls { background: linear-gradient(180deg, transparent, var(--thali-cvp-controls-bg) 30%); }
.thali-player[data-autohide="1"].is-playing:not(:hover):not(:focus-within) .thali-controls { opacity: 0; pointer-events: none; }
.thali-player .thali-control-button {
    display: inline-grid;
    flex: 0 0 auto;
    min-width: 30px;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 5px;
    color: var(--thali-cvp-controls-fg);
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.thali-player .thali-control-button:hover,
.thali-player .thali-control-button:focus-visible { background: rgba(127, 127, 127, .28); outline: none; }
.thali-player .thali-control-button svg { display: block; width: 19px; height: 19px; fill: currentColor; }
.thali-player .thali-skip-button { font-size: 10px; width: 31px; }
.thali-player .thali-skip-button svg { width: 23px; height: 23px; }
.thali-player .thali-time {
    flex: 0 0 auto;
    white-space: nowrap;
    color: var(--thali-cvp-controls-fg);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    user-select: none;
}
.thali-player .thali-time-current { margin-left: 1px; }
.thali-player .thali-progress {
    flex: 1 1 auto;
    min-width: 36px;
    width: 100%;
    height: 18px;
    margin: 0 2px;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background: transparent;
    accent-color: var(--thali-cvp-accent);
}
.thali-player .thali-progress::-webkit-slider-runnable-track { height: 4px; border-radius: 6px; background: linear-gradient(to right, var(--thali-cvp-accent) 0 var(--thali-progress, 0%), rgba(255,255,255,.42) var(--thali-progress, 0%) 100%); }
.thali-player--light .thali-progress::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--thali-cvp-accent) 0 var(--thali-progress, 0%), rgba(30,30,30,.28) var(--thali-progress, 0%) 100%); }
.thali-player .thali-progress::-moz-range-track { height: 4px; border-radius: 6px; background: rgba(150,150,150,.55); }
.thali-player .thali-progress::-moz-range-progress { height: 4px; border-radius: 6px; background: var(--thali-cvp-accent); }
.thali-player .thali-progress::-webkit-slider-thumb { width: 12px; height: 12px; margin-top: -4px; appearance: none; -webkit-appearance: none; border: 0; border-radius: 50%; background: var(--thali-cvp-accent); }
.thali-player .thali-progress::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: var(--thali-cvp-accent); }
.thali-player .thali-volume { width: clamp(48px, 7vw, 78px); height: 18px; margin: 0; padding: 0; accent-color: var(--thali-cvp-accent); cursor: pointer; }
.thali-player .thali-speed {
    max-width: 60px;
    height: 29px;
    padding: 0 3px;
    border: 0;
    border-radius: 4px;
    color: var(--thali-cvp-controls-fg);
    background: rgba(128,128,128,.18);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}
.thali-player .thali-speed option { color: #111; background: #fff; }
.thali-player .thali-cvp-status {
    position: absolute;
    z-index: 9;
    top: 10px;
    left: 10px;
    max-width: calc(100% - 20px);
    padding: 6px 10px;
    border-radius: 5px;
    color: #fff;
    background: rgba(0,0,0,.72);
    font-size: 12px;
}
.thali-player.is-error .thali-cvp-status { display: block; }
.thali-player .thali-control-button:disabled,
.thali-player .thali-speed:disabled { opacity: .45; cursor: not-allowed; }
.thali-player:fullscreen,
.thali-player:-webkit-full-screen { width: 100%; height: 100%; border-radius: 0; }
.thali-player:fullscreen.thali-player--html5 > video,
.thali-player:-webkit-full-screen.thali-player--html5 > video { width: 100%; height: 100%; object-fit: contain; }
.thali-player:fullscreen.thali-player--youtube,
.thali-player:-webkit-full-screen.thali-player--youtube { aspect-ratio: auto; }
.thali-player:fullscreen .thali-controls,
.thali-player:-webkit-full-screen .thali-controls { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.thali-player .thali-cvp-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 520px) {
    .thali-player .thali-controls { gap: 3px; min-height: 44px; padding: 8px 6px 7px; }
    .thali-player .thali-control-button { min-width: 27px; width: 27px; height: 29px; }
    .thali-player .thali-control-button svg { width: 17px; height: 17px; }
    .thali-player .thali-time { font-size: 10px; }
    .thali-player .thali-skip-button { width: 27px; font-size: 9px; }
    .thali-player .thali-volume { width: 42px; }
    .thali-player .thali-speed { max-width: 48px; height: 27px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .thali-player *, .thali-player *::before, .thali-player *::after { transition: none !important; scroll-behavior: auto !important; }
}
