/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Навигационная панель */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #ff0000;
}

.logo i {
    margin-right: 10px;
    font-size: 28px;
}

.search-bar {
    display: flex;
    flex: 0.6;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 30px 0 0 30px;
    font-size: 16px;
}

.search-bar button {
    padding: 10px 20px;
    background-color: #ff0000;
    color: white;
    border: none;
    border-radius: 0 30px 30px 0;
    cursor: pointer;
}

.nav-links a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #ff0000;
}

.nav-links i {
    margin-right: 5px;
}

/* Hero секция */
.hero-section {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

.hero-section h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.hero-section p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* Сетка видео */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Карточка видео */
.video-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.video-card a {
    text-decoration: none;
    color: inherit;
}

.video-thumbnail {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 60px;
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.video-info {
    padding: 15px;
}

.video-info h3 {
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
    height: 45px;
    overflow: hidden;
}

.description {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
}

.video-meta i {
    margin-right: 5px;
}

.category {
    background-color: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

/* Страница деталей */
.detail-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.video-player-section {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-player {
    width: 100%;
    background: #000;
}

.video-player video {
    width: 100%;
    height: 500px;
    display: block;
}

.video-details {
    padding: 25px;
}

.video-details h1 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #333;
}

.video-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 14px;
}

.video-stats i {
    margin-right: 5px;
    color: #ff0000;
}

.category-tag {
    background-color: #ff0000;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
}

.video-description h3 {
    margin-bottom: 10px;
    color: #333;
}

.video-description p {
    color: #555;
    line-height: 1.8;
}

/* Боковая панель */
.sidebar {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.sidebar h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff0000;
    color: #333;
}

.similar-videos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.similar-video {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.similar-video:hover {
    background-color: #f9f9f9;
}

.similar-thumbnail {
    position: relative;
    width: 120px;
    height: 70px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
}

.similar-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.duration-small {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
}

.similar-info h4 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
    height: 40px;
    overflow: hidden;
}

.similar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

.category-small {
    background-color: #f0f0f0;
    padding: 1px 6px;
    border-radius: 10px;
    font-size: 11px;
}

/* Футер */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 50px;
    background-color: #333;
    color: white;
}

/* Адаптивность */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .detail-container {
        grid-template-columns: 1fr;
    }
    
    .video-player video {
        height: 300px;
    }
}