/* Общие стили для видеотеки */
.videoteka-container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

.videoteka-page-title {
    font-size: 2rem;
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.videoteka-page-title i {
    margin-right: 15px;
}

/* Главная страница */
#home-page {
    display: block;
}

.videoteka-video-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.videoteka-main-video {
    flex: 1 1 65%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.videoteka-main-video:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.videoteka-video-placeholder {
    position: relative;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-size: cover;
    background-position: center;
}

.videoteka-play-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.videoteka-play-icon i {
    color: #1a73e8;
    font-size: 40px;
    margin-left: 5px;
}

.videoteka-video-placeholder:hover .videoteka-play-icon {
    transform: scale(1.1);
    background: white;
}

.videoteka-video-info {
    padding: 24px;
}

.videoteka-video-info h2 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 12px;
    color: #202124;
}

.videoteka-video-info p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #5f6368;
    margin-bottom: 20px;
}

.videoteka-video-meta {
    display: flex;
    align-items: center;
    color: #5f6368;
    font-size: 0.95rem;
}

.videoteka-video-meta .videoteka-date {
    display: flex;
    align-items: center;
    margin-right: 25px;
}

.videoteka-video-meta .videoteka-duration {
    display: flex;
    align-items: center;
}

.videoteka-video-meta i {
    margin-right: 8px;
    color: #1a73e8;
}

.videoteka-video-list {
    flex: 1 1 30%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.videoteka-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: #f8f9fa;
    border-bottom: 1px solid #e8eaed;
}

.videoteka-list-header h3 {
    font-size: 1.4rem;
    font-weight: 500;
    color: #202124;
}

.videoteka-all-videos {
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    cursor: pointer;
}

.videoteka-all-videos:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.videoteka-all-videos i {
    margin-left: 5px;
    font-size: 1.2rem;
}

.videoteka-video-items {
    padding: 15px 0;
}

.videoteka-video-item {
    display: flex;
    padding: 15px 24px;
    border-bottom: 1px solid #f1f3f4;
    transition: background 0.2s;
    cursor: pointer;
}

.videoteka-video-item:last-child {
    border-bottom: none;
}

.videoteka-video-item:hover {
    background: #f8f9fa;
}

.videoteka-video-thumb {
    width: 100px;
    height: 60px;
    background: #e8eaed;
    border-radius: 4px;
    margin-right: 15px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.videoteka-video-thumb::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}

.videoteka-video-item-info {
    flex: 1;
}

.videoteka-video-item-title {
    font-size: 1rem;
    font-weight: 500;
    color: #202124;
    margin-bottom: 5px;
}

.videoteka-video-item-duration {
    font-size: 0.9rem;
    color: #5f6368;
    display: flex;
    align-items: center;
}

.videoteka-video-item-duration i {
    margin-right: 5px;
    font-size: 0.9rem;
    color: #1a73e8;
}

/* Страница всех видео */
#library-page {
    display: none; /* Изначально скрыта, будет управляться JS */
}

.videoteka-filters {
    display: flex;
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex-wrap: wrap; /* Для адаптивности */
}

.videoteka-filter {
    margin-right: 20px;
    position: relative;
    margin-bottom: 15px; /* Для адаптивности */
}

.videoteka-filter-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #5f6368;
    font-weight: 500;
}

.videoteka-filter-select {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    width: 200px;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    padding-right: 40px;
}

.videoteka-filter-select:focus {
    outline: none;
    border-color: #1a73e8;
}

.videoteka-filter i {
    position: absolute;
    right: 15px;
    top: 38px; /* Исправлено для центрирования стрелки */
    color: #5f6368;
    pointer-events: none;
}

.videoteka-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.videoteka-video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.videoteka-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.videoteka-card-thumb {
    height: 180px;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    position: relative;
    background-image: url('https://pic.rutube.ru/video/52/fe/52fe83c44f76c64f1a685104778f150a.jpg?width=970');
    background-size: cover;
    background-position: center;
}

.videoteka-card-thumb::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48px;
    height: 48px;
    background: url('data:image/svg+xml;utf8,<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="24" cy="24" r="24" fill="rgba(0,0,0,0.5)"/><polygon points="19,16 34,24 19,32" fill="white"/></svg>') no-repeat center center;
    background-size: 48px 48px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2;
}

.videoteka-card-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.videoteka-card-content {
    padding: 16px;
}

.videoteka-card-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #202124;
}

.videoteka-card-meta {
    display: flex;
    justify-content: space-between;
    color: #5f6368;
    font-size: 0.9rem;
}

.videoteka-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.videoteka-page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 5px;
    background: white;
    color: #1a73e8;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.videoteka-page-btn:hover, .videoteka-page-btn.active {
    background: #1a73e8;
    color: white;
}

/* Страница просмотра видео */
#video-page {
    display: none; /* Изначально скрыта, будет управляться JS */
}

.videoteka-video-player-container {
    display: flex; /* Использовать Flexbox для горизонтального расположения */
    flex-wrap: wrap; /* Позволяет элементам переноситься на новую строку на маленьких экранах */
    gap: 30px; /* Расстояние между плеером и рекомендованными видео */
    margin-bottom: 40px;
}

.videoteka-player-section {
    flex: 2; /* Плеер занимает большую часть доступного пространства */
    min-width: 300px; /* Минимальная ширина для плеера */
}

.videoteka-player {
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    border-radius: 12px;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.videoteka-player-play-btn {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 2;
}

.videoteka-player-play-btn i {
    color: #1a73e8;
    font-size: 50px;
    margin-left: 8px;
}

.videoteka-player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.videoteka-player:hover .videoteka-player-controls {
    opacity: 1;
}

.videoteka-player-controls button {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    margin: 0 10px;
    cursor: pointer;
}

.videoteka-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 15px;
    position: relative;
    overflow: hidden;
}

.videoteka-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 45%; /* Пример заполнения */
    background: #1a73e8;
}

.videoteka-player-time {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0 10px;
}

.videoteka-player-info {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-top: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.videoteka-player-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #202124;
}

.videoteka-player-meta {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: #5f6368;
    font-size: 0.95rem;
    flex-wrap: wrap; /* Для адаптивности */
}

.videoteka-player-meta > div {
    margin-right: 25px;
    display: flex;
    align-items: center;
    margin-bottom: 10px; /* Для адаптивности */
}

.videoteka-player-meta i {
    margin-right: 8px;
    color: #1a73e8;
}

.videoteka-player-description {
    line-height: 1.7;
    color: #5f6368;
    margin-bottom: 25px;
}

.videoteka-player-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Для адаптивности */
}

.videoteka-action-btn {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 30px;
    background: #f1f3f4;
    color: #5f6368;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    flex: 1; /* Для адаптивности */
    justify-content: center; /* Для адаптивности */
}

.videoteka-action-btn i {
    margin-right: 8px;
}

.videoteka-action-btn:hover {
    background: #e8eaed;
}

.videoteka-action-btn.videoteka-primary {
    background: #1a73e8;
    color: white;
}

.videoteka-action-btn.videoteka-primary:hover {
    background: #0d47a1;
}

.videoteka-related-section {
    flex: 1; /* Рекомендованные видео занимают оставшееся пространство */
    min-width: 250px; /* Минимальная ширина для рекомендованных видео */
}

.videoteka-related-title {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #202124;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8eaed;
}

.videoteka-related-videos {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.videoteka-related-video {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.videoteka-related-video:hover {
    transform: translateX(5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.videoteka-related-thumb {
    width: 120px;
    height: 70px;
    background: #e8eaed;
    border-radius: 6px;
    margin-right: 15px;
    position: relative;
    overflow: hidden;
    background-image: url('https://pic.rutube.ru/video/52/fe/52fe83c44f76c64f1a685104778f150a.jpg?width=970');
    background-size: cover;
    background-position: center;
}

.videoteka-related-thumb::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
}

.videoteka-related-info {
    flex: 1;
}

.videoteka-related-video-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: #202124;
}

.videoteka-related-video-duration {
    font-size: 0.85rem;
    color: #5f6368;
    display: flex;
    align-items: center;
}

.videoteka-related-video-duration i {
    margin-right: 5px;
    font-size: 0.85rem;
    color: #1a73e8;
}

/* Футер */
/* Эти стили не будут использоваться напрямую, так как футер общий, но я их включил для полноты */
.videoteka-footer {
    background: white;
    padding: 30px 0;
    color: #5f6368;
    margin-top: 50px;
    border-top: 1px solid #e8eaed;
}

.videoteka-footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.videoteka-footer-logo {
    font-size: 1.5rem;
    font-weight: 500;
    color: #1a73e8;
}

.videoteka-footer-links {
    display: flex;
    gap: 25px;
}

.videoteka-footer-link {
    color: #5f6368;
    text-decoration: none;
    transition: color 0.3s;
}

.videoteka-footer-link:hover {
    color: #1a73e8;
}

/* Адаптивность */
@media (max-width: 1100px) {
    .videoteka-video-player-container {
        flex-direction: column;
    }
    
    .videoteka-related-section {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .videoteka-video-gallery {
        flex-direction: column;
    }
    
    .videoteka-main-video, .videoteka-video-list {
        flex: 1 1 100%;
    }
    
    .videoteka-video-placeholder {
        height: 300px;
    }
    
    .videoteka-filters {
        flex-wrap: wrap;
    }
    
    .videoteka-filter {
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    .videoteka-navbar { /* Этот класс не будет использоваться, так как у вас уже есть своя навигация */
        height: auto;
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .videoteka-nav-links { /* Этот класс не будет использоваться */
        order: 3;
        width: 100%;
        margin-top: 15px;
        justify-content: center;
    }
    
    .videoteka-search-bar { /* Этот класс не будет использоваться */
        width: 100%;
        margin-top: 15px;
    }
    
    .videoteka-page-title {
        font-size: 1.8rem;
    }
    
    .videoteka-video-placeholder {
        height: 250px;
    }
    
    .videoteka-player {
        height: 350px;
    }
}

@media (max-width: 600px) {
    .videoteka-videos-grid {
        grid-template-columns: 1fr;
    }
    
    .videoteka-player-title {
        font-size: 1.5rem;
    }
    
    .videoteka-player-meta {
        flex-wrap: wrap;
    }
    
    .videoteka-player-meta > div {
        margin-bottom: 10px;
    }
    
    .videoteka-player-actions {
        flex-wrap: wrap;
    }
    
    .videoteka-action-btn {
        flex: 1;
        justify-content: center;
    }
}

/* Эффекты Material Design */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple:after {
    content: "";
    display: block;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform .5s, opacity 1s;
}

.ripple:active:after {
    transform: scale(0, 0);
    opacity: .3;
    transition: 0s;
}

/* Стили для сообщения "Видео не найдено" */
.no-videos-message {
    text-align: center;
    font-size: 1.2rem;
    color: #5f6368;
    padding: 20px;
    grid-column: 1 / -1; /* Растянуть на всю ширину сетки */
}

.pagination-videoteka { /* Используем ваш класс для пагинации */
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.page-btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.videoteka-back-to-library {
    display: inline-flex;
    align-items: center;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.videoteka-back-to-library:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.videoteka-back-to-library i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.footer__links-row {
    display: flex;
    gap: 2rem;
}

.footer__links {
    flex: 1;
    min-width: 120px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__link--active {
    text-decoration: underline;
    color: #2563eb; /* синий, можно заменить на фирменный */
    font-weight: 600;
}

.footer__link {
    transition: color 0.2s, text-decoration 0.2s;
}

.footer__link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}
