/* Example: styling the play button */

.hidden {
    display: none;
}


.html5-animation-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    max-width: -webkit-fill-available; /* Chrome, Safari */
    max-width: -moz-available; /* Firefox */
    max-width: fill-available; /* Standard (if supported) */

    border: 1px solid var(--card-border-color);
    background: var(--card-background-color);
    border-radius: var(--card-border-radius);
    padding: 1em;
    margin: 1em auto;
}

.html5-animation-container:hover {
    border-color: var(--card-border-color-hover)
}

.html5-animation-container:not(.animating),
.html5-animation-container:not(.animating):hover .play-button {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24"><circle cx="12" cy="12" r="11" fill="none" stroke="%234b7fff" stroke-width="2"/><path d="M8 5v14l11-7z" fill="%234b7fff"/></svg>') 32 32, pointer;
}

.html5-animation-container.animating,
.html5-animation-container.animating:hover .play-button {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 24 24"><circle cx="12" cy="12" r="11" fill="none" stroke="%234b7fff" stroke-width="2"/><path d="M6 6h12v12H6z" fill="%234b7fff"/></svg>') 32 32, pointer;
}

#dim-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.05); /* Adjust opacity as needed */
    backdrop-filter: blur(2px); /* Glass effect */
    z-index: 1000;
    animation: fadeInOverlay 0.3s ease;
}

.svg-play-icon-container{
    position: absolute;
    width: 50px;
    height: auto;
    right: 0;
    bottom: 0;
    color: var(--card-border-color)
}

/* play-text-icon animated svg */
.icon-animated-on-hover {
    display: inline-block;
}

.animated-text-icon .text-line,
.animated-text-icon .play {
    opacity: 1;
    animation: none;
}

.icon-animated-on-hover:hover .animated-text-icon .text-line {
    animation: fadeText 2s infinite ease-in-out;
}

.html5-animation-container:hover .svg-play-icon-container {
    color: var(--card-border-color-hover)
}

.icon-animated-on-hover:hover .animated-text-icon .text-line:nth-of-type(1) {
    animation-delay: 0s;
}

.icon-animated-on-hover:hover .animated-text-icon .text-line:nth-of-type(2) {
    animation-delay: 0.3s;
}

.icon-animated-on-hover:hover .animated-text-icon .text-line:nth-of-type(3) {
    animation-delay: 0.6s;
}

.icon-animated-on-hover:hover .animated-text-icon .text-line:nth-of-type(4) {
    animation-delay: 0.9s;
}

.icon-animated-on-hover:hover .animated-text-icon .play {
    animation: moveAndScale 1s infinite alternate ease-in-out;
    transform-origin: center;
    opacity: 1;
}

@keyframes fadeText {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

@keyframes moveAndScale {
    0% {
        transform: translateX(-1px) scale(1);
    }
    100% {
        transform: translateX(3px) scale(1.15);
    }
}
