/* Стили для страницы видео-рассказов */
.stories-hero {
    background: linear-gradient(135deg, #e74c3c 0%, #c44569 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.stories-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

.stories-hero-content {
    position: relative;
    z-index: 2;
}

.search-filters {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.story-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #e74c3c;
}

.story-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: #f5f5f5;
    overflow: hidden;
}

.story-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Эффект масштабирования теперь через .story-thumbnail-link:hover */

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

/* Эффект плей-оверлея теперь через .story-thumbnail-link:hover */

/* Стили для кликабельного превью */
.story-thumbnail-link {
    display: block;
    text-decoration: none !important;
    color: inherit;
}

.story-thumbnail-link:hover {
    text-decoration: none !important;
}

/* Улучшенные эффекты при наведении на превью */
.story-thumbnail-link:hover .story-thumbnail img {
    transform: scale(1.05);
}

.story-thumbnail-link:hover .play-overlay {
    background: #e74c3c;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Добавляем курсор pointer для всего превью */
.story-thumbnail {
    cursor: pointer;
}

.story-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Ярлычок "НОВОЕ" */
.badge-new {
    position: absolute;
    top: -10px;
    left: 12px;
    background: linear-gradient(135deg, #FF6B9D 0%, #FF1744 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 157, 0.4);
    z-index: 10;
    animation: badgeNew 0.5s ease-out;
}

@keyframes badgeNew {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.story-content {
    padding: 1.5rem;
}

.story-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #606060;
    gap: 0.5rem;
}

.story-meta .meta-separator {
    color: #606060;
    font-weight: bold;
}

.story-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    border: 1px solid #bbdefb;
}

.story-category-badge i {
    font-size: 0.9rem;
    color: #2196f3;
}

.story-tags {
    margin-bottom: 1rem;
}

.story-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #f8f9fa;
    color: #333;
    border-radius: 0.25rem;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.story-tag:hover {
    background: #e74c3c;
    color: white;
    text-decoration: none !important;
}

/* Скрытые категории */
.category-hidden {
    display: none !important;
    visibility: hidden !important;
}

/* Когда категории показаны через JavaScript */
.category-shown {
    display: flex !important;
    visibility: visible !important;
}

.category-filter-container {
    margin-bottom: 2rem;
}

.category-filter {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #e0e0e0;
    background: #fff;
    color: #333;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.category-btn:hover,
.category-btn.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* Адаптивность для категорий */
@media (max-width: 768px) {
    .category-filter {
        gap: 0.25rem;
    }
    
    .category-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
        justify-content: center;
    }
    
    .category-btn i {
        display: none; /* Скрываем иконки на мобильных */
    }
    
    /* Адаптивность метаданных рассказов */
    .story-meta {
        padding: 0.75rem 0.5rem;
        background: #f8f9fa;
        border-radius: 0.5rem;
        margin: 1rem 0;
    }
    
    .story-meta .meta-item {
        gap: 0.375rem;
    }
    
    .story-meta .meta-item i {
        font-size: 1.4rem;
    }
    
    .story-meta .meta-item span {
        font-size: 0.7rem;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 576px) {
    .category-filter {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.5rem;
    }
    
    .category-btn {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Стили баннера поддержки */
.support-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    padding: 2.5rem;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.support-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M54.627 0l.83.828-1.415 1.415L51.8 0h2.827zM5.373 0l-.83.828L5.96 2.243 8.2 0H5.374zM48.97 0l3.657 3.657-1.414 1.414L46.143 0h2.828zM11.03 0L7.372 3.657 8.787 5.07 13.857 0H11.03zm32.284 0L49.8 6.485 48.384 7.9l-7.9-7.9h2.83zM16.686 0L10.2 6.485 11.616 7.9l7.9-7.9h-2.83zm20.97 0l9.315 9.314-1.414 1.414L34.828 0h2.83zM22.344 0L13.03 9.314l1.414 1.414L25.172 0h-2.83z' fill='%23ffffff' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.support-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(102, 126, 234, 0.4);
}

.support-banner-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2rem;
    color: white;
}

.support-icon {
    font-size: 4rem;
    opacity: 0.9;
    animation: pulse 2s ease-in-out infinite;
}

.support-text {
    flex: 1;
}

.support-text h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.support-text p {
    margin: 0;
    opacity: 0.95;
    font-size: 1rem;
    line-height: 1.5;
}

.support-action {
    flex-shrink: 0;
}

.btn-support {
    background: white;
    color: #667eea;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-support:hover {
    background: #ffd700;
    color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.4);
    text-decoration: none;
}

/* Адаптивность баннера */
@media (max-width: 768px) {
    .support-banner {
        padding: 1.5rem;
    }
    
    .support-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .support-icon {
        font-size: 3rem;
    }
    
    .support-text h3 {
        font-size: 1.2rem;
    }
    
    .support-text p {
        font-size: 0.9rem;
    }
    
    .btn-support {
        font-size: 1rem;
        padding: 0.65rem 1.5rem;
        width: 100%;
        justify-content: center;
    }
}

/* Стили пагинации */
.pagination {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    margin: 0;
}

.pagination .page-link {
    border: none;
    color: #333;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.pagination .page-link:hover {
    background-color: #e74c3c;
    color: white;
    transform: translateY(-1px);
    z-index: 2;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.pagination .page-item.active .page-link {
    background-color: #e74c3c;
    border-color: #e74c3c;
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

.pagination .page-item.disabled .page-link {
    color: #ccc;
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.pagination .page-item:first-child .page-link {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Адаптивность пагинации */
@media (max-width: 768px) {
    .pagination {
        font-size: 0.9rem;
    }
    
    .pagination .page-link {
        padding: 0.5rem 0.75rem;
    }
    
    .pagination-lg {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .pagination {
        font-size: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.4rem 0.6rem;
        min-width: 40px;
        text-align: center;
    }
}
