.stories-wrapper {
    margin-bottom: 30px;
}

.stories-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 25px 10px;
    scrollbar-width: none;
    /* Firefox */
}

.stories-slider::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari */
}

.story-item {
    flex: 0 0 110px;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.story-preview {
    width: 110px;
    height: 160px;
    border-radius: 16px;
    border: 2px solid #e14eba;
    padding: 3px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.story-preview:hover {
    transform: scale(1.05);
}

.story-preview img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* Modal CSS */
.story-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.story-viewer__content {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 90vh;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-viewer__progress-bar {
    position: absolute;
    top: 15px;
    left: 10px;
    right: 10px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    z-index: 10;
    display: flex;
    gap: 5px;
}

.story-viewer__progress-segment {
    height: 100%;
    flex: 1;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-viewer__progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
}

.story-viewer__progress-fill.completed {
    width: 100%;
}

.story-viewer__progress-fill.active {
    transition: width linear;
}

.story-viewer__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    z-index: 20;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.story-viewer__link {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    background-color: #fff;
    color: #000;
    padding: 12px 24px;
    border-radius: 24px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.story-viewer__link:hover {
    transform: translateX(-50%) scale(1.05);
}

.story-viewer__nav {
    position: absolute;
    top: 50px;
    bottom: 0;
    width: 30%;
    z-index: 15;
    /* background: rgba(255,0,0,0.1); For debug */
}

.story-viewer__nav--prev {
    left: 0;
}

.story-viewer__nav--next {
    right: 0;
}