/* Stories styles */

.stories-container {
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s;
}

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

.story-circle {
    transition: all 0.3s;
}

.story-circle.unviewed {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

.story-circle.viewed {
    border-color: #6b7280 !important;
    opacity: 0.7;
}

/* Stories Modal */
.stories-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-modal-content {
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.stories-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}

.stories-progress-container {
    display: flex;
    gap: 4px;
    margin-bottom: 1rem;
}

.stories-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.stories-progress-bar.active {
    background: rgba(255, 255, 255, 0.5);
}

.stories-progress-bar.active::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #fff;
    animation: progress linear;
}

.stories-progress-bar.completed {
    background: #fff;
}

.stories-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 11;
    transition: background 0.2s;
}

.stories-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.stories-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.stories-media-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

.stories-music-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.5);
}

.stories-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-size: 1rem;
    line-height: 1.5;
}

.stories-controls {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 10;
}

.stories-prev,
.stories-next,
.stories-pause {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.2s;
}

.stories-prev:hover,
.stories-next:hover,
.stories-pause:hover {
    background: rgba(0, 0, 0, 0.7);
}

.stories-pause {
    margin: 0 auto;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .stories-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .stories-container {
        gap: 1rem;
    }
    
    .story-item {
        flex: 0 0 auto;
    }
    
    .story-circle {
        width: 70px !important;
        height: 70px !important;
    }
}

@keyframes progress {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}



