/* --- Small Disclaimer Header Bar --- */
.disclaimer-header-bar {
    width: 100%;
    background: #fffbe6;
    border-bottom: 2px solid #f5c542;
    color: #5d4c1b;
    box-shadow: 0 2px 8px rgba(245, 197, 66, 0.12);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 10px 3px 10px;
    z-index: 1201;
    position: relative;
}
html[data-theme="dark"] .disclaimer-header-bar {
    background: #2c2a21;
    border-bottom: 2px solid #a88732;
    color: #e6d3a1;
    box-shadow: 0 2px 8px rgba(168, 135, 50, 0.18);
}
.disclaimer-header-bar .disclaimer-icon {
    font-size: 1.1rem;
    color: #e6a700;
}
.disclaimer-header-bar .disclaimer-title {
    font-weight: 700;
    margin: 0 4px;
    color: #b97a00;
    font-size: 1rem;
}
.disclaimer-header-bar .disclaimer-text {
    margin: 0 4px;
    font-size: 0.92rem;
    color: #000;
    font-weight: 500;
}
html[data-theme="dark"] .disclaimer-header-bar .disclaimer-title {
    color: #ffd966;
}
html[data-theme="dark"] .disclaimer-header-bar .disclaimer-text {
    color: #e6d3a1;
}
@media (max-width: 600px) {
    .disclaimer-header-bar {
        font-size: 0.85rem;
        gap: 4px;
        padding: 3px 2px 2px 2px;
    }
    .disclaimer-header-bar .disclaimer-icon {
        font-size: 1rem;
    }
    .disclaimer-header-bar .disclaimer-title,
    .disclaimer-header-bar .disclaimer-text {
        font-size: 0.9rem;
    }
}
/* --- Base & Theme Variables --- */
:root {
    --ease-cubic: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: all 0.2s ease-out;
}
html[data-theme="light"] {
    --primary: #0066ff;
    --primary-dark: #0040cc;
    --primary-glow: linear-gradient(135deg, #0066ff 0%, #0040cc 100%);
    --background: #f0f2f5;
    --surface: #ffffff;
    --surface-secondary: #f8f9fc;
    --text-primary: #1c1e21;
    --text-secondary: #65676b;
    --border-color: #e0e2e7;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --glow-color: rgba(0, 102, 255, 0.15);
}
html[data-theme="dark"] {
    --primary: #2b8cff;
    --primary-dark: #0066ff;
    --primary-glow: linear-gradient(135deg, #2b8cff 0%, #0066ff 100%);
    --background: #18191a;
    --surface: #242526;
    --surface-secondary: #3a3b3c;
    --text-primary: #e4e6eb;
    --text-secondary: #b0b3b8;
    --border-color: #3e4042;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --glow-color: rgba(43, 140, 255, 0.2);
}

/* --- General & Layout --- */
html { scroll-behavior: smooth; }
body {
    background: var(--background);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding-top: 70px;
    transition: background 0.3s, color 0.3s;
}
.page-container { display: flex; }

/* --- Top Bar & Header --- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--surface-transparent, rgba(255, 255, 255, 0.8));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 1100;
    transition: var(--ease-cubic);
}
html[data-theme="dark"] .top-bar { --surface-transparent: rgba(36, 37, 38, 0.8); }
.logo { display: flex; align-items: center; gap: 12px; color: var(--text-primary); text-decoration: none; }
.logo-icon {
    background: var(--primary-glow);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px var(--glow-color);
    transition: var(--ease-cubic);
}
.logo-icon i { font-size: 1.5rem; color: #fff; }
.logo-text { font-size: 1.5rem; font-weight: 800; }
.header-controls { display: flex; align-items: center; gap: 16px; }
.header-btn {
    position: relative;
    font-size: 1.5rem;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    transition: color 0.2s, transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    gap: 0;
    width: 44px;
    height: 44px;
}
.header-btn:hover, .header-btn:focus-visible {
    color: var(--primary);
    background: var(--surface-secondary);
    outline: none;
    box-shadow: 0 2px 8px var(--glow-color);
}
#header-lang-btn span {
    display: none;
}
.theme-toggle .fa-sun { display: none; }
html[data-theme="dark"] .theme-toggle .fa-sun { display: inline-block; }
html[data-theme="dark"] .theme-toggle .fa-moon { display: none; }

/* --- Sidebar & Filters --- */
.sidebar {
    width: 260px;
    background: var(--surface);
    padding: 0;
    height: calc(100vh - 70px - 32px);
    position: sticky;
    top: 102px; /* 70px top-bar + 32px disclaimer */
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
html[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border-color);
}
.filter-form { padding: 0 16px; display: flex; flex-direction: column; height: 98%; }
.reset-filters-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px auto;
    padding: 10px 24px;
    border-radius: 8px;
    background: var(--primary-glow);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    transition: var(--ease-cubic);
    box-shadow: 0 2px 12px var(--glow-color);
}
.reset-filters-btn:hover, .reset-filters-btn:focus-visible {
    box-shadow: 0 4px 18px var(--glow-color);
    transform: translateY(-2px);
}
.filter-group {
    border: none; padding: 0 0 16px 0; margin: 0 0 16px 0;
    border-bottom: 1px solid var(--border-color);
}
.filter-group:last-of-type { border-bottom: none; }
.filter-group legend {
    font-size: 1.1rem; color: var(--primary); padding-bottom: 12px;
    margin-bottom: 8px; font-weight: 700; width: 100%; user-select: none;
}
.filter-options { display: flex; flex-direction: column; gap: 8px; padding-right: 8px; }
html[dir="ltr"] .filter-options { padding-right: 0; padding-left: 8px; }
.filter-options input[type="radio"] { position: absolute; opacity: 0; }
.filter-options label {
    display: flex; align-items: center; gap: 12px; padding: 10px 16px;
    border-radius: 10px; cursor: pointer; font-weight: 500; transition: var(--ease-out);
}
.filter-options label:hover { background: var(--surface-secondary); }
.filter-options input:checked+label {
    background: var(--primary-glow); color: #fff; font-weight: 700;
    box-shadow: 0 4px 10px var(--glow-color);
}
.filter-icon { width: 20px; text-align: center; font-size: 1.1em; }
.flag-icon { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.filter-options input:checked+label .filter-icon { color: #fff !important; }

/* Scrollable Categories */
#category-filters.category-scrollable {
  max-height: 40vh;
  overflow-y: auto;
  margin-bottom: 1rem;
}

/* --- Main Content Area --- */
.main-content {
    flex: 1;
    padding: 32px;
    margin-top: -5px;
}
html[dir="ltr"] .main-content { margin-right: 0; margin-left: 0; margin-top: -5px; }
.content-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}
.content-header h1 { font-size: 2rem; margin: 0; }
.video-count-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border-radius: 20px;
    padding: 6px 16px;
    border: 1px solid var(--border-color);
}
.video-count-label { color: var(--text-secondary); font-weight: 600; }
.video-count-number {
    font-weight: bold; font-size: 1.1em; color: var(--primary);
    background: var(--surface-secondary); border-radius: 50%;
    padding: 2px 8px;
}

/* --- Search, Channel, and Order Controls --- */
.search-container { position: relative; margin-bottom: 24px; }
.search-input {
    width: 100%; padding: 14px 20px 14px 50px; font-size: 1rem;
    font-family: inherit; border-radius: 12px; border: 1px solid var(--border-color);
    background: var(--surface); color: var(--text-primary); transition: var(--ease-cubic);
}
html[dir="ltr"] .search-input { padding: 14px 50px 14px 20px; }
.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--glow-color); }
.search-icon {
    position: absolute; top: 50%; left: 18px; transform: translateY(-50%);
    color: var(--text-secondary); font-size: 1.1rem;
}
html[dir="ltr"] .search-icon { left: auto; right: 18px; }

.channel-filter-under-search { margin-bottom: 24px; }

.channel-options-horizontal {
    display: flex;
    flex-direction: row;
    gap: 12px;
}
.channel-options-horizontal::-webkit-scrollbar { display: none; }
.channel-options-horizontal::-webkit-scrollbar-thumb { display: none; }

.channel-option-btn {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: 2em; padding: 10px 24px; font-size: 1em; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease-out;
  flex-shrink: 0;
}
.channel-option-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}
.channel-option-btn.active {
  background: var(--primary-glow);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 15px var(--glow-color);
}

#order-btn-placeholder { margin-bottom: 24px; }
.order-controls { display: flex; gap: 8px; }
.order-btn {
    background: var(--surface); color: var(--text-primary); border: 1px solid var(--border-color);
    border-radius: 8px; padding: 8px 16px; font-size: 0.9em; font-weight: 600;
    cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 8px;
}
.order-btn.active, .order-btn:hover { background: var(--primary-dark); color: #fff; border-color: var(--primary-dark); }
.selected-filters-summary {
    display: none; /* Hidden by default, shown on mobile via JS */
    margin-bottom: 18px; background: var(--surface-secondary); color: var(--text-secondary);
    border-radius: 10px; padding: 10px 16px; font-size: 0.9rem; font-weight: 500;
    border: 1px solid var(--border-color); text-align: center;
}
.selected-filters-summary b { color: var(--primary); }

/* --- Video Grid & Cards --- */
.video-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px;
}
.video-card {
    background: var(--surface); border-radius: 18px; display: flex; flex-direction: column;
    cursor: pointer; transition: var(--ease-cubic); box-shadow: 0 2px 4px var(--shadow-color);
    border: 1px solid transparent; animation: card-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}
@keyframes card-fade-in { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }
.video-card:hover, .video-card:focus-visible {
    transform: translateY(-8px); box-shadow: 0 8px 25px var(--shadow-color); outline: none;
}
.video-thumbnail { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 18px 18px 0 0; overflow: hidden; }
.video-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.video-card:hover .video-thumbnail img { transform: scale(1.08); }
.video-thumbnail-overlay {
    position: absolute; inset: 0; display: flex;
    justify-content: center; align-items: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0; transition: var(--ease-cubic);
}
.video-card:hover .video-thumbnail-overlay { opacity: 1; }
.play-icon { font-size: 3rem; color: #fff; transform: scale(0.8); transition: var(--ease-cubic); }
.video-card:hover .play-icon { transform: scale(1); }
.video-duration {
    position: absolute; bottom: 8px; right: 8px; background: rgba(0, 0, 0, 0.75);
    color: #fff; padding: 2px 8px; border-radius: 6px; font-size: 0.8rem; font-weight: 600;
}
html[dir="ltr"] .video-duration { right: auto; left: 8px; }
.video-info { padding: 16px; display: flex; gap: 12px; align-items: flex-start; }
.category-icon {
    width: 40px; height: 40px; border-radius: 50%; background: var(--primary-glow);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.video-details { display: flex; flex-direction: column; min-width: 0; }
.video-title {
    font-size: 1.05rem; font-weight: 600; line-height: 1.5; margin-bottom: 6px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.video-meta {
    display: flex;
    gap: 16px;
    font-size: 0.93rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 6px;
}
.video-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface-secondary);
    border-radius: 8px;
    padding: 3px 10px 3px 10px;
    box-shadow: 0 1px 4px var(--shadow-color);
    font-size: 0.93em;
    transition: background 0.2s;
}
.video-meta .video-channel i {
    color: var(--primary-dark);
    font-size: 1.1em;
}
.video-meta .video-date i {
    color: #b0b3b8;
    font-size: 1.08em;
}
.video-meta .video-channel {
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.2px;
}
.video-meta .video-date {
    color: #888;
    font-weight: 500;
    letter-spacing: 0.1px;
}

/* --- Modals & Popups --- */
.player-modal, .filter-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
    padding: 1rem;
}
.player-modal.active, .filter-modal.active { opacity: 1; visibility: visible; }
.modal-content, .filter-modal-content {
    background: var(--surface); border-radius: 18px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2); position: relative; transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
    width: 100%;
    max-height: 90vh;
}
.player-modal.active .modal-content, .filter-modal.active .filter-modal-content { transform: scale(1); }
#player-modal .modal-content { max-width: 900px; }
#help-modal .modal-content { max-width: 450px; }
#instructions-modal .modal-content { max-width: 550px; }
#lang-selection-modal .modal-content { max-width: 400px; padding: 0; overflow: hidden; }
.filter-modal-content { max-width: 450px; max-height: 85vh; }
.close-btn {
    position: absolute; top: 16px; right: 16px; background: var(--surface-secondary);
    border: none; color: var(--text-primary); font-size: 1.2rem; z-index: 2;
    cursor: pointer; border-radius: 50%; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px var(--shadow-color); transition: all 0.2s;
}
html[dir="rtl"] .close-btn { right: auto; left: 16px; }
.close-btn:hover { transform: scale(1.1) rotate(90deg); color: var(--primary); }
.player-container { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 18px 18px 0 0; overflow: hidden; }
.player-container iframe { width: 100%; height: 100%; border: none; }
#player-title { padding: 16px 20px; font-size: 1.2rem; font-weight: 600; border-top: 1px solid var(--border-color); }
.filter-modal-header, .help-modal-header {
    padding: 16px 24px; border-bottom: 1px solid var(--border-color); flex-shrink: 0;
    display: flex; justify-content: space-between; align-items: center;
}
.filter-modal-header h3, .help-modal-header h3 { margin: 0; font-size: 1.3rem; color: var(--primary); }
#filter-modal-options { padding: 16px 24px; overflow-y: auto; }

/* --- Help & Instructions Modals --- */
.help-modal-body { padding: 24px; }
.help-modal-body p { margin: 0 0 24px 0; text-align: center; color: var(--text-secondary); }
.contact-info { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
    display: flex; align-items: center; gap: 16px; padding: 12px 16px;
    background: var(--surface-secondary); border: 1px solid var(--border-color);
    border-radius: 12px; text-decoration: none; color: var(--text-primary);
    font-weight: 500; transition: var(--ease-cubic);
}
.contact-item:hover { background: var(--primary); color: #fff; border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px var(--glow-color); }
.contact-item i { font-size: 1.5rem; width: 28px; text-align: center; color: var(--primary); transition: color 0.3s; }
.contact-item:hover i { color: #fff; }
.instructions-content { text-align: right; overflow-y: auto; }
html[dir="ltr"] .instructions-content { text-align: left; }
.instruction-section { margin-bottom: 1.5rem; }
.instruction-section:last-child { margin-bottom: 0; }
.instruction-section h4 {
    font-size: 1.2rem; color: var(--primary); margin: 0 0 1rem 0;
    border-bottom: 2px solid var(--border-color); padding-bottom: 0.5rem;
}
.instructions-content ul { list-style: none; padding: 0; margin: 0; }
.instructions-content li { display: flex; align-items: center; gap: 12px; margin-bottom: 0.8rem; font-size: 1rem; color: var(--text-secondary); }
.instructions-content li i { color: var(--primary-dark); font-size: 1.1rem; width: 20px; text-align: center; }
.instructions-content p i { margin-left: 8px; color: var(--primary-dark); }
html[dir="ltr"] .instructions-content p i { margin-left: 0; margin-right: 8px; }

/* --- Language Selection & Disclaimer Modals --- */
.lang-modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); text-align: center; }
.lang-modal-header h3 { margin: 0; font-size: 1.4rem; color: var(--text-primary); font-weight: 700; }
.lang-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.lang-choice-btn {
    display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 20px;
    background: var(--surface-secondary); border: 1px solid var(--border-color);
    border-radius: 12px; cursor: pointer; font-size: 1.1em; color: var(--text-primary);
    font-weight: 600; text-align: right; transition: var(--ease-cubic);
}
html[dir="ltr"] .lang-choice-btn { text-align: left; }
.lang-choice-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 15px var(--glow-color); }
.lang-choice-icon { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,0.1); }

/* Disclaimer Modal */

/* --- Disclaimer Footer --- */
.disclaimer-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fffbe6;
    border-top: 1.5px solid #f5c542;
    color: #5d4c1b;
    padding: 12px 24px 10px 24px;
    font-size: 1rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
}
html[data-theme="dark"] .disclaimer-footer {
    background: #2c2a21;
    border-color: #a88732;
    color: #e6d3a1;
}
.disclaimer-footer .disclaimer-icon { font-size: 1.5rem; color: #e6a700; margin-bottom: 0; }
.disclaimer-footer .disclaimer-title { font-weight: 700; font-size: 1.05rem; color: #333; margin-bottom: 0; }
html[data-theme="dark"] .disclaimer-footer .disclaimer-title { color: #fff; }
.disclaimer-footer .disclaimer-text { font-size: 1rem; line-height: 1.6; margin-bottom: 0; }

/* --- Loader & No Results --- */
#scroll-trigger { height: 50px; width: 100%; grid-column: 1 / -1; }
.loader { width: 48px; height: 48px; border: 5px solid var(--primary); border-bottom-color: transparent; border-radius: 50%; display: none; margin: 20px auto; animation: rotation 1s linear infinite; }
@keyframes rotation { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.no-results {
    grid-column: 1 / -1; text-align: center; color: var(--text-secondary);
    padding: 60px 20px; background: var(--surface); border-radius: 18px;
    border: 2px dashed var(--border-color); display: flex; flex-direction: column;
    align-items: center; justify-content: center;
}
.no-results i { font-size: 3rem; margin-bottom: 16px; color: var(--primary); }
.no-results p { font-size: 1.2rem; font-weight: 500; margin: 0 0 24px 0; }
.no-results-reset-btn {
    background: var(--primary-glow); color: #fff; border: none; padding: 10px 20px;
    font-size: 1rem; font-weight: 600; border-radius: 12px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 8px; transition: var(--ease-cubic);
    box-shadow: 0 4px 12px var(--glow-color);
}
.no-results-reset-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px var(--glow-color); }

/* --- Floating Controls (Mobile) --- */
/* Floating Controls: Only show on screens <= 1024px */
.floating-controls {
    display: none;
}
@media (max-width: 1024px) {
    .floating-controls {
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 1050;
        display: flex;
        flex-direction: row;
        gap: 12px;
        flex-wrap: wrap;
        background: var(--surface);
        border-radius: 18px;
        box-shadow: 0 2px 12px var(--shadow-color);
        padding: 10px 18px;
        align-items: center;
        justify-content: center;
    }
    html[dir="ltr"] .floating-controls {
        right: auto;
        left: 24px;
    }
}
.floating-btn {
    background: var(--primary-glow); color: #fff; border: none; border-radius: 50%;
    width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 15px var(--glow-color); cursor: pointer; transition: var(--ease-cubic);
}
.floating-btn:hover { transform: scale(1.05) translateY(-2px); }
.floating-icon-container { font-size: 1.5rem; }
.floating-btn.reset-btn {
    background: var(--surface); color: var(--text-secondary);
    box-shadow: 0 4px 15px var(--shadow-color); border: 1px solid var(--border-color);
}
.floating-btn.reset-btn .floating-icon-container { font-size: 1.3rem; }
.floating-btn.reset-btn:hover { color: var(--primary); border-color: var(--primary); }

/* --- RESPONSIVE STYLES --- */
@media (max-width: 1024px) {
    .sidebar { display: none; }
    .main-content { margin-right: 0; margin-left: 0; padding: 16px; }
    .logo-text { display: none; }
    .top-bar { padding: 0 16px; }
    .content-header h1 { font-size: 1.5rem; text-align: center;}
    .content-header { flex-direction: column; align-items: center; }
    .channel-filter-under-search { display: block; }
    .order-controls { justify-content: center; }
    .floating-controls {
        position: fixed; bottom: 24px; right: 24px; z-index: 1050;
        display: flex; flex-direction: row; gap: 16px;
        flex-wrap: wrap;
    }
    html[dir="ltr"] .floating-controls { right: auto; left: 24px; }

    /* Hide channel buttons in sidebar */
    #channel-filters-container { display: none !important; }

    /* Make channel buttons horizontal under search */
    .channel-options-horizontal {
        flex-direction: row !important;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 10px;
        scrollbar-color: var(--primary) var(--surface-secondary);
    }
    .channel-options-horizontal::-webkit-scrollbar { height: 6px; background: var(--surface-secondary); display: block; }
    .channel-options-horizontal::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; display: block; }
}

@media (max-width: 768px) {
    .video-grid { grid-template-columns: 1fr; gap: 20px; }
    #channel-filters-container { display: none; }
}

@media (max-width: 480px) {
    body { padding-top: 60px; }
    .top-bar { height: 60px; }
    .main-content { padding: 12px; }
    .floating-controls { bottom: 16px; right: 16px; flex-direction: row; gap: 10px; }
    html[dir="ltr"] .floating-controls { right: auto; left: 16px; }
    .floating-btn { width: 52px; height: 52px; }
    .floating-icon-container { font-size: 1.3rem; }
    .header-btn {
        font-size: 1.2rem;
        width: 38px;
        height: 38px;
        padding: 6px;
    }
    #header-lang-btn span { display: none; }

    /* Responsive Modals */
    .player-modal, .filter-modal { padding: 0.5rem; }
    .help-modal-body, #filter-modal-options { padding: 16px; }
    .help-modal-header h3, .filter-modal-header h3, .lang-modal-header h3 { font-size: 1.2rem; }
    .close-btn { top: 8px; right: 8px; width: 32px; height: 32px; }
    html[dir="rtl"] .close-btn { right: auto; left: 8px; }

    /* Responsive Disclaimer Modal */
    #disclaimer-modal .disclaimer-content { padding: 24px 16px 16px; }
    #disclaimer-modal .disclaimer-icon { font-size: 2.2rem; margin-bottom: 12px; }
    #disclaimer-modal .disclaimer-title { font-size: 1.15rem; }
    #disclaimer-modal .disclaimer-text { font-size: 0.9rem; line-height: 1.5; margin-bottom: 20px;}
    #disclaimer-modal .disclaimer-ok-btn { padding: 10px 24px; font-size: 1rem; }
}

/* --- Donation Button & Bar --- */
/* Donation bar: overlay, not blocking layout, and always above disclaimer */
.donation-bar {
    position: static;
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 18px 0 0 0;
    z-index: 1;
    pointer-events: auto;
    background: none;
    padding: 0;
}
/* Donation button: overlay, not blocking layout, not taking block space */
.donate-btn {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(90deg, #ff0000 0%, #ff5252 100%);
    color: #fff !important;
    font-weight: 900;
    font-size: 0.98rem;
    padding: 0.45em 1.2em;
    border-radius: 22px;
    box-shadow: 0 0 12px 1px #ff000088, 0 2px 8px #ff000044;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    border: none;
    outline: none;
    cursor: pointer;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    border: 2px solid #fff3e0;
    position: relative;
    animation: donate-impulse 1.1s infinite cubic-bezier(0.4,0,0.2,1);
    z-index: 1;
}
.donate-btn i {
    font-size: 1.1em;
    color: #fff;
    animation: pulse-heart 1.1s infinite alternate;
    filter: drop-shadow(0 0 4px #ff0000cc);
}
@keyframes donate-impulse {
    0% {
        box-shadow: 0 0 8px 1px #ff0000cc, 0 2px 8px #ff000044;
        transform: scale(1);
    }
    40% {
        box-shadow: 0 0 18px 4px #ff5252cc, 0 2px 8px #ff000044;
        transform: scale(1.08);
    }
    60% {
        box-shadow: 0 0 24px 6px #ff0000cc, 0 2px 8px #ff000044;
        transform: scale(0.97);
    }
    100% {
        box-shadow: 0 0 8px 1px #ff0000cc, 0 2px 8px #ff000044;
        transform: scale(1);
    }
}