/* Story style */
.stories-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

    .stories-bar::-webkit-scrollbar {
        display: none;
    }

.story-avatar {
    flex: 0 0 auto;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #ADD8E6;
    padding: 3px;
}

    .story-avatar.seen {
        border-color: #ccc;
    }

    .story-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

.viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .95);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    padding: 16px;
}

    .viewer.hidden {
        display: none;
    }

.closeBtn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
    color: white;
    cursor: pointer;
    z-index: 100000;
    border-radius: 50%;
    background: rgba(0, 0, 0, .25);
}

#storyContent {
    position: relative;
    width: min(420px, 95vw);
    height: min(760px, 86vh);
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-frame {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #000;
    isolation: isolate;
}

.story-media-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

    .story-media-layer img,
    .story-media-layer video {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
        background: #000;
    }

.story-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 88px 18px 22px;
    color: #fff;
    text-align: center;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .48), rgba(0, 0, 0, 0));
}

.story-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.7;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}

.story-description {
    font-size: 14px;
    line-height: 1.8;
    max-height: 96px;
    overflow-y: auto;
    margin-bottom: 12px;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .55);
}

.story-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    max-width: 100%;
    padding: 9px 22px;
    border-radius: 999px;
    background: #fff;
    color: #111;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    pointer-events: auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .32);
}

    .story-link-button:hover {
        color: #111;
        text-decoration: none;
    }

#progressContainer {
    position: absolute;
    top: max(20px, env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    width: min(420px, 95vw);
    z-index: 10000;
    padding: 0 8px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, .3);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: white;
}

@media (max-width: 576px) {
    .viewer {
        padding: 0;
    }

    .closeBtn {
        top: max(14px, env(safe-area-inset-top));
        right: 12px;
    }

    #storyContent {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
    }

    .story-frame {
        border-radius: 0;
    }

    #progressContainer {
        width: 100vw;
        top: max(12px, env(safe-area-inset-top));
    }

    .story-overlay {
        padding: 96px 16px max(24px, env(safe-area-inset-bottom));
    }

    .story-title {
        font-size: 16px;
    }

    .story-description {
        font-size: 13px;
        max-height: 86px;
    }
}

/* Category Style */
.category-slider {
    padding: 10px 0;
}

    .category-slider .item {
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 5px;
        margin: 10px 0;
    }

        .category-slider .item .category-img-curosel {
            width: 55px;
            height: 55px;
            border-radius: 50%;
        }

    .category-slider p {
        font-size: 10px;
        margin: 0;
        font-weight: 700;
    }

    .category-slider .owl-stage {
        display: flex;
        justify-content: center;
    }

.owl-carousel .owl-stage-outer {
    display: flex;
    justify-content: center;
}
