.video-wrapper.controls_below {
    border-radius: 0;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

.video-controls {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease;
    opacity: 1; /* Changed to show controls by default */
}

/* Show controls on hover or when video is paused */
.video-wrapper:hover .video-controls,
.video-wrapper video:paused + .video-controls {
    opacity: 1;
}

/* Hide controls only when video is playing and not being hovered */
.video-wrapper:not(:hover) video:not(:paused) + .video-controls {
    opacity: 0;
}

/* Keep controls visible when video is paused */
.video-wrapper video:paused + .video-controls {
    opacity: 1 !important;
}

.play-button {
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.2s ease, background-color 0.2s ease;
}

/* Hide play button when video is playing (not paused) */
.video-wrapper video:not(:paused) + .video-controls .play-button {
    opacity: 0;
}

/* Show play button when hovering over playing video */
.video-wrapper:hover video:not(:paused) + .video-controls .play-button {
    opacity: 1;
}

/* Always show play button when video is paused */
.video-wrapper video:paused + .video-controls .play-button {
    opacity: 1 !important;
}

.play-button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.play-button i {
    color: white;
    font-size: 32px;
}

.fullscreen-button {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease;
}

.video-wrapper:hover .fullscreen-button {
    opacity: 1;
}

.fullscreen-button:hover {
    transform: scale(1.1);
}

.fullscreen-button i {
    color: white;
    font-size: 20px;
}
