/* ========== СТИЛИ ДЛЯ КАРТОЧЕК ВИДЕО ========== */

/* Базовый стиль карточки */
.media-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #0a0a0a;
    border: 1px solid rgba(255, 77, 77, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 77, 77, 0.5);
}

/* ========== КОНТЕЙНЕР ДЛЯ ПРЕВЬЮ - УВЕЛИЧЕННЫЙ ========== */
.media-card .preview-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
}

/* Миниатюра как фон */
.media-card .thumbnail-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Градиентный оверлей (только для эффекта, не обязателен) */
.media-card .gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.3) 0%, transparent 50%);
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.media-card:hover .gradient-overlay {
    opacity: 1;
}

/* Видео превью (при наведении) */
.media-card .video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 3;
    display: none;
}

.media-card:hover .video-preview {
    display: block;
}

/* Длительность видео */
.media-card .video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10;
    backdrop-filter: blur(2px);
}

/* Кнопка WATCH (появляется при наведении) */
.media-card .watch-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 20;
    padding: 8px 20px;
    background: red;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

.media-card:hover .watch-button {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

/* ========== КОНТЕНТ КАРТОЧКИ (ПОД ПРЕВЬЮ) - УМЕНЬШЕННЫЙ ========== */
.media-card .card-content {
    padding: 10px 12px 12px 12px;
    color: white;
    background: #0a0a0a;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Заголовок - немного меньше */
.media-card .card-content h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: white;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* Автор - компактнее */
.media-card .card-content .author {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
    margin: 2px 0;
}

.media-card .card-content .author:hover {
    color: #ff4d4d;
}

.media-card .card-content .author::before {
    content: '👤';
    font-size: 11px;
}

/* Статистика - компактнее */
.media-card .card-content .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: #aaa;
    margin-top: 2px;
}

.media-card .card-content .stats span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Теги - компактнее */
.media-card .card-content .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.media-card .card-content .tag {
    padding: 2px 6px;
    background: rgba(255, 77, 77, 0.2);
    border-radius: 10px;
    font-size: 9px;
    font-weight: 500;
    color: #ff9999;
    transition: background 0.2s ease;
}

.media-card .card-content .tag:hover {
    background: rgba(255, 77, 77, 0.4);
}

/* Описание (если есть) - компактнее */
.media-card .card-content .description {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-top: 2px;
}

/* ========== СТАТУС ВИДЕО (ДЛЯ МОДЕРАЦИИ) ========== */
.video-status {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: bold;
    z-index: 15;
    backdrop-filter: blur(4px);
}

.video-status.pending {
    background: #f39c12;
    color: white;
}

.video-status.rejected {
    background: #e74c3c;
    color: white;
}

/* ========== КАРТОЧКИ НА МОДЕРАЦИИ ========== */
.media-card.moderation-card {
    opacity: 0.9;
    pointer-events: none;
}

.media-card.moderation-card .watch-button {
    display: none;
}

.media-card.moderation-card .video-preview {
    display: none !important;
}

.media-card.moderation-card .thumbnail-bg {
    filter: grayscale(30%);
}

/* ========== СЕТКА ВИДЕО ========== */
.videos-grid,
#Content,
#OtherContent,
#uploadedVideos,
#likedVideos {
    display: grid;
    gap: 20px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (min-width: 481px) {
    .videos-grid,
    #Content,
    #OtherContent,
    #uploadedVideos,
    #likedVideos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .videos-grid,
    #Content,
    #OtherContent,
    #uploadedVideos,
    #likedVideos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .videos-grid,
    #Content,
    #OtherContent,
    #uploadedVideos,
    #likedVideos {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .videos-grid,
    #Content,
    #OtherContent,
    #uploadedVideos,
    #likedVideos {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1300px;
    }
}

@media (min-width: 1400px) {
    .videos-grid,
    #Content,
    #OtherContent,
    #uploadedVideos,
    #likedVideos {
        grid-template-columns: repeat(5, 1fr);
        max-width: 1600px;
    }
}

@media (max-width: 480px) {
    .videos-grid,
    #Content,
    #OtherContent,
    #uploadedVideos,
    #likedVideos {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .media-card .card-content h3 {
        font-size: 13px;
    }
    
    .media-card .card-content .author,
    .media-card .card-content .stats {
        font-size: 10px;
    }
    
    .media-card .card-content .tag {
        font-size: 8px;
        padding: 1px 5px;
    }
}

/* Специальные ориентации */
@media (max-width: 900px) and (orientation: landscape) {
    .videos-grid,
    #Content,
    #OtherContent,
    #uploadedVideos,
    #likedVideos {
        grid-template-columns: repeat(3, 1fr);
    }
}