        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
:root {
    --bg-primary: #0f0f14;
    --bg-secondary: #141419;
    --bg-card: #1a1a23;
    --text-primary: #e5e5e7;
    --text-secondary: #8a8a8d;
    --accent: linear-gradient(135deg, #e50914 0%, #ff1744 100%);
    --accent-hover: linear-gradient(135deg, #ff1744 0%, #ff4081 100%);
    --accent-solid: #e50914;
    --border: #2a2a35;
    --overlay: rgba(0, 0, 0, 0.7);
}

/* Light theme using data-theme attribute */
[data-theme="light"],
body.light-theme {
    --bg-primary: #f5f5f7;
    --bg-secondary: #fafafa;
    --bg-card: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --border: #e5e5e7;
    --overlay: rgba(0, 0, 0, 0.5);
}

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            transition: background 0.3s, color 0.3s;
            min-height: 100vh;
        }

        /* Header */
        .header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            display: flex;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            gap: 16px;
        }

        .burger-menu {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 20px;
            cursor: pointer;
            padding: 8px;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 8px;
            text-decoration: none;
            color: var(--text-primary);
            font-weight: 700;
            font-size: 18px;
        }

        .logo i {
            background: var(--accent);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            font-size: 24px;
        }

        .nav-buttons {
            display: flex;
            gap: 4px;
            margin-left: 16px;
        }

        .nav-btn {
            padding: 8px 16px;
            background: none;
            border: none;
            color: var(--text-primary);
            cursor: pointer;
            border-radius: 4px;
            font-size: 14px;
            transition: background 0.2s;
        }

        .nav-btn:hover {
            background: var(--bg-card);
        }

        .nav-btn.active {
            background: var(--accent);
            color: white;
        }

        .header-right {
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .search-form {
            display: flex;
            align-items: center;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 6px 16px;
            width: 300px;
        }

        .search-form input {
            flex: 1;
            background: none;
            border: none;
            color: var(--text-primary);
            outline: none;
            font-size: 14px;
        }

        .search-form i {
            color: var(--text-secondary);
            font-size: 14px;
        }

        .search-btn-mobile {
            display: none;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 18px;
            cursor: pointer;
            padding: 8px;
        }

        .login-btn {
            background: var(--accent);
            border: none;
            color: white;
            padding: 8px 20px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.3s;
        }

        .login-btn:hover {
            background: var(--accent-hover);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
        }

        .login-btn i {
            font-size: 14px;
        }

        /* Sidebar */
        .sidebar {
            position: fixed;
            left: 0;
            top: 56px;
            bottom: 0;
            width: 220px;
            background: var(--bg-secondary);
            border-right: 1px solid var(--border);
            overflow-y: auto;
            padding: 16px 0;
            z-index: 900;
        }

        .sidebar-section {
            margin-bottom: 24px;
        }

        .sidebar-title {
            padding: 0 16px;
            font-size: 12px;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }

        .sidebar-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            color: var(--text-primary);
            text-decoration: none;
            font-size: 14px;
            transition: background 0.2s;
            cursor: pointer;
            position: relative;
        }

        .sidebar-item:hover {
            background: var(--bg-card);
        }

        .sidebar-item i {
            width: 20px;
            font-size: 16px;
            color: var(--text-secondary);
        }

        .sidebar-item-content {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .item-count {
            font-size: 11px;
            color: var(--text-secondary);
            background: var(--bg-card);
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: 600;
        }

        .sidebar-admin {
            margin-top: auto;
            border-top: 1px solid var(--border);
            padding-top: 16px;
        }

        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 56px;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--overlay);
            z-index: 850;
        }

        /* Right Sidebar */
        .right-sidebar {
            position: fixed;
            right: 0;
            top: 56px;
            bottom: 0;
            width: 280px;
            background: var(--bg-secondary);
            border-left: 1px solid var(--border);
            overflow-y: auto;
            padding: 16px;
            z-index: 800;
        }

        .activity-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 16px;
        }

        .activity-item {
            display: flex;
            gap: 12px;
            padding: 12px;
            background: var(--bg-card);
            border-radius: 8px;
            margin-bottom: 12px;
        }

        .activity-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: var(--accent);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 16px;
            flex-shrink: 0;
        }

        .activity-content {
            flex: 1;
            font-size: 13px;
        }

        .activity-user {
            font-weight: 600;
            color: var(--text-primary);
        }

        .activity-action {
            color: var(--text-secondary);
            margin: 4px 0;
        }

        .activity-time {
            font-size: 11px;
            color: var(--text-secondary);
        }

        /* Main Content */
        .main-content {
            margin-left: 220px;
            margin-right: 280px;
            margin-top: 56px;
            padding: 24px;
            max-width: 1400px;
            min-height: calc(100vh - 136px);
        }

        /* Tags Slider */
        .tags-slider-container {
            margin-bottom: 24px;
            position: relative;
        }

        .tags-slider {
            display: flex;
            gap: 8px;
            overflow-x: auto;
            padding: 4px 0;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .tags-slider::-webkit-scrollbar {
            display: none;
        }

        /* Page Header */
        .page-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--border);
        }

        .page-header-icon {
            width: 40px;
            height: 40px;
            background: var(--accent);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .page-header-icon i {
            color: white;
            font-size: 16px;
        }

        .page-header-content {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .page-header-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
            line-height: 1.2;
        }

        .page-header-count {
            font-size: 12px;
            color: var(--text-secondary);
        }

        @media (max-width: 768px) {
            .page-header {
                margin-bottom: 12px;
                padding-bottom: 10px;
            }

            .page-header-icon {
                width: 36px;
                height: 36px;
            }

            .page-header-icon i {
                font-size: 14px;
            }

            .page-header-title {
                font-size: 16px;
            }
        }

        .tag-item {
            flex-shrink: 0;
            padding: 8px 16px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            color: var(--text-primary);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
            white-space: nowrap;
        }

        .tag-item:hover {
            background: var(--accent);
            color: white;
            border-color: transparent;
            transform: translateY(-2px);
        }

        .tag-item.active {
            background: var(--accent);
            color: white;
            border-color: transparent;
        }

        .video-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
            margin-bottom: 32px;
        }

        .video-card {
            background: var(--bg-card);
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.3s;
            cursor: pointer;
            border: 1px solid var(--border);
        }

        .video-card:hover {
            transform: translateY(-6px);
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
            border-color: var(--accent-solid);
        }

        .video-thumbnail {
            position: relative;
            width: 100%;
            padding-top: 56.25%;
            background: var(--bg-primary);
            overflow: hidden;
        }

        .thumbnail-img, .thumbnail-video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }


        .video-card:hover .thumbnail-img {
            opacity: 0;
        }

        .video-card:hover .thumbnail-video {
            display: block;
            opacity: 1;
        }

        /* Mobile touch support */
        .video-card.playing .thumbnail-img {
            opacity: 0;
        }

        .video-card.playing .thumbnail-video {
            display: block;
            opacity: 1;
        }

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

        .video-quality {
            position: absolute;
            top: 8px;
            left: 8px;
            background: var(--accent);
            color: white;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 11px;
            font-weight: 700;
        }

        .video-info {
            padding: 14px;
        }

        .video-category {
            display: inline-block;
            background: var(--bg-primary);
            color: var(--accent-solid);
            font-size: 11px;
            font-weight: 600;
            padding: 4px 10px;
            border-radius: 12px;
            margin-bottom: 8px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .video-title {
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 10px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            color: var(--text-primary);
        }

        .video-meta {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .video-meta-item {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .video-meta-item i {
            font-size: 12px;
        }

        /* Pagination */
        .pagination {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            margin: 32px 0;
        }

        .page-btn {
            min-width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-primary);
            cursor: pointer;
            font-size: 14px;
            transition: all 0.2s;
        }

        .page-btn:hover {
            background: var(--accent);
            color: white;
            border-color: transparent;
        }

        .page-btn.active {
            background: var(--accent);
            color: white;
            border-color: transparent;
        }

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

        /* Footer */
        .footer {
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
            padding: 20px 24px;
            margin-left: 220px;
            margin-right: 280px;
        }

        .footer-content {
            max-width: 1400px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 16px;
        }

        .footer-logo {
            display: flex;
            align-items: center;
            gap: 8px;
            font-weight: 700;
            font-size: 16px;
        }

        .footer-logo i {
            background: var(--accent);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            font-size: 20px;
        }

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

        .footer-link {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 13px;
            transition: color 0.2s;
        }

        .footer-link:hover {
            color: var(--text-primary);
        }

        .footer-controls {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .theme-toggle {
            background: var(--bg-card);
            border: 1px solid var(--border);
            color: var(--text-primary);
            width: 36px;
            height: 36px;
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            transition: all 0.2s;
        }

        .theme-toggle:hover {
            background: var(--accent);
            color: white;
            border-color: transparent;
        }

        .lang-select {
            background: var(--bg-card);
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: 8px 12px;
            border-radius: 6px;
            cursor: pointer;
            font-size: 13px;
            outline: none;
        }

        /* Mobile Search Popup */
        .search-popup {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--bg-primary);
            z-index: 1100;
            padding: 16px;
        }

        .search-popup-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 16px;
        }

        .search-popup-close {
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 20px;
            cursor: pointer;
            padding: 8px;
        }

        .search-popup input {
            flex: 1;
            background: var(--bg-card);
            border: 1px solid var(--border);
            color: var(--text-primary);
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 16px;
            outline: none;
        }

        /* Responsive */
        @media (max-width: 1400px) {
            .right-sidebar {
                display: none;
            }
            .main-content, .footer {
                margin-right: 0;
            }
        }

        @media (max-width: 1024px) {
            .video-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        @media (max-width: 768px) {
            .burger-menu {
                display: block;
            }

            .nav-buttons, .search-form, .logo span {
                display: none;
            }

            .search-btn-mobile {
                display: block;
            }

            .sidebar {
                transform: translateX(-100%);
            }

            .sidebar.ready {
                transition: transform 0.3s;
            }

            .sidebar.active {
                transform: translateX(0);
            }

            .sidebar-overlay.active {
                display: block;
            }

            .main-content, .footer {
                margin-left: 0;
            }

            .video-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
            }

            .header {
                padding: 0 12px;
            }

            .main-content {
                padding: 16px 12px;
                min-height: auto;
            }
        }

        @media (max-width: 480px) {
            .video-grid {
                grid-template-columns: 1fr;
            }

            .footer-content {
                flex-direction: column;
                text-align: center;
            }
        }

























/* ========================================
   Стилі для checkbox-label блоку
   ======================================== */

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    color: var(--text-primary);
    line-height: 1.5;
    padding: 4px 0;
}

/* Кастомний чекбокс */
.checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 4px;
    background: var(--bg-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover {
    border-color: var(--accent-solid);
}

.checkbox-label input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent-solid);
}

/* Галочка */
.checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* Або можна використати іконку */
.checkbox-label input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    display: none; /* Показати якщо прибрати ::after */
}

/* Фокус для доступності */
.checkbox-label input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2);
}

/* Посилання всередині label */
.checkbox-label a {
    color: var(--accent-solid);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid transparent;
}

.checkbox-label a:hover {
    border-bottom-color: var(--accent-solid);
    opacity: 0.8;
}

.checkbox-label a:focus {
    outline: 2px solid var(--accent-solid);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Стан disabled */
.checkbox-label input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkbox-label:has(input[type="checkbox"]:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Анімація при кліку */
.checkbox-label input[type="checkbox"]:active {
    transform: scale(0.95);
}

/* Альтернативний стиль з іконками FontAwesome */
.checkbox-label.with-icon input[type="checkbox"]::after {
    content: '\f00c'; /* fa-check */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
}

/* Стиль помилки для невалідного чекбокса */
.checkbox-label input[type="checkbox"]:invalid {
    border-color: var(--error, #ef4444);
}

.checkbox-label input[type="checkbox"]:invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Для темної теми */
[data-theme="dark"] .checkbox-label input[type="checkbox"] {
    background: var(--bg-secondary);
    border-color: var(--border);
}

/* Для світлої теми */
[data-theme="light"] .checkbox-label input[type="checkbox"] {
    background: white;
    border-color: #d1d5db;
}

[data-theme="light"] .checkbox-label input[type="checkbox"]:hover {
    border-color: var(--accent-solid);
}

/* Responsive */
@media (max-width: 480px) {
    .checkbox-label {
        font-size: 13px;
        gap: 8px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
}
