Files
ytplayer/frontend/fullscreen-orientation.css
2026-10-06 02:32:43 +08:00

68 lines
4.0 KiB
CSS

/* Shared fullscreen surface; inline player styling is unchanged. */
.orientation-fullscreen .fullscreen-hud[hidden] { display: none; }
.orientation-fullscreen .fullscreen-hud {
--hud-glass: color-mix(in srgb, var(--bg-1, #111) 74%, transparent);
--hud-ink: var(--text, #fff);
--hud-line: color-mix(in srgb, var(--line, #fff) 32%, transparent);
position: absolute; z-index: 20;
right: max(12px, env(safe-area-inset-right));
bottom: max(12px, env(safe-area-inset-bottom));
left: max(12px, env(safe-area-inset-left));
display: flex; align-items: center; gap: 6px;
padding: 5px; border: 1px solid var(--hud-line); border-radius: 999px;
background: var(--hud-glass); color: var(--hud-ink);
-webkit-backdrop-filter: saturate(150%) blur(18px);
backdrop-filter: saturate(150%) blur(18px);
box-shadow: 0 8px 28px rgb(0 0 0 / .2);
opacity: 1; transition: opacity .22s ease;
}
.orientation-fullscreen .fullscreen-hud.hud-hidden { opacity: 0; pointer-events: none; }
.fullscreen-hud button {
display: grid; place-items: center; flex: none;
width: 48px; min-width: 48px; height: 48px; min-height: 48px; padding: 0;
border: 1px solid transparent; border-radius: 50%;
background: color-mix(in srgb, var(--hud-ink, #fff) 10%, transparent);
color: var(--hud-ink, #fff); font: inherit; cursor: pointer;
-webkit-tap-highlight-color: transparent;
}
.fullscreen-hud button:hover { background: color-mix(in srgb, var(--hud-ink, #fff) 18%, transparent); }
.fullscreen-hud button:active { transform: scale(.94); }
.fullscreen-hud button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fullscreen-hud button .fill { fill: currentColor; stroke: none; }
.fullscreen-hud button:focus-visible { outline: 2px solid var(--accent, #fff); outline-offset: 2px; }
.fullscreen-hud input { min-width: 40px; min-height: 44px; height: 44px; flex: 1; margin: 0 4px; accent-color: var(--accent, #fff); touch-action: none; }
.player-stage.orientation-fullscreen { background: #000; }
.player-stage.orientation-overlay {
position: fixed !important; z-index: 10000 !important; inset: 0 !important;
width: 100dvw !important; height: 100dvh !important;
min-width: 0 !important; min-height: 0 !important;
max-width: none !important; max-height: none !important;
aspect-ratio: auto !important; margin: 0 !important; padding: 0 !important;
border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
.player-stage.orientation-overlay[data-fullscreen-rotation="90"],
.player-stage.orientation-overlay[data-fullscreen-rotation="-90"] {
inset: auto !important; left: 50% !important; top: 50% !important;
width: 100dvh !important; height: 100dvw !important;
transform: translate(-50%, -50%) rotate(90deg) !important;
}
.player-stage.orientation-overlay[data-fullscreen-rotation="-90"] { transform: translate(-50%, -50%) rotate(-90deg) !important; }
.orientation-fullscreen video {
flex: none !important; width: 100% !important; height: 100% !important;
max-width: none !important; max-height: none !important; object-fit: contain;
}
.orientation-fullscreen #stgOverlay { display: none !important; }
.orientation-overlay[data-fullscreen-rotation="90"] .fullscreen-hud {
bottom: max(12px, env(safe-area-inset-left)); left: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-bottom));
}
.orientation-overlay[data-fullscreen-rotation="-90"] .fullscreen-hud {
bottom: max(12px, env(safe-area-inset-right)); left: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-top));
}
@media (max-width: 460px) {
.orientation-fullscreen .fullscreen-hud { gap: 2px; padding: 3px; }
.fullscreen-hud button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; }
}
/* Raise existing ancestry instead of moving a playing video in WebKit. */
body.landscape-fs .orientation-ancestor { z-index: 10001 !important; transform: none !important; filter: none !important; overflow: visible !important; }
body.landscape-fs { overflow: hidden; }