.video-shell {
width: 100%;
margin: auto;
max-width: 700px;
aspect-ratio: 16 / 9;
border-radius: 20px;
overflow: hidden;
position: relative;
/* margin-bottom: 26px; */
background: rgba(0, 0, 0, 0.3);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.15);
box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(0, 248, 255, 0.15);
}
.video-inner {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(135deg, #00aeff 0%, #00f8ff 100%);
}
.video-shell video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
opacity: 0;
transition: opacity 0.3s ease;
cursor: pointer;
}
@keyframes shimmer {
0% {
transform: translateX(-150%) translateY(-150%) rotate(45deg);
opacity: 0;
}
15% {
opacity: 1;
}
85% {
opacity: 1;
}
100% {
transform: translateX(350%) translateY(350%) rotate(45deg);
opacity: 0;
}
}
@keyframes shimmerGlow {
0% {
opacity: 0;
}
50% {
opacity: 0.6;
}
100% {
opacity: 0;
}
}
.play-btn {
position: absolute;
width: clamp(80px, 9vw, 100px);
height: clamp(80px, 9vw, 100px);
border: none;
background-color: transparent!important;
padding: 0;
cursor: pointer;
z-index: 2;
}
.play-glow {
position: absolute;
inset: 0;
border-radius: 50%;
background: radial-gradient(circle, rgba(0, 248, 255, 0.3) 0%, rgba(0, 174, 255, 0.15) 50%, transparent 70%);
filter: blur(8px);
transition: transform 0.3s ease;
}
.play-btn:hover .play-glow {
transform: scale(1.1);
}
.play-inner {
position: absolute;
inset: 0;
border-radius: 50%;
overflow: hidden;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.25) 100%);
backdrop-filter: blur(10px);
border: 2px solid rgba(255, 255, 255, 0.5);
box-shadow:
inset 0 2px 8px rgba(255, 255, 255, 0.5),
inset 0 -2px 6px rgba(0, 77, 137, 0.15),
0 4px 20px rgba(0, 174, 255, 0.3),
0 8px 40px rgba(0, 248, 255, 0.2),
0 0 60px rgba(0, 248, 255, 0.15);
transition: transform 0.3s ease;
}
.play-btn:hover .play-inner {
transform: scale(1.05);
}
.play-shimmer {
position: absolute;
inset: 0;
width: 60px;
height: 200%;
background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 25%, #fff 50%, rgba(255, 255, 255, 0.1) 75%, transparent 100%);
filter: blur(1px);
pointer-events: none;
animation: shimmer 4s ease-in-out infinite;
}
.play-shimmer-glow {
position: absolute;
inset: 0;
border-radius: 50%;
background: radial-gradient(circle, rgba(0, 248, 255, 0.4) 0%, transparent 70%);
pointer-events: none;
animation: shimmerGlow 4s ease-in-out infinite;
}
.play-highlight {
position: absolute;
inset: 0;
border-radius: 50%;
background-color: radial-gradient(circle at 30% 30%, rgba(0, 248, 255, 0.15) 0%, transparent 60%) !important;
}
.play-icon-wrap {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
transition: transform 0.3s ease;
}
.play-btn:hover .play-icon-wrap {
transform: scale(1.1);
}
.play-icon {
width: 0;
height: 0;
border-left: clamp(18px, 2vw, 22px) solid #004d89;
border-top: clamp(12px, 1.4vw, 15px) solid transparent;
border-bottom: clamp(12px, 1.4vw, 15px) solid transparent;
margin-left: clamp(3px, 0.4vw, 4px);
filter: drop-shadow(0 2px 4px rgba(0, 77, 137, 0.3));
}
.play-outer-glow {
position: absolute;
inset: -3px;
border-radius: 50%;
background: linear-gradient(135deg, rgba(0, 248, 255, 0.6), rgba(0, 174, 255, 0.4));
filter: blur(2px);
opacity: 0.6;
pointer-events: none;
transition: inset 0.3s ease;
}
.play-btn:hover .play-outer-glow {
inset: -5px;
}
.fullscreen-btn {
position: absolute;
bottom: 10px;
right: 10px;
z-index: 3;
width: 32px !important;
height: 32px !important;
border: none !important;
background-color: rgba(0, 0, 0, 0.45) !important;
border-radius: 6px !important;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.2s ease, background 0.2s ease;
padding: 0 !important;
}
.video-shell:hover .fullscreen-btn {
opacity: 1;
}
.fullscreen-btn:hover {
background-color: rgba(0, 248, 255, 0.3) !important;
}
.fullscreen-btn svg {
width: 16px;
height: 16px;
stroke: #fff;
}
const video = document.getElementById("promoVideo");
const playButton = document.getElementById("playButton");
const videoPoster = document.getElementById("videoPoster");
async function togglePlay() {
try {
if (video.paused || video.ended) {
await video.play();
} else {
video.pause();
}
} catch (err) {
console.error("Video playback blocked:", err);
}
}
playButton.addEventListener("click", togglePlay);
video.addEventListener("click", togglePlay);
video.addEventListener("playing", () => {
video.style.opacity = "1";
videoPoster.style.opacity = "0";
videoPoster.style.pointerEvents = "none";
playButton.style.opacity = "0";
playButton.style.pointerEvents = "none";
});
video.addEventListener("pause", () => {
playButton.style.opacity = "1";
playButton.style.pointerEvents = "auto";
});
video.addEventListener("ended", () => {
video.style.opacity = "0";
videoPoster.style.opacity = "1";
videoPoster.style.pointerEvents = "auto";
playButton.style.opacity = "1";
playButton.style.pointerEvents = "auto";
});
video.addEventListener("pause", () => {
if (!video.ended) {
playButton.style.opacity = "1";
playButton.style.pointerEvents = "auto";
}
});
const fullscreenButton = document.getElementById("fullscreenButton");
const videoShell = video.closest(".video-shell");
fullscreenButton.addEventListener("click", () => {
if (!document.fullscreenElement && !document.webkitFullscreenElement) {
const req = video.requestFullscreen || video.webkitRequestFullscreen || video.webkitEnterFullscreen || video.mozRequestFullScreen;
if (req) req.call(video);
} else {
const exit = document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen;
if (exit) exit.call(document);
}
});