:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --card-bg: #1e293b;
    --shadow: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.3);
}

/* Dark Mode Bootstrap Overrides */
[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .text-secondary {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-color) !important;
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light {
    background-color: var(--card-bg) !important;
}

[data-theme="dark"] .card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .card-title,
[data-theme="dark"] .card-text,
[data-theme="dark"] .card-body {
    color: var(--text-color);
}

[data-theme="dark"] .modal-content {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--border-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-muted);
}

[data-theme="dark"] .input-group-text {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

[data-theme="dark"] .list-group-item {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-theme="dark"] .table {
    color: var(--text-color);
}

[data-theme="dark"] .table-bordered {
    border-color: var(--border-color);
}

[data-theme="dark"] h1, [data-theme="dark"] h2, 
[data-theme="dark"] h3, [data-theme="dark"] h4, 
[data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--text-color);
}

[data-theme="dark"] p {
    color: var(--text-color);
}

[data-theme="dark"] .section-title {
    color: var(--text-color);
}

[data-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .border-bottom {
    border-bottom-color: var(--border-color) !important;
}

[data-theme="dark"] .close, 
[data-theme="dark"] .btn-close {
    filter: invert(1);
}

[data-theme="dark"] .stat-card h3,
[data-theme="dark"] .stat-number {
    color: var(--text-color);
}

[data-theme="dark"] .stat-card p,
[data-theme="dark"] .stat-label {
    color: var(--text-muted);
}

[data-theme="dark"] .newsletter-form .form-control {
    background: var(--bg-secondary);
    color: var(--text-color);
}

[data-theme="dark"] .category-card,
[data-theme="dark"] .radio-card,
[data-theme="dark"] .channel-card {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .category-card h5,
[data-theme="dark"] .radio-card h5,
[data-theme="dark"] .channel-card h5,
[data-theme="dark"] .category-card h6,
[data-theme="dark"] .radio-card h6,
[data-theme="dark"] .channel-card h6 {
    color: var(--text-color);
}

[data-theme="dark"] .footer {
    background: var(--bg-secondary);
    color: var(--text-color);
}

[data-theme="dark"] .footer a {
    color: var(--text-muted);
}

[data-theme="dark"] .footer a:hover {
    color: var(--primary-color);
}

[data-theme="dark"] .breadcrumb-item,
[data-theme="dark"] .breadcrumb-item a {
    color: var(--text-muted);
}

[data-theme="dark"] .breadcrumb-item.active {
    color: var(--text-color);
}

[data-theme="dark"] .accordion-button {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .accordion-body {
    background: var(--bg-secondary);
    color: var(--text-color);
}

[data-theme="dark"] .offcanvas {
    background: var(--card-bg);
    color: var(--text-color);
}

[data-theme="dark"] .toast {
    background: var(--card-bg);
    color: var(--text-color);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

.main-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.sticky-header {
    backdrop-filter: blur(10px);
    background: rgba(var(--card-bg-rgb, 255, 255, 255), 0.95);
}

[data-theme="dark"] .sticky-header {
    background: rgba(30, 41, 59, 0.95);
}

.sticky-header.scrolled {
    box-shadow: var(--shadow-lg);
}

.mega-dropdown {
    position: static;
}

.mega-menu {
    width: 100%;
    left: 0;
    right: 0;
    padding: 0;
    border: none;
    border-radius: 0 0 1rem 1rem;
    box-shadow: var(--shadow-lg);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mega-menu-content {
    padding: 1.5rem;
}

.mega-menu-title {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s;
}

.mega-menu-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
}

.mega-menu-item i {
    font-size: 1.25rem;
    color: var(--primary-color);
    width: 24px;
}

.mega-menu-item:hover i {
    color: white;
}

.mega-menu-item span {
    flex: 1;
    font-weight: 500;
}

.mega-menu-item small {
    background: rgba(99, 102, 241, 0.15);
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    color: var(--primary-color);
}

.mega-menu-item:hover small {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.mega-menu-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.search-wrapper {
    position: relative;
    width: 280px;
}

.search-input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    z-index: 2;
}

.search-input {
    padding-left: 40px;
    border-radius: 2rem;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.search-input:focus {
    background: var(--bg-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    margin-top: 0.5rem;
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-autocomplete.show {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
}

.autocomplete-item:hover {
    background: var(--bg-secondary);
}

.autocomplete-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: var(--bg-secondary);
}

.autocomplete-item-info {
    flex: 1;
}

.autocomplete-item-name {
    font-weight: 500;
    margin-bottom: 0.1rem;
}

.autocomplete-item-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.autocomplete-item-type {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    text-transform: uppercase;
    font-weight: 600;
}

.autocomplete-item-type.tv {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
}

.autocomplete-item-type.radio {
    background: rgba(236, 72, 153, 0.15);
    color: var(--secondary-color);
}

.autocomplete-loading,
.autocomplete-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

/* Dark mode logo adjustments */
[data-theme="dark"] .navbar-brand img {
    filter: brightness(1.2) contrast(1.1);
}

[data-theme="dark"] .navbar-brand span {
    color: #ffffff !important;
}

[data-theme="dark"] .footer-brand img {
    filter: brightness(1.2) contrast(1.1);
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    padding: 0.5rem;
    background: var(--bg-secondary);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid var(--primary-color);
}

.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='%236366f1' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="dark"] .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='%23f1f5f9' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991px) {
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
    }
    
    .navbar-nav {
        flex-direction: column;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mega-menu {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        background: var(--bg-secondary) !important;
        margin: 0.5rem 0;
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr !important;
    }
    
    .search-wrapper {
        margin-top: 1rem;
        width: 100%;
    }
    
    .navbar-nav .d-flex {
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

.nav-link {
    color: var(--text-color) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.nav-link:hover {
    background: var(--bg-secondary);
}

.dropdown-menu {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-color);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--primary-color);
    color: white;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title i {
    color: var(--primary-color);
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.channel-card .card-img-top {
    height: 160px;
    object-fit: contain;
    background: var(--bg-secondary);
    padding: 1rem;
}

.channel-card .card-body {
    padding: 1rem;
}

.channel-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.channel-card .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.badge-live {
    background: #ef4444;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.player-container {
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 16/9;
    margin-bottom: 1.5rem;
}

.player-container iframe,
.player-container video {
    width: 100%;
    height: 100%;
    border: none;
}

.player-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
}

.player-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

.player-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    z-index: 10;
    padding: 2rem;
}

.player-error i {
    color: #f59e0b;
}

.player-container {
    position: relative;
}

.audio-player {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    padding: 2rem;
    color: white;
    text-align: center;
    margin-bottom: 1.5rem;
}

.audio-player audio {
    width: 100%;
    margin-top: 1rem;
}

.channel-info {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.channel-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

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

.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    transition: transform 0.2s;
}

.share-buttons a:hover {
    transform: scale(1.1);
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #0088cc; }

.sidebar {
    position: sticky;
    top: 100px;
}

/* Remove sticky on mobile - prevents overlap issues */
@media (max-width: 991px) {
    .sidebar {
        position: relative;
        top: auto;
    }
}

.ad-container {
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    min-height: 100px;
}

.category-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.category-content h1 {
    margin-bottom: 1rem;
}

.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
    position: relative;
    z-index: 10;
}

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

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

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

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

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    transition: all 0.2s;
}

.social-links a:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 2rem 2rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-slider-section {
    position: relative;
    margin-bottom: 2rem;
}

.hero-slider {
    position: relative;
    height: 400px;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-slider .slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    transform: scale(1.1);
}

.hero-slider .slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.85), rgba(236, 72, 153, 0.85));
}

.hero-slider .slide-info {
    color: white;
    max-width: 600px;
}

.hero-slider .slide-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-slider .slide-category {
    font-size: 1.2rem;
    opacity: 0.9;
}

.slide-logo-showcase {
    position: relative;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.slide-logo-showcase .logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(20px);
    animation: pulse-glow 2s ease-in-out infinite;
}

.slide-featured-logo {
    position: relative;
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 40px rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
}

.slide-featured-logo:hover {
    transform: scale(1.05);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 10;
}

.slider-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.slider-btn:hover {
    background: rgba(255,255,255,0.4);
}

.slider-dots {
    display: flex;
    gap: 8px;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dots .dot.active {
    background: white;
    transform: scale(1.2);
}

.hero-stats {
    background: var(--card-bg);
    border-radius: 1rem;
    margin: -40px auto 0;
    max-width: 600px;
    position: relative;
    z-index: 5;
    box-shadow: var(--shadow-lg);
}

.stats-row {
    display: flex;
    justify-content: space-around;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat-item i {
    font-size: 1.75rem;
    color: var(--primary-color);
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
}

[data-theme="dark"] .stat-item i {
    background: rgba(99, 102, 241, 0.2);
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
}

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

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

.section-header .section-title {
    margin-bottom: 0;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.toggle-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active, .toggle-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.channel-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.channel-list .channel-item {
    width: 100%;
}

.channel-list .channel-card {
    flex-direction: row;
    height: auto;
}

.channel-list .card-img-wrapper,
.channel-list .card-img-top {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
}

.channel-list .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.channel-card {
    position: relative;
}

.channel-card .card-body {
    position: relative;
}

.btn-favorite {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
}

.channel-card:hover .btn-favorite {
    opacity: 1;
}

.btn-favorite:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.btn-favorite.active {
    opacity: 1;
    background: var(--secondary-color);
    color: white;
}

.btn-favorite.active i {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.live-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    animation: livePulse 2s infinite;
    z-index: 5;
}

@keyframes livePulse {
    0%, 100% { 
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% { 
        opacity: 0.8;
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.quality-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 5;
}

.quality-badge.hd {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.quality-badge.sd {
    background: rgba(0,0,0,0.6);
    color: white;
}

.quality-badge.fhd {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: white;
}

.quality-badge.uhd {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.hover-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 4;
}

.channel-card:hover .hover-preview {
    opacity: 1;
}

.hover-preview-content {
    text-align: center;
    color: white;
}

.hover-preview-content i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: playBounce 1s infinite;
}

@keyframes playBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hover-preview-content span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
}

.favorites-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    border-color: var(--primary-color);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.empty-favorites {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-favorites i {
    color: var(--border-color);
}

@media (max-width: 992px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-wrapper {
        width: 100%;
        margin-top: 1rem;
    }
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    align-items: center;
}

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

.country-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.country-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.country-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.country-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.category-card h6 {
    margin: 0;
    font-weight: 600;
}

.category-card span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .hero-slider {
        height: 300px;
    }
    
    .hero-slider .slide-info h2 {
        font-size: 1.5rem;
    }
    
    .stats-row {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .country-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .channel-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: var(--text-muted);
    margin: 0;
}

.search-results .highlight {
    background: rgba(99, 102, 241, 0.2);
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
}

.page-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
}

.page-content h1 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.form-control, .form-select {
    background: var(--bg-color);
    border-color: var(--border-color);
    color: var(--text-color);
}

.form-control:focus, .form-select:focus {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--text-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.pagination .page-link {
    background: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-color);
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .channel-card .card-img-top {
        height: 120px;
    }
}

.theater-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.theater-overlay.active {
    opacity: 1;
    visibility: visible;
}

.player-wrapper {
    position: relative;
    background: #000;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.player-wrapper.theater-mode {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1400px;
    z-index: 1000;
    border-radius: 1rem;
}

.player-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}

.player-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-weight: 500;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 2s infinite;
}

.player-actions {
    display: flex;
    gap: 0.5rem;
}

.player-action-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-action-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
}

.channel-logo-large {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 0.5rem;
}

.country-flag-tag {
    font-size: 0.9rem;
}

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

.chat-container {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    overflow: hidden;
}

.chat-messages {
    height: 250px;
    overflow-y: auto;
    padding: 1rem;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.chat-message:last-child {
    border-bottom: none;
}

.chat-user {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.chat-text {
    flex: 1;
    font-size: 0.9rem;
}

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

.user-message .chat-user {
    color: var(--secondary-color);
}

.chat-input-wrapper {
    display: flex;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
}

.chat-input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-send-btn {
    background: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-notice {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

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

.carousel-nav {
    display: flex;
    gap: 0.5rem;
}

.carousel-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.channel-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.channel-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 150px;
    text-decoration: none;
}

.carousel-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s;
}

.carousel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.carousel-img-wrapper {
    position: relative;
    height: 100px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-img-wrapper img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.country-flag-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 1.25rem;
}

.carousel-info {
    padding: 0.75rem;
}

.carousel-info h6 {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-card {
    border-radius: 1rem;
}

.recently-watched-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
}

.recent-item:hover {
    background: var(--primary-color);
    color: white;
}

.recent-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 0.25rem;
    background: var(--card-bg);
}

.recent-item span {
    flex: 1;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-color);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.popular-item:hover {
    background: var(--bg-secondary);
}

.popular-rank {
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.popular-item img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: var(--bg-secondary);
}

.popular-info {
    flex: 1;
    overflow: hidden;
}

.popular-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.pip-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 1001;
}

.pip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(0,0,0,0.8);
    color: white;
}

.pip-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.pip-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
}

.pip-video {
    aspect-ratio: 16/9;
}

.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
    color: white;
}

.newsletter-title {
    margin: 0;
    font-size: 1.5rem;
}

.newsletter-text {
    margin: 0.5rem 0 0;
    opacity: 0.9;
}

.newsletter-form .form-control {
    background: white;
    border: none;
    color: #333;
    padding: 0.75rem 1rem;
}

.newsletter-form .btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

.footer-main {
    padding: 2rem 0;
}

.footer-brand h5 {
    margin-bottom: 1rem;
}

.footer-heading {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

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

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.footer-links a i {
    font-size: 0.6rem;
    transition: transform 0.2s;
}

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

.footer-links a:hover i {
    transform: translateX(3px);
}

.social-links-enhanced {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-btn:hover {
    transform: translateY(-3px);
    color: white;
}

.social-btn.facebook { background: #1877f2; }
.social-btn.twitter { background: #1da1f2; }
.social-btn.youtube { background: #ff0000; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-btn.tiktok { background: #000; }
.social-btn.telegram { background: #0088cc; }

.footer-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-mini {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.stat-mini i {
    color: var(--primary-color);
    width: 20px;
}

.footer-divider {
    border-color: var(--border-color);
    margin: 1rem 0;
}

.footer-bottom {
    padding: 1rem 0;
}

@media (max-width: 992px) {
    .player-wrapper.theater-mode {
        width: 95vw;
    }
}

@media (max-width: 768px) {
    .newsletter-section {
        text-align: center;
    }
    
    .newsletter-form .input-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.skeleton-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

.skeleton-img {
    height: 150px;
    background: var(--bg-secondary);
}

.skeleton-body {
    padding: 1rem;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.skeleton-text {
    height: 14px;
    width: 60%;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
}

.skeleton-animate {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
}

.filter-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--text-color);
    min-width: 150px;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.categories-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.categories-carousel::-webkit-scrollbar {
    display: none;
}

.category-slide {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.category-slide:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.category-slide-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.category-slide-info h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
}

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

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

.continue-watching-carousel {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.continue-watching-carousel::-webkit-scrollbar {
    display: none;
}

.continue-item {
    flex: 0 0 140px;
    text-decoration: none;
    color: var(--text-color);
}

.continue-card {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
}

.continue-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.continue-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.continue-card:hover .continue-overlay {
    opacity: 1;
}

.continue-overlay i {
    font-size: 2rem;
    color: white;
}

.continue-title {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.load-more-container {
    text-align: center;
    padding: 2rem 0;
}

.load-more-btn {
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.load-more-spinner {
    color: var(--primary-color);
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.channel-grid.list-view {
    grid-template-columns: 1fr;
}

.channel-grid.list-view .channel-item {
    display: flex;
}

.channel-grid.list-view .channel-card {
    display: flex;
    flex-direction: row;
    width: 100%;
}

.channel-grid.list-view .card-img-wrapper {
    width: 200px;
    flex-shrink: 0;
}

.channel-grid.list-view .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
    }
    
    .category-slide {
        flex: 0 0 150px;
    }
}

.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 1050;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.mobile-bottom-nav .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: all 0.2s;
}

.mobile-bottom-nav .mobile-nav-item i {
    font-size: 1.25rem;
}

.mobile-bottom-nav .mobile-nav-item.active,
.mobile-bottom-nav .mobile-nav-item:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }
    
    .main-footer {
        padding-bottom: 80px;
    }
    
    .scroll-to-top {
        bottom: 80px;
    }
}

.sidebar-toggle {
    display: none;
    position: absolute;
    top: 10px;
    right: -40px;
    width: 36px;
    height: 36px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    z-index: 10;
    color: var(--text-color);
}

.player-sidebar {
    position: relative;
    transition: all 0.3s;
}

.player-sidebar.collapsed {
    transform: translateX(100%);
    opacity: 0;
    position: absolute;
    right: 0;
}

.player-main.expanded {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 992px) {
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.mini-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 0.75rem 1.5rem;
    display: none;
    align-items: center;
    gap: 1rem;
    z-index: 1040;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    transform: translateY(100%);
    transition: transform 0.3s;
}

.mini-player.visible {
    display: flex;
    transform: translateY(0);
}

.mini-player-thumb {
    width: 60px;
    height: 40px;
    border-radius: 0.25rem;
    object-fit: cover;
    background: rgba(255,255,255,0.1);
}

.mini-player-info {
    flex: 1;
    color: white;
}

.mini-player-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.mini-player-category {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

.mini-player-controls {
    display: flex;
    gap: 0.5rem;
}

.mini-player-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.1);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.mini-player-btn:hover {
    background: var(--primary-color);
}

.mini-player-btn.play-btn {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
}

@media (max-width: 768px) {
    .mini-player {
        bottom: 60px;
    }
}

.keyboard-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1060;
    pointer-events: none;
}

.keyboard-hint.visible {
    opacity: 1;
}

.keyboard-hint kbd {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin: 0 0.25rem;
}

.swipe-indicator {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1050;
    pointer-events: none;
}

.swipe-indicator.left {
    left: 20px;
}

.swipe-indicator.right {
    right: 20px;
}

.swipe-indicator.visible {
    opacity: 1;
}

/* FAQ Page Styles */
.faq-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.faq-item h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.faq-item p {
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.7;
}

.page-content {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.page-content h1 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-content .content {
    color: var(--text-color);
}

/* Additional Mobile Responsiveness */
@media (max-width: 576px) {
    .hero-slider {
        height: 250px;
    }
    
    .hero-slider .slide-info h2 {
        font-size: 1.25rem;
    }
    
    .hero-slider .slide-info p {
        font-size: 0.875rem;
    }
    
    .stats-row {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.75rem;
    }
    
    .stat-item {
        flex: 1 1 33%;
        min-width: 80px;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .section-header h2 {
        font-size: 1.25rem;
    }
    
    .channel-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .channel-card .card-body {
        padding: 0.75rem;
    }
    
    .channel-card .card-title {
        font-size: 0.85rem;
    }
    
    .channel-card .card-img-top {
        height: 100px;
        padding: 0.5rem;
    }
    
    .category-card {
        padding: 0.75rem;
    }
    
    .category-card h5 {
        font-size: 0.9rem;
    }
    
    .player-wrapper {
        flex-direction: column;
    }
    
    .player-sidebar {
        width: 100%;
        max-height: 300px;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .footer .row {
        text-align: center;
    }
    
    .footer .col-lg-3,
    .footer .col-lg-2,
    .footer .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    .navbar-brand span {
        font-size: 1.1rem;
    }
    
    .search-wrapper {
        display: none;
    }
    
    .navbar .theme-toggle {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 400px) {
    .channel-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        flex: 1 1 100%;
    }
    
    .stats-row {
        flex-direction: column;
    }
}

/* Mobile Search Modal */
.mobile-search-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    cursor: pointer;
}

@media (max-width: 576px) {
    .mobile-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Touch-friendly buttons */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    .badge {
        padding: 0.35rem 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   These styles ensure the site works on all mobile devices
   ============================================ */

/* Mobile First - Base mobile styles */
@media screen and (max-width: 991px) {
    /* Force navbar to be responsive */
    .navbar {
        position: relative !important;
    }
    
    .navbar-collapse {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        background: var(--card-bg) !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 0 0 0.5rem 0.5rem !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
        padding: 1rem !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        z-index: 1000 !important;
    }
    
    .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .navbar-nav .nav-item {
        width: 100% !important;
        border-bottom: 1px solid var(--border-color) !important;
    }
    
    .navbar-nav .nav-link {
        display: block !important;
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
    }
    
    .navbar-toggler {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        padding: 0.5rem !important;
        border: 1px solid var(--border-color) !important;
        background: var(--bg-secondary) !important;
        border-radius: 0.375rem !important;
    }
    
    .search-wrapper {
        width: 100% !important;
        margin: 1rem 0 !important;
    }
    
    .search-input {
        width: 100% !important;
    }
    
    /* Mega menu mobile */
    .mega-menu,
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        background: var(--bg-secondary) !important;
        margin: 0 !important;
        padding: 0.5rem !important;
    }
    
    .mega-menu-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }
    
    /* Hero slider mobile */
    .hero-slider {
        height: auto !important;
        min-height: 220px !important;
        max-height: 300px !important;
    }
    
    .hero-slider .slide-info {
        padding: 1.5rem !important;
    }
    
    .hero-slider .slide-info h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    /* Stats row mobile */
    .stats-row {
        flex-wrap: nowrap !important;
        justify-content: space-evenly !important;
        padding: 1rem 0.5rem !important;
        gap: 0.25rem !important;
        margin: 0 0.5rem !important;
    }
    
    .stat-item {
        flex: 1 1 auto !important;
        text-align: center !important;
        gap: 0.25rem !important;
    }
    
    .stat-item i {
        font-size: 1.25rem !important;
        width: 32px !important;
        height: 32px !important;
        line-height: 32px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
    }
    
    .stat-number {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
    }
    
    .stat-label {
        font-size: 0.65rem !important;
        white-space: nowrap !important;
    }
    
    /* Channel grid mobile */
    .channel-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* Category grid mobile */
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    /* Country grid mobile */
    .country-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    /* Footer mobile */
    .footer-main .row > div {
        text-align: center !important;
    }
    
    .footer-links {
        justify-content: center !important;
    }
    
    .newsletter-form .input-group {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .newsletter-form .btn {
        width: 100% !important;
        border-radius: 0.375rem !important;
    }
}

/* Small mobile phones */
@media screen and (max-width: 575px) {
    body {
        font-size: 14px !important;
    }
    
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    .navbar-brand img {
        max-height: 32px !important;
    }
    
    .hero-slider {
        min-height: 180px !important;
        max-height: 250px !important;
    }
    
    .hero-slider .slide-info h2 {
        font-size: 1.2rem !important;
    }
    
    .hero-slider .slide-info p {
        font-size: 0.8rem !important;
    }
    
    .section-header h2 {
        font-size: 1.1rem !important;
    }
    
    .channel-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
    }
    
    .channel-card .card-img-top {
        height: 80px !important;
    }
    
    .channel-card .card-body {
        padding: 0.5rem !important;
    }
    
    .channel-card .card-title {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .country-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    /* Stats mobile */
    .stat-number {
        font-size: 1rem !important;
    }
    
    .stat-label {
        font-size: 0.65rem !important;
    }
    
    /* Player mobile */
    .player-container {
        padding: 0.5rem !important;
    }
    
    .video-player-container {
        border-radius: 0.5rem !important;
    }
    
    /* Footer mobile */
    .main-footer {
        padding: 1.5rem 0 !important;
        padding-bottom: 80px !important;
    }
    
    .footer-heading {
        font-size: 0.9rem !important;
    }
    
    .footer-links li {
        font-size: 0.85rem !important;
    }
}

/* Very small phones */
@media screen and (max-width: 375px) {
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .channel-grid {
        gap: 0.4rem !important;
    }
    
    .channel-card .card-img-top {
        height: 70px !important;
    }
    
    .stat-item {
        flex: 1 1 45% !important;
    }
    
    .mega-menu-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   MOBILE CHANNEL CARD IMPROVEMENTS
   ============================================ */
@media screen and (max-width: 768px) {
    .channel-card {
        border-radius: 0.75rem !important;
        overflow: hidden !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
        transition: transform 0.2s, box-shadow 0.2s !important;
    }
    
    .channel-card:active {
        transform: scale(0.98) !important;
    }
    
    .channel-card .card-img-top,
    .channel-card .card-img-wrapper {
        height: 90px !important;
        min-height: 90px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
        padding: 0.5rem !important;
        position: relative !important;
    }
    
    [data-theme="dark"] .channel-card .card-img-top,
    [data-theme="dark"] .channel-card .card-img-wrapper {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    }
    
    .channel-card .card-img-top img,
    .channel-card .card-img-wrapper img {
        max-height: 70px !important;
        max-width: 90% !important;
        object-fit: contain !important;
        border-radius: 0.25rem !important;
    }
    
    .channel-card .card-body {
        padding: 0.625rem !important;
        min-height: auto !important;
    }
    
    .channel-card .card-title {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin-bottom: 0.375rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
        color: var(--text-color) !important;
    }
    
    .channel-card .badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
        border-radius: 0.25rem !important;
        font-weight: 600 !important;
    }
    
    .channel-card .badges-wrapper,
    .channel-card .d-flex.gap-1 {
        flex-wrap: wrap !important;
        gap: 0.25rem !important;
    }
    
    .badge-live {
        background: #ef4444 !important;
        color: white !important;
    }
    
    .btn-favorite {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.75rem !important;
        opacity: 1 !important;
    }
    
    /* Improve broken image display */
    .channel-card .card-img-top::before {
        content: '';
        display: block;
    }
    
    .channel-card img[src=""],
    .channel-card img:not([src]),
    .channel-card img[onerror] {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* Even smaller mobile adjustments */
@media screen and (max-width: 480px) {
    .channel-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem !important;
        padding: 0 !important;
    }
    
    .channel-card .card-img-top,
    .channel-card .card-img-wrapper {
        height: 80px !important;
        min-height: 80px !important;
    }
    
    .channel-card .card-body {
        padding: 0.5rem !important;
    }
    
    .channel-card .card-title {
        font-size: 0.75rem !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .channel-card .badge {
        font-size: 0.6rem !important;
        padding: 0.15rem 0.35rem !important;
    }
}

/* ============================================
   SIDEBAR CARDS MOBILE IMPROVEMENTS
   (Stream Info, Recently Watched, Popular Now)
   ============================================ */
.sidebar-card {
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    position: relative;
    z-index: 1;
}

.sidebar-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.sidebar-card .card-title i {
    color: var(--primary-color);
}

/* Popular list items */
.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.popular-item:hover {
    background: var(--bg-secondary);
    color: var(--text-color);
}

.popular-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.popular-item img {
    width: 48px;
    height: 36px;
    object-fit: contain;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
    padding: 0.25rem;
    flex-shrink: 0;
}

/* Handle broken images with background placeholder */
.popular-item img,
.recently-watched-item img,
.recent-item img {
    font-size: 0;
    color: transparent;
    background-image: url('/assets/images/tv-placeholder.svg');
    background-size: 60%;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-secondary);
}

/* Hide broken image icon */
.popular-item img::before,
.recently-watched-item img::before,
.recent-item img::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: var(--bg-secondary);
}

.popular-info {
    flex: 1;
    min-width: 0;
}

.popular-name {
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Recently watched list */
.recently-watched-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recently-watched-item,
.recent-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s;
}

.recently-watched-item:hover,
.recent-item:hover {
    background: var(--bg-secondary);
}

.recently-watched-item img,
.recent-item img {
    width: 48px;
    height: 36px;
    min-width: 48px;
    min-height: 36px;
    object-fit: contain;
    background: var(--bg-secondary);
    border-radius: 0.25rem;
    padding: 0.25rem;
    flex-shrink: 0;
}

.recently-watched-item span,
.recent-item span {
    flex: 1;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile sidebar cards */
@media screen and (max-width: 768px) {
    .sidebar-card {
        border-radius: 0.5rem !important;
        margin-bottom: 1rem !important;
        overflow: hidden;
    }
    
    .sidebar-card .card-body {
        padding: 1rem !important;
    }
    
    .sidebar-card .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .popular-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .popular-item {
        display: flex !important;
        align-items: center !important;
        padding: 0.5rem !important;
        gap: 0.5rem !important;
        background: var(--bg-secondary);
        border-radius: 0.5rem;
        flex-wrap: nowrap !important;
        overflow: hidden;
    }
    
    .popular-rank {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        font-size: 0.7rem !important;
        flex-shrink: 0;
    }
    
    .popular-item img {
        width: 40px !important;
        height: 30px !important;
        min-width: 40px !important;
        object-fit: contain !important;
        background: rgba(255,255,255,0.1) !important;
        border-radius: 0.25rem !important;
        flex-shrink: 0;
    }
    
    .popular-info {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
    
    .popular-name {
        font-size: 0.8rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }
    
    .popular-meta {
        font-size: 0.7rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .recently-watched-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .recently-watched-item,
    .recent-item {
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.5rem !important;
        background: var(--bg-secondary);
        border-radius: 0.5rem;
        overflow: hidden;
    }
    
    .recently-watched-item img,
    .recent-item img {
        width: 40px !important;
        height: 30px !important;
        min-width: 40px !important;
        min-height: 30px !important;
        object-fit: contain !important;
        background: rgba(255,255,255,0.1) !important;
        border-radius: 0.25rem !important;
        flex-shrink: 0;
    }
    
    .recently-watched-item span,
    .recent-item span {
        font-size: 0.8rem !important;
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* Stream info list */
    .sidebar-card .list-unstyled li {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .sidebar-card .list-unstyled li strong {
        display: inline-block;
        min-width: 60px;
        flex-shrink: 0;
    }
    
    /* Fix player sidebar on mobile */
    .player-sidebar {
        margin-top: 1rem;
    }
    
    .player-sidebar .sidebar {
        padding: 0;
    }
}

/* ============================================
   NEWSLETTER & FOOTER MOBILE IMPROVEMENTS
   ============================================ */
@media screen and (max-width: 768px) {
    /* Newsletter section mobile */
    .newsletter-section {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
        border-radius: 0.75rem !important;
        text-align: center !important;
    }
    
    .newsletter-section .row {
        flex-direction: column !important;
    }
    
    .newsletter-section .col-lg-6 {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    .newsletter-title {
        font-size: 1.25rem !important;
        justify-content: center !important;
    }
    
    .newsletter-text {
        font-size: 0.875rem !important;
    }
    
    .newsletter-form {
        width: 100% !important;
    }
    
    .newsletter-form .input-group {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .newsletter-form .form-control {
        width: 100% !important;
        border-radius: 0.5rem !important;
        padding: 0.875rem 1rem !important;
        font-size: 1rem !important;
    }
    
    .newsletter-form .btn {
        width: 100% !important;
        border-radius: 0.5rem !important;
        padding: 0.875rem 1.5rem !important;
    }
    
    /* Footer mobile improvements */
    .main-footer {
        padding: 1.5rem 0 !important;
        padding-bottom: 90px !important;
    }
    
    .footer-main {
        padding: 1rem 0 !important;
    }
    
    .footer-main .row {
        text-align: center !important;
    }
    
    .footer-main .col-lg-4,
    .footer-main .col-lg-2,
    .footer-main .col-md-6 {
        margin-bottom: 1.5rem !important;
    }
    
    .footer-brand {
        text-align: center !important;
    }
    
    .footer-brand h5 {
        font-size: 1.1rem !important;
        justify-content: center !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .footer-brand p {
        font-size: 0.85rem !important;
    }
    
    .footer-heading {
        font-size: 1rem !important;
        text-align: center !important;
    }
    
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 0 !important;
    }
    
    .footer-links li {
        margin-bottom: 0.5rem !important;
    }
    
    .footer-links a {
        font-size: 0.875rem !important;
    }
    
    .social-links-enhanced {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .social-btn {
        width: 40px !important;
        height: 40px !important;
    }
    
    .footer-stats {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }
    
    .stat-mini {
        font-size: 0.85rem !important;
    }
    
    .footer-divider {
        margin: 1rem 0 !important;
    }
    
    .footer-bottom {
        text-align: center !important;
    }
    
    .footer-bottom .row {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .footer-bottom .col-md-6 {
        text-align: center !important;
    }
    
    .footer-bottom p,
    .footer-bottom small {
        font-size: 0.8rem !important;
    }
}

/* ============================================
   MOBILE VISIBILITY UTILITY CLASSES
   ============================================ */
@media screen and (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

@media screen and (min-width: 769px) {
    .hide-on-desktop {
        display: none !important;
    }
}

/* ============================================
   GLOBAL FONT AWESOME ICON FIXES
   Ensures all icons display correctly on all devices
   ============================================ */

/* Fix all Font Awesome Solid icons (fas) - ALL SCREEN SIZES */
.fas, 
.fa-solid,
i.fas,
i.fa-solid,
span.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block !important;
    text-rendering: auto;
}

/* Fix all Font Awesome Regular icons (far) */
.far,
.fa-regular,
i.far,
i.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block !important;
    text-rendering: auto;
}

/* Fix all Font Awesome Brand icons (fab) */
.fab,
.fa-brands,
i.fab,
i.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
    font-style: normal !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: inline-block !important;
    text-rendering: auto;
}

/* Card title icons */
.card-title i,
.card-title .fas,
h5 i.fas,
h6 i.fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

/* Popular list icons */
.popular-item i,
.popular-info i,
.popular-list i {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

/* Views/stats icons - specific icon classes */
i.fa-eye,
i.fa-globe,
i.fa-info-circle,
i.fa-history,
i.fa-fire,
i.fa-tv,
i.fa-radio,
i.fa-chevron-right,
i.fa-broadcast-tower,
i.fa-th-large,
i.fa-calendar,
i.fa-heart,
i.fa-share-alt,
i.fa-play,
i.fa-pause,
i.fa-envelope,
i.fa-paper-plane,
i.fa-home,
i.fa-search,
i.fa-times,
i.fa-bars {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    display: inline-block !important;
}

/* Small phones footer - 2 column grid layout */
@media screen and (max-width: 576px) {
    .newsletter-section {
        padding: 1rem !important;
        margin: 0 0.5rem 1rem !important;
    }
    
    .newsletter-title {
        font-size: 1.1rem !important;
    }
    
    .newsletter-text {
        font-size: 0.8rem !important;
    }
    
    /* Footer 2-column grid layout for mobile */
    .row.footer-main {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem 0.5rem !important;
    }
    
    /* Brand section spans full width */
    .row.footer-main > div:first-child {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }
    
    /* All link sections */
    .row.footer-main > div {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        padding: 0 0.5rem !important;
        margin-bottom: 0 !important;
    }
    
    /* Stats section spans full width */
    .row.footer-main > div:last-child {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        margin-top: 0.5rem !important;
    }
    
    .footer-heading {
        font-size: 0.9rem !important;
        margin-bottom: 0.5rem !important;
        text-align: center !important;
    }
    
    .footer-links {
        text-align: center !important;
        padding-left: 0 !important;
    }
    
    .footer-links li {
        margin-bottom: 0.4rem !important;
    }
    
    .footer-links a {
        font-size: 0.8rem !important;
    }
    
    /* Fix footer link icons */
    .footer-links a i,
    .footer-links i {
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        font-style: normal !important;
        display: inline-block !important;
        width: auto !important;
        margin-right: 0.25rem !important;
    }
    
    .footer-stats {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.75rem !important;
    }
    
    .stat-mini {
        font-size: 0.8rem !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
    }
    
    /* Fix stats icons */
    .stat-mini i {
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        font-style: normal !important;
        display: inline-block !important;
    }
    
    .footer-brand p {
        font-size: 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .footer-brand h5 {
        font-size: 1.1rem !important;
    }
    
    /* Fix footer brand icon */
    .footer-brand h5 i {
        font-family: "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        font-style: normal !important;
    }
    
    .social-links-enhanced {
        margin-top: 0.75rem !important;
        justify-content: center !important;
    }
    
    .social-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.875rem !important;
    }
    
    /* Social icons fix */
    .social-btn i {
        font-family: "Font Awesome 6 Brands" !important;
        font-weight: 400 !important;
    }
}

/* Language Selector Styles */
.language-selector .btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.language-selector .btn-icon:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

.language-selector .dropdown-toggle::after {
    margin-left: 0.3rem;
    font-size: 0.7rem;
}

.language-dropdown {
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
}

.language-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    color: var(--text-color);
}

.language-dropdown .dropdown-item:hover {
    background: var(--bg-secondary);
}

.language-dropdown .dropdown-item.active {
    background: var(--primary-color);
    color: white;
}

.language-dropdown .dropdown-item .lang-native {
    font-weight: 600;
}

.language-dropdown .dropdown-item .lang-name {
    font-size: 0.8rem;
    margin-left: auto;
}

.language-dropdown .dropdown-item.active .lang-name {
    color: rgba(255,255,255,0.8);
}

.lang-code {
    font-weight: 600;
    font-size: 0.8rem;
}

/* RTL Support */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="rtl"] .navbar-nav {
    padding-right: 0;
}

html[dir="rtl"] .me-1, html[dir="rtl"] .me-2, html[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 0.25rem;
}

html[dir="rtl"] .ms-1, html[dir="rtl"] .ms-2, html[dir="rtl"] .ms-3 {
    margin-left: 0 !important;
    margin-right: 0.25rem;
}

html[dir="rtl"] .dropdown-menu-end {
    --bs-position: start;
}

html[dir="rtl"] .text-start {
    text-align: right !important;
}

html[dir="rtl"] .text-end {
    text-align: left !important;
}

/* Dark mode language selector */
[data-theme="dark"] .language-dropdown {
    background: var(--card-bg);
    border-color: var(--border-color);
}

[data-theme="dark"] .language-dropdown .dropdown-item {
    color: var(--text-color);
}

[data-theme="dark"] .language-dropdown .dropdown-item:hover {
    background: var(--bg-secondary);
}
