/* Story Slider Styles */
.story-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 0 20px 15px;
    background: #141414;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    margin-top: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.story-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari and Opera */
}

.story-item {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e50914;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.story-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #e50914, #f5f5f1);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

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

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

.story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

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

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

.close-story {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-story:hover {
    background: rgba(229, 9, 20, 0.8);
    transform: rotate(90deg);
}

.story-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Loading spinner */
.story-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #e50914;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .story-container {
        padding: 0 10px 10px;
        gap: 15px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    
    .story-item {
        width: 65px;
        height: 65px;
    }
    
    .story-content {
        height: 70vh;
        max-width: 95%;
    }
}

/* Video container for proper aspect ratio */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
