﻿
.story-bg {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(45px) brightness(0.4);
    transform: scale(1.2);
    z-index: 0;
    transition: background-image 0.4s ease;
}

.story-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 520px; /* Mobile phone size */
    margin: 0 auto;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 12px;
}

.story-card {
    width: 100%;
    aspect-ratio: 9 / 14;
    max-height: 92vh;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    background: #000;
}

    .story-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: opacity 0.3s ease;
    }

/* Progress bars */
#progress-container {
    position: absolute;
    top: 14px;
    left: 12px;
    right: 12px;
    z-index: 30;
    display: flex;
    gap: 5px;
}

.progress-track {
    height: 3px;
    flex: 1;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 10px;
}



/* Navigation buttons */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 40;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.2s;
}

    .nav-btn:hover {
        background: white;
        transform: translateY(-50%) scale(1.08);
    }

    .nav-btn:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

    .nav-btn.prev {
        left: -70px;
    }

    .nav-btn.next {
        right: -70px;
    }



.borderBOx {
    border: 2px solid red;
    width:165px;
}
@media (max-width: 500px) {
    .nav-btn.prev {
        left: 8px;
        display:none;
    }

    .nav-btn.next {
        right: 8px;
        display: none !important;
    }

    .story-wrapper {
        max-width: 100%;
        padding: 10px;
    }
}





.relativeDiv {
    height: 325px;
}
.relativeDiv img{
    height:240px;
}

    .relativeDiv p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 20px;
        max-height: 66px;
    }




.replaycontainer{
    right: -70px;
}




@media (max-width: 500px) {


    .replaycontainer{
        right: 8px;
    }

    
}


.story-caption {
    display: -webkit-box;
    -webkit-line-clamp: 3; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}


.story-overlay {
    position: absolute;
    padding: 20px 35px 15px;
    text-align: center;
    z-index: 20;
    bottom:-140px;
    transform: translateY(100%);
    opacity: 0;
    height:40%;
    width:110%;
    left:-21px;
    transition: transform .5s ease, opacity .5s ease;
}

    .story-overlay.show {
        transform: translateY(0);
        opacity: 1;
    }

    .story-overlay.show {
        animation: slideUp .5s ease forwards;
    }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}