.stories {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px;
    background: #fff;
    border-bottom:1px solid #dddddd54;
    scroll-snap-type: x mandatory;
    padding-bottom: 34px;
}

.story {
    flex: 0 0 auto;
    text-align: center;
    scroll-snap-align: start;
    border-radius: 50%;
    background: linear-gradient(to right, red, orange);
    padding: 4px;
    width: 80px;
    height: 80px;
    cursor: pointer;
}

.story img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: white;
    border: 3px solid white;
}

.story span {
    display: block;
    font-size: 12px;
    margin-top: 5px;
}


.story-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 999;
}

.story-viewer img {
    width: 90%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    object-fit: cover;
}

.progress-bar {
    position: absolute;
    top: 10px;
    left: 0;
    height: 3px;
    background: #ff004f;
    width: 0;
    transition: width 5s linear;
}

.progress-container {
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    display: flex;
    gap: 5px;
    padding: 0 10px;
    z-index: 1000;
}

.progress-segment {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    overflow: hidden;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: #ff004f;
    transition: width 5s linear;
}

.story-viewer video {
    width: 90%;
    max-width: 400px;
    height: auto;
    border-radius: 15px;
    display: none;
}
