/* Stories Section - без конфликтов с шаблоном */

.stories-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stories-arrow--left {
    left: -10px;
}

.stories-arrow--right {
    right: -10px;
}

/* Modal */
.stories-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.stories-modal.active {
    display: block;
}

.stories-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
}

.stories-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-modal-content {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 700px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
}

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

.story-progress-bar {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    overflow: hidden;
    z-index: 10;
}

.story-progress-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 3px;
}

.story-user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
}

.story-modal-avatar-ring {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-modal-avatar-ring .story-avatar {
    width: 36px;
    height: 36px;
    font-size: 18px;
}

.story-modal-name {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.stories-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stories-prev {
    left: 15px;
}

.stories-next {
    right: 15px;
}

/* Блок с информацией об объявлении */
.story-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 12px 15px;
    z-index: 15;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.story-item-link {
    display: flex;
    gap: 12px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.2s;
}

.story-item-link:hover {
    opacity: 0.9;
    text-decoration: none;
}

.story-item-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    background: #333;
}

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

.story-item-details {
    flex: 1;
    min-width: 0;
}

.story-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.story-item-price {
    font-size: 13px;
    color: #ffd700;
    font-weight: 600;
    margin-bottom: 4px;
}

.story-item-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.story-item-view {
    font-size: 11px;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    margin-top: 5px;
}

/* Индикатор перемотки */
.story-rewind-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 18px;
    font-weight: bold;
    z-index: 25;
    pointer-events: none;
    animation: rewindFadeOut 0.5s ease forwards;
    white-space: nowrap;
}

@keyframes rewindFadeOut {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Подсказка о перемотке */
.story-rewind-hint {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    padding: 5px;
    z-index: 15;
    pointer-events: none;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .story-item-info {
        padding: 10px 12px;
    }
    
    .story-item-image {
        width: 50px;
        height: 50px;
    }
    
    .story-item-title {
        font-size: 12px;
    }
    
    .story-item-price {
        font-size: 11px;
    }
    
    .story-item-description {
        font-size: 10px;
    }
}

@media (max-width: 768px) {
    .story-ring {
        width: 60px;
        height: 60px;
    }
    .story-avatar {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    .story-add-ring {
        width: 60px;
        height: 60px;
    }
    .story-add-plus {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }
    .story-name {
        font-size: 11px;
        max-width: 60px;
    }
    .stories-modal-content {
        border-radius: 0;
        max-height: 100%;
    }
    .stories-nav {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }
}