/*!
 * Story Player Styles v1.0.0
 * Author: Amir Rezaie (https://amir-rezaie.ir)
 * License: MIT
 */

#stories-container {
    display: flex;
    gap: 15px;
    padding: 15px;
    overflow-x: auto;
}

.story {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.story-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #ff6b6b, #ff3838);
    transition: background 0.3s;
}

.story-avatar.viewed {
    background: #ddd !important;
}

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

.story-username {
    margin-top: 5px;
    font-size: 12px;
    color: #333;
    white-space: nowrap;
}

.story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
}

.progress-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.progress-fill {
    width: 0%;
    height: 100%;
    background: #4CAF50;
    border-radius: 2px;
    transition: width linear;
}

.story-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.media-container {
    position: relative;
    max-width: 100%;
    max-height: 90vh;
    touch-action: pan-y;
}

.story-media {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: none;
}

.video-media {
    display: none;
}

.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-button { right: 20px; }
.next-button { left: 20px; }

.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.3);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-link {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    z-index: 1002;
}
