/* STORIES BAR (WhatsApp/Instagram Style) */
.stories-container {
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    /* IE/Edge */
    scrollbar-width: none;
    /* Firefox */
}

.stories-container::-webkit-scrollbar {
    display: none;
}

.story-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.story-item:active {
    transform: scale(0.95);
}

.story-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    /* IG Gradient */
    position: relative;
}

.story-ring.seen {
    background: #555;
    /* Gray for seen */
}

.story-thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #000;
    /* Gap */
    object-fit: cover;
    background: #222;
}

.story-username {
    font-size: 10px;
    font-weight: 500;
    color: #ccc;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* FULLSCREEN VIEWER */
#story-viewer {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: none;
    /* Hidden by default */
    flex-direction: column;
}

#story-viewer.active {
    display: flex;
}

.story-progress-bar {
    display: flex;
    gap: 4px;
    padding: 10px 10px 0;
    z-index: 10;
}

.story-progress-segment {
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    flex: 1;
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: #fff;
    width: 0%;
}

.story-header {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.story-close {
    margin-left: auto;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

.story-content-area {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.story-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.story-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #fff;
    font-weight: bold;
    font-size: 1.5rem;
    font-family: sans-serif;
}