/* Stories Section Styles */
.stories-section {
    background: var(--bg-dark);
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.stories-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.stories-container::-webkit-scrollbar {
    height: 4px;
}

.stories-container::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

.stories-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

.story-item {
    flex-shrink: 0;
    width: 80px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s;
}

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

.story-image-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.story-title {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
    color: var(--text-light);
}

/* Story Viewer Modal */
.story-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.story-viewer.active {
    display: flex;
}

.story-viewer-content {
    position: relative;
    max-width: 400px;
    max-height: 90vh;
    width: 100%;
    margin: 0 20px;
}

.story-viewer-image {
    width: 100%;
    height: auto;
    border-radius: 15px;
    object-fit: contain;
    max-height: 80vh;
}

.story-viewer-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.story-viewer-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

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

.story-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.story-viewer-nav.prev {
    left: -60px;
}

.story-viewer-nav.next {
    right: -60px;
}

/* Responsive */
@media (max-width: 768px) {
    .stories-container {
        gap: 12px;
        padding: 10px 15px;
    }
    
    .story-item {
        width: 70px;
    }
    
    .story-image-wrapper {
        width: 70px;
        height: 70px;
        border-width: 2px;
    }
    
    .story-title {
        font-size: 10px;
        max-width: 70px;
    }
    
    .story-viewer-content {
        max-width: 90%;
    }
    
    .story-viewer-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .story-viewer-nav.prev {
        left: -50px;
    }
    
    .story-viewer-nav.next {
        right: -50px;
    }
}

@media (max-width: 480px) {
    .stories-container {
        gap: 10px;
    }
    
    .story-item {
        width: 60px;
    }
    
    .story-image-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .story-title {
        font-size: 9px;
        max-width: 60px;
    }
    
    .story-viewer-nav.prev {
        left: 10px;
    }
    
    .story-viewer-nav.next {
        right: 10px;
    }
}
