/**
 * IPTV Channel Manager - Netflix-Inspired Styles
 * Modern, dark theme with premium animations and layouts
 *
 * @package IPTV_Channel_Manager
 */

/* ==========================================================================
   Netflix-Inspired Frontend Styles
   ========================================================================== */

/* CSS Variables for Consistent Theming */
:root {
    --netflix-black: #141414;
    --netflix-dark: #181818;
    --netflix-red: #e50914;
    --netflix-red-hover: #f40612;
    --netflix-white: #ffffff;
    --netflix-gray: #b3b3b3;
    --netflix-dark-gray: #333333;
    --netflix-light-gray: #f8f9fa;
}

/* Reset and Base Styles */
.iptv-netflix-container {
    background-color: var(--netflix-black);
    color: var(--netflix-white);
    min-height: 100vh;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
    padding: 0;
    margin: 0;
}

.iptv-netflix-container * {
    box-sizing: border-box;
}

/* ==========================================================================
   Netflix Header Styles
   ========================================================================== */

.iptv-netflix-header {
    background: transparent;
    padding: 40px 0 60px 0;
    position: relative;
    z-index: 10;
}

.iptv-header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px;
}

.iptv-title-container {
    margin: 0 0 40px 0;
}

.iptv-main-title {
    margin: 0 0 16px 0;
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    line-height: 1.1;
}

.iptv-brand {
    display: block;
}

.iptv-subtitle-heading {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    line-height: 1.2;
}

.iptv-subtitle {
    display: block;
    color: var(--netflix-white);
    opacity: 0.9;
}

/* Netflix Controls */
.iptv-netflix-controls {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* ==========================================================================
   Netflix Search Styles
   ========================================================================== */

.iptv-search-container {
    flex: 1;
    max-width: 400px;
}

.iptv-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.iptv-search-icon {
    position: absolute;
    left: 20px;
    width: 20px;
    height: 20px;
    color: var(--netflix-gray);
    z-index: 2;
}

.iptv-netflix-search {
    width: 100%;
    padding: 16px 20px 16px 55px;
    background: rgba(42, 42, 42, 0.8);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--netflix-white);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.iptv-netflix-search::placeholder {
    color: var(--netflix-gray);
    font-weight: 400;
}

.iptv-netflix-search:focus {
    outline: none;
    border-color: var(--netflix-red);
    background: rgba(42, 42, 42, 1);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

/* ==========================================================================
   Netflix Dropdown Styles
   ========================================================================== */

.iptv-netflix-dropdown {
    position: relative;
    min-width: 200px;
}

.iptv-netflix-dropdown-btn {
    width: 100%;
    padding: 16px 20px;
    background: rgba(42, 42, 42, 0.8);
    border: 2px solid transparent;
    border-radius: 8px;
    color: var(--netflix-white);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.iptv-netflix-dropdown-btn:hover {
    background: rgba(42, 42, 42, 1);
    border-color: var(--netflix-gray);
}

.iptv-netflix-dropdown-btn:focus,
.iptv-netflix-dropdown-btn[aria-expanded="true"] {
    outline: none;
    border-color: var(--netflix-red);
    background: rgba(42, 42, 42, 1);
    box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.2);
}

.iptv-dropdown-chevron {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    color: var(--netflix-gray);
}

.iptv-netflix-dropdown-btn[aria-expanded="true"] .iptv-dropdown-chevron {
    transform: rotate(180deg);
    color: var(--netflix-red);
}

.iptv-netflix-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--netflix-dark);
    border: 2px solid var(--netflix-red);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 9999;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.iptv-netflix-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.iptv-netflix-option {
    padding: 16px 20px;
    color: var(--netflix-white);
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.iptv-netflix-option:last-child {
    border-bottom: none;
}

.iptv-netflix-option:hover,
.iptv-netflix-option:focus {
    background-color: rgba(229, 9, 20, 0.1);
    outline: none;
}

.iptv-netflix-option.selected {
    background-color: var(--netflix-red);
    font-weight: 600;
}

.iptv-option-check {
    width: 16px;
    height: 16px;
    color: var(--netflix-white);
}

/* ==========================================================================
   Netflix Stats Styles
   ========================================================================== */

.iptv-netflix-stats {
    display: flex;
    align-items: center;
}

.iptv-stats-content {
    text-align: center;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--netflix-red), var(--netflix-red-hover));
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.3);
}

.iptv-stats-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--netflix-white);
    line-height: 1;
}

.iptv-stats-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--netflix-white);
    opacity: 0.9;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Netflix Main Content
   ========================================================================== */

.iptv-netflix-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 60px 60px 60px;
}

/* ==========================================================================
   Netflix Grid Styles
   ========================================================================== */

.iptv-netflix-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 40px;
}

/* ==========================================================================
   Netflix Card Styles
   ========================================================================== */

.iptv-netflix-card {
    position: relative;
    background: var(--netflix-dark);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.iptv-netflix-card:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.iptv-netflix-card:focus {
    outline: 3px solid var(--netflix-red);
    outline-offset: 2px;
}

/* Netflix Thumbnail */
.iptv-netflix-thumbnail {
    position: relative;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--netflix-dark-gray), var(--netflix-black));
    overflow: hidden;
}

/* Channel Design */
.iptv-channel-design {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
    position: relative;
    transition: transform 0.5s ease;
}

.iptv-netflix-card:hover .iptv-channel-design {
    transform: scale(1.05);
}

.iptv-channel-content {
    text-align: center;
    z-index: 2;
    padding: 20px;
    max-width: 90%;
}

.iptv-tv-icon {
    width: 48px;
    height: 48px;
    color: var(--netflix-gray);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.iptv-netflix-card:hover .iptv-tv-icon {
    color: var(--netflix-red);
}

.iptv-thumbnail-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--netflix-white);
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.iptv-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(229, 9, 20, 0.1), rgba(229, 9, 20, 0.05));
    opacity: 0.6;
}

/* Hover Overlay */
.iptv-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.iptv-netflix-card:hover .iptv-hover-overlay {
    opacity: 1;
}

.iptv-play-button {
    width: 80px;
    height: 80px;
    background: var(--netflix-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
}

.iptv-netflix-card:hover .iptv-play-button {
    transform: scale(1);
}

.iptv-play-icon {
    width: 32px;
    height: 32px;
    color: var(--netflix-white);
    margin-left: 4px;
}

.iptv-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
}

/* ==========================================================================
   Netflix Card Info
   ========================================================================== */

.iptv-netflix-info {
    padding: 16px 20px;
    display: flex;
    justify-content: center;
}

.iptv-netflix-meta {
    margin: 0;
}

.iptv-country-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--netflix-white);
    backdrop-filter: blur(10px);
}

.iptv-flag-icon {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Netflix Empty States
   ========================================================================== */

.iptv-netflix-no-results,
.iptv-netflix-empty {
    text-align: center;
    padding: 80px 40px;
    color: var(--netflix-gray);
}

.iptv-no-results-content,
.iptv-empty-content {
    max-width: 400px;
    margin: 0 auto;
}

.iptv-no-results-icon,
.iptv-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px auto;
    color: var(--netflix-gray);
    opacity: 0.6;
}

.iptv-no-results-title,
.iptv-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--netflix-white);
    margin: 0 0 16px 0;
}

.iptv-no-results-text,
.iptv-empty-text {
    font-size: 1rem;
    color: var(--netflix-gray);
    line-height: 1.5;
    margin: 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Large Tablet */
@media (max-width: 1200px) {
    .iptv-netflix-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .iptv-header-content,
    .iptv-netflix-main {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .iptv-title-container {
        margin: 0 0 30px 0;
    }
    
    .iptv-main-title {
        font-size: 2.5rem;
        margin: 0 0 12px 0;
    }
    
    .iptv-subtitle-heading {
        font-size: 1.5rem;
    }
    
    .iptv-netflix-controls {
        gap: 20px;
    }
    
    .iptv-netflix-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .iptv-header-content,
    .iptv-netflix-main {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .iptv-title-container {
        margin: 0 0 24px 0;
    }
    
    .iptv-main-title {
        font-size: 2rem;
        margin: 0 0 10px 0;
    }
    
    .iptv-subtitle-heading {
        font-size: 1.25rem;
    }
    
    .iptv-netflix-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .iptv-search-container,
    .iptv-netflix-dropdown {
        max-width: none;
        width: 100%;
    }
    
    .iptv-netflix-search,
    .iptv-netflix-dropdown-btn {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 18px 20px;
    }
    
    .iptv-netflix-search {
        padding-left: 55px;
    }
    
    .iptv-netflix-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 30px;
    }
    
    .iptv-netflix-card:hover {
        transform: scale(1.02) translateY(-4px);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .iptv-header-content,
    .iptv-netflix-main {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .iptv-title-container {
        margin: 0 0 20px 0;
    }
    
    .iptv-main-title {
        font-size: 1.75rem;
        margin: 0 0 8px 0;
    }
    
    .iptv-subtitle-heading {
        font-size: 1.125rem;
    }
    
    .iptv-netflix-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .iptv-netflix-card:hover {
        transform: none;
    }
    
    .iptv-play-button {
        width: 60px;
        height: 60px;
    }
    
    .iptv-play-icon {
        width: 24px;
        height: 24px;
    }
    
    .iptv-tv-icon {
        width: 36px;
        height: 36px;
        margin-bottom: 8px;
    }
    
    .iptv-thumbnail-title {
        font-size: 0.875rem;
    }
    
    .iptv-channel-content {
        padding: 16px;
    }
    
    .iptv-netflix-info {
        padding: 12px 16px;
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

/* Smooth animations */
@media (prefers-reduced-motion: reduce) {
    .iptv-netflix-card,
    .iptv-netflix-search,
    .iptv-netflix-dropdown-btn,
    .iptv-play-button {
        transition: none;
    }
    
    .iptv-netflix-card:hover {
        transform: none;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .iptv-netflix-card {
        border: 2px solid var(--netflix-white);
    }
    
    .iptv-netflix-search,
    .iptv-netflix-dropdown-btn {
        border-width: 3px;
    }
}

/* Dark mode support (for systems that prefer dark mode) */
@media (prefers-color-scheme: dark) {
    /* Netflix theme is already dark, no additional styles needed */
}

/* ==========================================================================
   Legacy Admin Styles (Keep for backward compatibility)
   ========================================================================== */

/* Dashboard Styles */
.iptv-channel-manager-dashboard {
    margin-top: 20px;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-widget {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    padding: 20px;
}

.dashboard-widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #23282d;
}

.quick-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Import Page Styles */
.iptv-channel-import,
.iptv-channel-upload {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 5px;
    padding: 20px;
    margin-top: 20px;
}

.upload-instructions {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
    margin-bottom: 20px;
}

.upload-instructions h3 {
    margin-top: 0;
    color: #0073aa;
}

.upload-instructions ul {
    margin-bottom: 0;
}

.upload-instructions li {
    margin-bottom: 8px;
}

#import-progress {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #005a87);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-info {
    font-size: 14px;
    color: #666;
}

/* Form Enhancements */
.form-table th {
    width: 150px;
}

#import_file {
    width: 100%;
    max-width: 400px;
}

/* Preview Page Styles */
.iptv-preview-table-container {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
}

.iptv-preview-table-container table {
    margin-bottom: 0;
}

.iptv-bulk-country-selection {
    border-left: 4px solid #0073aa;
    background: #fff;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.iptv-bulk-country-selection .description {
    margin-top: 10px;
    color: #666;
}

.country-select {
    max-width: 200px;
}

#apply-feedback {
    font-weight: 600;
    color: #00a32a;
}

.iptv-preview-info {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #00a32a;
}

.iptv-preview-actions {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #ddd;
}

/* Upload Form Enhancements */
.upload-instructions {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid #0073aa;
}

/* Country Override Styling */
.country-overridden {
    background-color: #fff3cd !important;
    border: 1px solid #ffc107 !important;
}

/* Status colors */
.status-ready {
    color: #198754;
    font-weight: 600;
}

.status-duplicate {
    color: #d63384;
    font-weight: 600;
}

/* Auto-detection override styling */
.auto-detection-overridden {
    text-decoration: line-through;
    color: #999 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .iptv-bulk-country-selection > div {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    .iptv-preview-actions > div {
        flex-direction: column;
        gap: 10px;
    }
    
         .country-select {
         max-width: 100%;
     }
 }

/* Subscription Modal Styles */
.iptv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.iptv-modal-overlay.iptv-modal-show {
    opacity: 1;
}

.iptv-modal-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.iptv-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 0;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.iptv-modal-content.iptv-modal-animate {
    transform: scale(1) translateY(0);
}

.iptv-modal-content.iptv-modal-fadeout {
    transform: scale(0.95) translateY(10px);
    opacity: 0.5;
}

close.iptv-modal- {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.2s ease;
    z-index: 1;
}

.iptv-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.iptv-modal-close svg {
    width: 20px;
    height: 20px;
}

.iptv-modal-body {
    padding: 40px 30px 30px;
    text-align: center;
}

.iptv-modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #e50914, #f40612);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.iptv-modal-icon svg {
    width: 40px;
    height: 40px;
}

.iptv-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    line-height: 1.2;
}

.iptv-modal-text {
    font-size: 16px;
    color: #b3b3b3;
    margin: 0 0 30px;
    line-height: 1.5;
}

.iptv-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.iptv-modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
    position: relative;
}

.iptv-modal-btn-primary {
    background: linear-gradient(135deg, #e50914, #f40612);
    color: white;
}

.iptv-modal-btn-primary:hover {
    background: linear-gradient(135deg, #f40612, #e50914);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(229, 9, 20, 0.3);
}



/* Modal Mobile Responsive */
@media (max-width: 768px) {
    .iptv-modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .iptv-modal-body {
        padding: 30px 20px 20px;
    }
    
    .iptv-modal-title {
        font-size: 24px;
    }
    
    .iptv-modal-text {
        font-size: 14px;
    }
    
    .iptv-modal-actions {
        justify-content: center;
        gap: 12px;
    }
    
    .iptv-modal-btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .iptv-modal-icon {
        width: 60px;
        height: 60px;
    }
    
    .iptv-modal-icon svg {
        width: 30px;
        height: 30px;
    }
    
    .iptv-modal-title {
        font-size: 20px;
    }
    
    .iptv-modal-close {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
    
    .iptv-modal-close svg {
        width: 16px;
        height: 16px;
    }
}

/* Channel Card Cursor Enhancement */
.iptv-netflix-card {
    cursor: pointer !important;
}

.iptv-netflix-card:hover {
    transform: scale(1.05);
}

.iptv-netflix-card:active {
    transform: scale(0.98);
}

/* Modal Focus Styles for Accessibility */
.iptv-modal-close:focus,
.iptv-modal-btn:focus {
    outline: 2px solid #e50914;
    outline-offset: 2px;
}

/* Scrollable Channel Container */
.channel-scroll-wrapper {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px; /* Account for scrollbar */
    margin-right: -8px; /* Maintain grid alignment */
    /* Smooth scrolling */
    scroll-behavior: smooth;
    /* Better performance on mobile */
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar styling */
.channel-scroll-wrapper::-webkit-scrollbar {
    width: 8px;
}

.channel-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.channel-scroll-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #e50914, #b91c1c);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.3s ease;
}

.channel-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f40612, #dc2626);
    background-clip: content-box;
}

/* Firefox scrollbar */
.channel-scroll-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #e50914 rgba(255, 255, 255, 0.1);
}

/* Mobile responsive scrolling */
@media (max-width: 768px) {
    .channel-scroll-wrapper {
        max-height: 60vh; /* Smaller on mobile for better UX */
        padding-right: 4px;
        margin-right: -4px;
    }
    
    .channel-scroll-wrapper::-webkit-scrollbar {
        width: 6px; /* Thinner scrollbar on mobile */
    }
}

@media (max-width: 480px) {
    .channel-scroll-wrapper {
        max-height: 55vh; /* Even smaller on very small screens */
        padding-right: 2px;
        margin-right: -2px;
    }
    
    .channel-scroll-wrapper::-webkit-scrollbar {
        width: 4px; /* Very thin scrollbar on small mobile */
    }
}

/* Ensure grid layout remains intact within scrollable container */
.channel-scroll-wrapper .iptv-netflix-grid {
    /* Maintain grid properties */
    display: grid;
    width: 100%;
}

/* Prevent layout shifts during scrolling */
.channel-scroll-wrapper .iptv-netflix-card {
    /* Maintain card sizing */
    min-height: 0;
    /* Prevent flex shrinking issues */
    flex-shrink: 0;
} 