/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

:root {
    --bg-color: #fff;
    --text-color: #333;
    --text-color-rgb: 51, 51, 51;
    --bg-secondary: #f8f9fa;
    --border-color: #ddd;
    --shadow-color: rgba(0,0,0,0.05);
    --hover-shadow: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-color: #14191f;
    --text-color: #fff;
    --text-color-rgb: 255, 255, 255;
    --bg-secondary: #1e252c;
    --border-color: #2a3138;
    --shadow-color: rgba(0,0,0,0.2);
    --hover-shadow: rgba(0,0,0,0.3);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.page-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.main-content {
            min-width: 0;
            outline: none;
 }

.sidebar {
    position: sticky;
    top: 80px;
    height: auto;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.sidebar h2 {
    margin-bottom: 15px;
    font-size: 20px;
}

.sidebar h3, .sidebar h4 {
    margin: 15px 0 10px;
}

.sidebar p {
    margin-bottom: 10px;
    line-height: 1.4;
}

.sidebar ul, .sidebar ol {
    margin: 10px 0;
    padding-left: 20px;
}

.sidebar li {
    margin-bottom: 5px;
}

.sidebar hr {
    margin: 15px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

@media (max-width: 1024px) {
    .page-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

.header-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-color);
}

.search-container {
    display: flex;
    gap: 10px;
    width: 100%;
    margin: 0;
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 16px;
    background: var(--bg-color);
    color: var(--text-color);
}

.search-button {
    background-color: #064794;
    color: white;
    padding: 10px 20px;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
}

.search-button:hover {
    background-color: #053d7e;
}

.videos-grid {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    outline: none;
}

.video-card {
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    background: var(--bg-color);
    text-decoration: none;
    color: var(--text-color);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--hover-shadow);
}

[data-theme="dark"] .video-card {
    color: #fff;
}

[data-theme="dark"] .video-card:hover {
    color: #cccccc;
}

.video-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.video-info {
    padding: 0;
    outline: none;
}

.video-title {
    font-size: 14px;
    margin: 0 0 5px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
	font-weight: 700;
}

.video-meta {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
}

.channel-link {
    color: #064794;
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
}

.channel-link:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.3s;
}

.pagination a:hover {
    background: #064794;
    color: white;
}

.pagination .current {
    background: #064794;
    color: white;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: var(--text-color);
    opacity: 0.7;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin: 20px 0;
}

.search-stats {
    margin: 20px 0;
    padding: 15px;
    font-size: 14px;
    color: var(--text-color);
    background: var(--bg-secondary);
    border-radius: 8px;
}

.theme-switch {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1000;
            background: #14191f;
            color: #fff;
            border: 0;
            border-radius: 25px;
            padding: 10px 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 2px 5px var(--shadow-color);
            transition: all 0.3s ease;
        }

        .theme-switch:hover {
            background: #fff;
            color: #333;
            box-shadow: 0 4px 8px var(--hover-shadow);
        }

        [data-theme="dark"] .theme-switch {
            background: #fff;
            color: #333;
        }

        [data-theme="dark"] .theme-switch:hover {
            background: #14191f;
            color: #fff;
        }

.footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
}

.cookie-notice {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 10px;
}

.copyright {
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.7;
    text-align: center;
} 