.qfo-player-shell {
    --qfo-player-accent: #7466ff;
    --qfo-player-muted: #777;
    width: calc(100% - 32px);
    min-width: 0;
    margin: 0 auto 24px;
    color: inherit;
    font-family: inherit;
}

@media (min-width: 992px) {
    .qfo-player-shell {
        width: calc((100% - 32px) * 2 / 3);
    }
}

.qfo-player-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid rgba(128, 128, 128, .25);
    border-radius: 12px;
    background: #080808;
    isolation: isolate;
}

.qfo-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #080808;
}

.qfo-player .art-video-player {
    --art-theme: var(--qfo-player-accent);
    --art-progress-color: rgba(255, 255, 255, .18);
    --art-loaded-color: #8b93a6;
    font-family: inherit;
}

.qfo-player .art-progress-played {
    background-image: linear-gradient(90deg, #465fe0, #7745c7);
}

.qfo-player .art-control-qfo-quality {
    flex-shrink: 1;
    min-width: 0;
    padding: 0 4px;
}

.qfo-player .qfo-quality-select {
    display: block;
    width: 110px;
    max-width: 100%;
    min-width: 0;
    height: 30px;
    margin: 0;
    padding: 0 4px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 7px;
    color: #fff;
    background: rgba(25, 25, 30, .68);
    font: inherit;
    font-size: 12px;
    line-height: normal;
    text-overflow: ellipsis;
    cursor: pointer;
    color-scheme: dark;
}

.qfo-player .qfo-quality-select:focus-visible {
    outline: 2px solid #a99bff;
    outline-offset: 2px;
}

.qfo-player .qfo-quality-select option {
    color: #fff;
    background: #202026;
}

@media (max-width: 600px) {
    .qfo-player .qfo-quality-select { width: 76px; }
    .qfo-player .art-control-qfo-quality { padding: 0 2px; }
}

.qfo-player .art-poster {
    display: none !important;
    background-image: none !important;
}

.qfo-player .art-video {
    object-fit: contain;
}

.qfo-player-poster {
    display: none;
    position: absolute;
    z-index: 1;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.qfo-player-shell:is([data-qfo-state="login"], [data-qfo-state="locked"], [data-qfo-state="loading"], [data-qfo-state="error"]) .qfo-player-poster:not([hidden]) {
    display: block;
}

@media (max-width: 480px) {
    .qfo-player .art-control-volume,
    .qfo-player .art-control-fullscreenWeb { display: none !important; }
    .qfo-player .art-controls { padding-right: 8px; padding-left: 8px; }
    .qfo-player .art-video-player .art-controls .art-control { min-width: 26px; padding: 0 2px; }
    .qfo-player .art-controls .art-control-time { font-size: 11px; }
    .qfo-player .art-control-playAndPause,
    .qfo-player .art-control-setting,
    .qfo-player .art-control-fullscreen { width: 32px !important; min-width: 32px !important; }
    .qfo-player .qfo-quality-select { width: 70px; }
}

.qfo-player-gate {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 24px;
    overflow: auto;
    box-sizing: border-box;
    text-align: center;
    color: #f5f5f5;
    background: linear-gradient(180deg, rgba(8, 8, 8, .88), #080808);
}

.qfo-player-gate[hidden],
.qfo-player-gate [hidden] {
    display: none !important;
}

.qfo-player-gate-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: inherit;
    width: 100%;
    min-width: 0;
    margin: auto 0;
    flex-shrink: 0;
}

.qfo-player-gate-content > * {
    flex-shrink: 0;
}

.qfo-player-gate .qfo-gate-title {
    max-width: 100%;
    margin: 0;
    color: #fff;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qfo-gate-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 4px 0 0;
}

.qfo-player-shell[data-qfo-state="login"] .qfo-player-gate {
    background: linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .64) 40%, rgba(0, 0, 0, .64) 60%, rgba(0, 0, 0, .3));
}

.qfo-player-shell[data-qfo-state="login"] .qfo-gate-title {
    margin: 0;
    text-shadow: 0 1px 4px #000;
}

.qfo-player-gate .qfo-gate-actions > a,
.qfo-player-gate .qfo-gate-actions > button,
.qfo-player-gate [data-qfo-retry] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid #555;
    border-radius: 8px;
    background: #202020;
    color: #f5f5f5;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.qfo-player-gate .qfo-gate-actions > .qfo-gate-primary,
.qfo-player-gate .qfo-gate-actions > .qfo-player-login {
    border-color: rgba(154, 176, 255, .65);
    background: linear-gradient(115deg, #465fe0, #7745c7);
    color: #fff;
    box-shadow: 0 4px 16px rgba(89, 76, 187, .18);
}

.qfo-player-gate .qfo-gate-actions > .qfo-gate-primary:hover,
.qfo-player-gate .qfo-gate-actions > .qfo-player-login:hover {
    background: linear-gradient(115deg, #3c52c8, #6536b3);
    filter: none;
}

.qfo-player-gate a:hover,
.qfo-player-gate button:hover {
    filter: brightness(1.1);
}

.qfo-player-shell button:disabled,
.qfo-player-shell [aria-disabled="true"] {
    opacity: .55;
    cursor: wait;
}

.qfo-player-shell a:focus-visible,
.qfo-player-shell button:focus-visible {
    outline: 2px solid var(--qfo-player-accent);
    outline-offset: 3px;
}

.qfo-player-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.qfo-player-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
}

.qfo-player-shell .qfo-episode-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    min-width: 80px;
    max-width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f5f5f7;
    color: #252525;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
    cursor: pointer;
}

.qfo-player-shell .qfo-episode-button:hover {
    border-color: #a8a8b3;
    background: #ededf2;
}

[data-bs-theme="dark"] .qfo-player-shell {
    --qfo-player-muted: #aaa;
}

[data-bs-theme="dark"] .qfo-player-shell .qfo-episode-button {
    border-color: #404040;
    background: #1c1c1e;
    color: #eee;
}

[data-bs-theme="dark"] .qfo-player-shell .qfo-episode-button:hover {
    border-color: #62626a;
    background: #2c2c2e;
}

.qfo-player-shell .qfo-episode-button[aria-pressed="true"],
[data-bs-theme="dark"] .qfo-player-shell .qfo-episode-button[aria-pressed="true"] {
    border-color: rgba(154, 176, 255, .65);
    background: linear-gradient(115deg, #465fe0, #7745c7);
    color: #fff;
    box-shadow: 0 4px 16px rgba(89, 76, 187, .18);
}

.qfo-player-shell .qfo-episode-button[aria-pressed="true"]:hover,
[data-bs-theme="dark"] .qfo-player-shell .qfo-episode-button[aria-pressed="true"]:hover {
    background: linear-gradient(115deg, #3c52c8, #6536b3);
}

@media (max-width: 600px) {
    .qfo-player-shell { width: calc(100% - 24px); }
    .qfo-player-stage { border-radius: 8px; }
    .qfo-player-gate { gap: 8px; padding: 12px; }
    .qfo-gate-actions { gap: 8px; margin-top: 2px; }
    .qfo-player-gate .qfo-gate-actions > a,
    .qfo-player-gate .qfo-gate-actions > button,
    .qfo-player-gate [data-qfo-retry] { min-height: 36px; padding: 7px 12px; font-size: 13px; }
}

