/* ============================================
   CSS Variables - Dark Theme
   ============================================ */
:root {
    /* Dark Theme Colors */
    --bg-primary: #0f0f0f;
    --bg-secondary: #181818;
    --bg-card: #212121;
    --bg-hover: #2d2d2d;
    --accent-primary: #ff0000;
    --accent-secondary: #3ea6ff;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #717171;
    --border-color: #303030;
    --border-hover: #404040;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

html {
    background: var(--bg-primary) !important;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Предотвращаем горизонтальный скролл */
* {
    max-width: 100%;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.navbar {
    padding: 0.75rem 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.navbar-brand:hover {
    opacity: 0.8;
}

.brand-text {
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    color: var(--text-secondary);
    font-size: 0.85em;
    font-weight: 400;
}

.navbar-search {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    z-index: 1;
    font-size: 1rem;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    color: var(--text-primary);
    width: 100%;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-hover);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.nav-item {
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
    font-size: 0.9375rem;
}

.nav-link i {
    font-size: 1.1rem;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.navbar-toggler:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.5em;
    height: 1.5em;
}

.navbar-collapse {
    margin-top: 1rem;
}

@media (min-width: 992px) {
    .navbar-collapse {
        margin-top: 0;
    }
    
    .navbar-search {
        margin: 0 1rem;
    }
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
    padding-top: 0;
    background: var(--bg-primary);
    min-height: calc(100vh - 60px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    padding: 3rem 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.feature-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.hero-feature i {
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.btn-primary {
    background: var(--accent-primary);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: #cc0000;
    color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hero-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 2rem;
}

/* ============================================
   Categories Section
   ============================================ */
.categories-section {
    padding: 2rem 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    overflow: visible;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
}

.categories-section .container {
    overflow: visible;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.categories-section .row.categories-grid {
    overflow: visible;
    min-height: auto;
    height: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.videos-section {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
}

.videos-section .container {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all-link {
    color: var(--accent-secondary);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.view-all-link:hover {
    color: var(--accent-primary);
}

.categories-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    gap: 1rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    min-height: auto !important;
    height: auto !important;
}

.categories-grid .category-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Переопределяем Bootstrap row для categories-grid */
.row.categories-grid {
    display: grid !important;
    flex-wrap: nowrap !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.row.categories-grid > * {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.category-card:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.category-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--accent-secondary);
}

.category-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.category-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   Filters Section
   ============================================ */
.filters-section {
    padding: 1.5rem 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.filters-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.filter-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-select,
.form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    width: 100%;
}

.filter-select:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-secondary);
    background: var(--bg-hover);
}

/* ============================================
   Videos Section - YouTube Style Grid
   ============================================ */
.videos-section {
    padding: 2rem 0;
    background: var(--bg-primary);
}

.videos-section .section-header {
    margin-bottom: 1.5rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* YouTube-style video grid - 3 columns */
.videos-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

/* Video Card - YouTube Style */
.video-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
}

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

.video-duration {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.video-source-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.video-info {
    display: flex;
    gap: 0.75rem;
}

.video-channel-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-details {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.video-channel-name {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.video-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-views::after {
    content: '•';
    margin-left: 0.5rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .videos-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
    }
    
    .video-thumbnail {
        margin-bottom: 0.625rem;
    }
    
    .video-title {
        font-size: 0.84375rem;
    }
    
    .video-channel-name {
        font-size: 0.78125rem;
    }
    
    .video-meta {
        font-size: 0.78125rem;
    }
    
    .search-input {
        width: 200px;
    }
    
    .categories-grid,
    .row.categories-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
        gap: 1rem !important;
        flex-wrap: nowrap !important;
    }
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .video-card {
        margin-bottom: 0.5rem;
    }
    
    .video-thumbnail {
        margin-bottom: 0.5rem;
        border-radius: var(--radius-sm);
    }
    
    .video-info {
        gap: 0.5rem;
    }
    
    .video-channel-icon {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .video-title {
        font-size: 0.8125rem;
        line-height: 1.3;
        margin-bottom: 0.2rem;
    }
    
    .video-channel-name {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .video-meta {
        font-size: 0.75rem;
        gap: 0.375rem;
    }
    
    .video-duration {
        font-size: 0.6875rem;
        padding: 0.2rem 0.4rem;
        bottom: 0.375rem;
        right: 0.375rem;
    }
    
    .video-source-badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.4rem;
        top: 0.375rem;
        right: 0.375rem;
    }
    
    .videos-section {
        padding: 1.5rem 0;
    }
    
    .videos-section .section-header {
        margin-bottom: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .section-subtitle {
        font-size: 0.8125rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .search-input {
        width: 150px;
    }
    
    .categories-grid,
    .row.categories-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)) !important;
        gap: 0.75rem !important;
        flex-wrap: nowrap !important;
    }
    
    .category-card {
        padding: 0.75rem 0.5rem;
    }
    
    .category-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .category-name {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }
    
    .category-count {
        font-size: 0.6875rem;
    }
    
    .container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .videos-grid,
    .categories-grid {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .video-card,
    .category-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 576px) {
    .videos-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }
    
    .video-card {
        margin-bottom: 0.5rem;
    }
    
    .video-thumbnail {
        margin-bottom: 0.5rem;
    }
    
    .video-info {
        gap: 0.5rem;
    }
    
    .video-channel-icon {
        width: 28px;
        height: 28px;
        font-size: 0.6875rem;
    }
    
    .video-title {
        font-size: 0.75rem;
        line-height: 1.25;
        -webkit-line-clamp: 2;
    }
    
    .video-channel-name {
        font-size: 0.6875rem;
    }
    
    .video-meta {
        font-size: 0.6875rem;
        flex-wrap: wrap;
    }
    
    .video-duration {
        font-size: 0.625rem;
        padding: 0.15rem 0.35rem;
    }
    
    .video-source-badge {
        font-size: 0.625rem;
        padding: 0.15rem 0.35rem;
    }
    
    .videos-section {
        padding: 1rem 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .section-title {
        font-size: 1.125rem;
    }
    
    .section-subtitle {
        font-size: 0.75rem;
    }
    
    .categories-grid,
    .row.categories-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important;
        gap: 0.5rem !important;
        flex-wrap: nowrap !important;
    }
    
    .category-card {
        padding: 0.5rem 0.375rem;
    }
    
    .category-icon {
        font-size: 1.25rem;
        margin-bottom: 0.375rem;
    }
    
    .category-name {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .category-count {
        font-size: 0.625rem;
    }
    
    .filters-card .row {
        flex-direction: column;
    }
    
    .filters-card .col-md-3 {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .search-wrapper {
        width: 100%;
        margin-top: 1rem;
    }
    
    .search-input {
        width: 100%;
    }
    
    .container {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .videos-grid,
    .categories-grid {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .video-card,
    .category-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .video-thumbnail {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .video-thumbnail img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    #loadMoreBtn {
        width: 100%;
        margin-top: 1rem;
    }
}

/* ============================================
   Extra Small Devices (до 400px)
   ============================================ */
@media (max-width: 400px) {
    .videos-grid {
        gap: 0.5rem !important;
    }
    
    .video-thumbnail {
        margin-bottom: 0.375rem;
    }
    
    .video-channel-icon {
        width: 24px;
        height: 24px;
        font-size: 0.625rem;
    }
    
    .video-title {
        font-size: 0.6875rem;
        -webkit-line-clamp: 2;
    }
    
    .video-channel-name {
        font-size: 0.625rem;
    }
    
    .video-meta {
        font-size: 0.625rem;
    }
    
    .video-duration {
        font-size: 0.5625rem;
        padding: 0.1rem 0.3rem;
    }
    
    .video-source-badge {
        font-size: 0.5625rem;
        padding: 0.1rem 0.3rem;
    }
    
    .categories-grid,
    .row.categories-grid {
        display: grid !important;
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)) !important;
        gap: 0.375rem !important;
        flex-wrap: nowrap !important;
    }
    
    .category-card {
        padding: 0.375rem 0.25rem;
    }
    
    .category-icon {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .category-name {
        font-size: 0.6875rem;
    }
    
    .category-count {
        font-size: 0.5625rem;
    }
    
    .container {
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .videos-grid,
    .categories-grid {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .video-card,
    .category-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .section-subtitle {
        font-size: 0.6875rem;
    }
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner-border {
    color: var(--accent-primary);
}

/* ============================================
   Bootstrap Overrides
   ============================================ */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.container {
    max-width: 1200px;
    background: transparent !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
}

/* Force dark theme on all Bootstrap elements */
.navbar,
.navbar-collapse,
.navbar-nav,
.nav-item,
.nav-link,
.card,
.card-body,
.modal-content,
.dropdown-menu,
.list-group,
.list-group-item {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Override Bootstrap form elements */
.form-control,
.form-select,
.input-group-text {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

/* Remove any white backgrounds from Bootstrap */
.bg-body,
.bg-body-tertiary {
    background: var(--bg-primary) !important;
}

/* Remove all white backgrounds */
.bg-white,
.bg-light,
.bg-secondary {
    background: var(--bg-card) !important;
}

.text-dark {
    color: var(--text-primary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.border {
    border-color: var(--border-color) !important;
}

/* Override Bootstrap container */
.container {
    background: transparent !important;
}

/* Override all sections */
section {
    background: var(--bg-primary) !important;
}

main {
    background: var(--bg-primary) !important;
}

/* Remove any white overlays */
.hero-section,
.categories-section,
.filters-section,
.videos-section {
    background: var(--bg-primary) !important;
}
