
/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
}

/* Open slider button */
.open-slider-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    background: #0ea5e9;
    color: white;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    transition: background-color 0.2s;
}

.open-slider-btn:hover {
    background: #0284c7;
}

/* Filter buttons */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    max-width: 500px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #e5e7eb;
}

.filter-btn.active {
    background: #0ea5e9;
    color: white;
}

/* Slider wrapper */
.slider-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background-color: rgb(36, 36, 36);
    backdrop-filter: blur(5px);
    display: none;
    place-items: center;
}

.slider-container {
    position: relative;
    width:100%;
    height: 100vh;
    overflow: hidden;
    
}

/* Close button */
.close-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 50;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: white;
}

/* Navigation arrows */
.nav-arrows {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    z-index: 40;
    display: none;/*flex*/
    flex-direction: column;
    gap: 8px;
}

.nav-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: white;
}

.nav-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Slides container */
.slides-container {
    height: 100%;
    transition: transform 0.1s ease-out;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    position: relative;
    z-index:10;
}

/* Individual slide */
.slide {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select:none;
}

/* Video player */
.video-player {
    position: relative;
    width: 100%;
    min-width: min-content;
    height: 100%;
    min-width:
    max-width: 400px;
    margin: 0 auto;
}

.video-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Video loader */
.video-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 5;
}

.video-loader.visible {
    opacity: 1;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Video poster */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 2;
    transition: opacity 0.3s;
}

.video-poster.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Video controls overlay */
.video-overlay {
    position: absolute; 
    height:calc(100% - 130px);
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 21;
    transition: opacity 0.3s;
    clip-path: polygon(100% 0, 100% 50%, 80% 50%, 80% 100%, 0 100%, 0% 60%, 0 0);
}

.mute-btn {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    color: white;
}

/* Video controls */
.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 1.8) 0%, transparent 100%);
    padding: 16px 11px 16px;/* 64px */
    z-index: 20;
    transition: opacity 0.3s;
}

.video-info {
   display: flex;
   align-items: end;
   justify-content: space-between;
   margin-bottom: 12px;
}

.MreTools {
    display: none !important;
    place-items: center;
    gap: 10px;
    margin: 0px -5px 32px 0;
    
}

.video-title {
    color: white;
    font-weight: 500;
    font-size: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 8px;
}

.MreTools button {
    background:transparent;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: white;
    flex-shrink: 0;
}

.MreTools button svg{
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(5px 5px 5px #000000);
}

.MreTools .like-btn.active svg{
    fill: #e61355;
    stroke: #e61355;
}
.MreTools .save-btn.active svg{
    fill: #fff;
    stroke: #fff;
}

.get-template-btn {
    width: 100%;
    background: linear-gradient(to right, #ec4899, #f43f5e);
    color: white;
    font-weight: 500;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 16px;
}

/* Progress bar */
.progress-container {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0);
    border-radius: 4px;
    overflow: visible;
    cursor: pointer;
    touch-action: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.play-pause-btn {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    color: white;
    margin-right: 8px;
    flex-shrink: 0;
    z-index: 5;
}

.progress-bar-wrapper {
    flex-grow: 1;
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: white;
    border-radius: 4px;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    height: 12px;
    width: 12px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Hide controls */
.hide-controls .video-overlay,
.hide-controls .video-controls {
    opacity: 0;
    pointer-events: none;
}

/* Category badge */
.category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 30;
}

/* Responsive adjustments */
@media screen and (min-width: 768px) {
    .slider-wrapper{
        background-color: rgba(36, 36, 36, 0.678);
    }
    .slider-container {
        width:auto;
        aspect-ratio: 3.1 / 4;
    }
    .slide{
        background:transparent;
    }
    .video-player {
        max-width: 500px;
        aspect-ratio: 9/16;
        height: 100%;
    }
    .nav-arrows{display:flex;}
}

/* SVG Icons */
.icon {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.play-pause-btn .icon {
    width: 16px;
    height: 16px;
}


.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: #e61355;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    position: absolute;
    bottom: 50px;
    left: calc(50% - 24px);
    }

    @keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
    }