/* ============================================
   VIDEO PLAYER MODAL
   ============================================ */

.player-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(5, 10, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.player-container {
    width: 100%;
    max-width: 1400px;
    height: 100%;
    max-height: 900px;
    background: var(--bg-dark);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg), 0 0 80px var(--accent-glow);
}

/* Player Header */
.player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(10, 22, 40, 0.7);
    border-bottom: 1px solid var(--border-soft);
    gap: 16px;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.player-poster {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--bg-deep);
    flex-shrink: 0;
}

.player-meta {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.player-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.player-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--trans-fast);
}

.player-action:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.player-action.active {
    color: var(--accent-light);
    border-color: var(--accent-primary);
    background: var(--accent-soft);
}

.player-action.active svg {
    fill: var(--accent-light);
}

.player-action svg {
    width: 18px;
    height: 18px;
}

/* Video Area */
.player-video {
    flex: 1;
    background: black;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    background: black;
}

.player-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
}

.player-loader.hidden { display: none; }

.player-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: var(--bg-deep);
    padding: 40px;
    text-align: center;
}

.player-error svg {
    width: 64px;
    height: 64px;
    color: var(--danger);
}

.player-error h3 {
    font-size: 20px;
    color: var(--text-primary);
}

.player-error p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 400px;
}

.player-error .btn-primary {
    width: auto;
    padding: 10px 20px;
}

/* Episodes Panel */
.episodes-panel {
    height: 200px;
    background: var(--bg-medium);
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
}

.episodes-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
}

.episodes-header select {
    padding: 8px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.episodes-list {
    flex: 1;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    align-items: center;
}

.episode-item {
    flex-shrink: 0;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all var(--trans-fast);
}

.episode-item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.episode-item.active {
    border-color: var(--accent-light);
    background: var(--accent-soft);
}

.episode-num {
    font-size: 11px;
    color: var(--accent-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.episode-title {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    .player-modal { padding: 0; }
    .player-container {
        border-radius: 0;
        max-height: none;
    }
    .player-header { padding: 12px 16px; }
    .player-poster { width: 40px; height: 40px; }
    .player-title { font-size: 14px; }
    .player-action { width: 36px; height: 36px; }
}

/* ============================================
   DETAIL MODAL
   ============================================ */

.detail-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(5, 10, 24, 0.92);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.detail-container {
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--bg-dark);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.detail-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: white;
    transition: all var(--trans-fast);
}

[dir="rtl"] .detail-close { right: auto; left: 16px; }

.detail-close:hover {
    background: var(--danger);
}

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

.detail-content {
    overflow-y: auto;
    max-height: 90vh;
}

.detail-hero {
    height: 280px;
    background: var(--bg-deep);
    position: relative;
    overflow: hidden;
}

.detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, var(--bg-dark) 100%);
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(2px);
    opacity: 0.6;
}

.detail-body {
    padding: 24px;
    margin-top: -100px;
    position: relative;
    z-index: 2;
    display: flex;
    gap: 24px;
}

.detail-poster {
    width: 200px;
    aspect-ratio: 2/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-deep);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-lg);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    flex: 1;
    min-width: 0;
    padding-top: 100px;
}

.detail-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.detail-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
}

.detail-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-rating {
    color: var(--warning);
    font-weight: 600;
}

.detail-plot {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-actions .btn-primary { width: auto; }

.detail-seasons {
    padding: 0 24px 24px;
}

.detail-seasons h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 16px;
}

@media (max-width: 640px) {
    .detail-body { flex-direction: column; }
    .detail-poster { width: 140px; margin: 0 auto; }
    .detail-info { padding-top: 0; text-align: center; }
    .detail-title { font-size: 22px; }
    .detail-actions { justify-content: center; }
}

/* ============================================
   SETTINGS MODAL
   ============================================ */

.settings-modal {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(5, 10, 24, 0.92);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.settings-container {
    width: 100%;
    max-width: 540px;
    background: var(--bg-dark);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-soft);
}

.settings-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.settings-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--trans-fast);
}

.settings-close:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.settings-close svg {
    width: 18px;
    height: 18px;
}

.settings-body {
    padding: 8px 0;
    max-height: 70vh;
    overflow-y: auto;
}

.setting-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-soft);
    gap: 16px;
}

.setting-item:last-child { border-bottom: none; }

.setting-info {
    flex: 1;
}

.setting-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setting-info p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-light);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--trans-fast);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--trans-fast);
}

.toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-light) 100%);
    border-color: var(--accent-primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: white;
}

[dir="rtl"] .toggle input:checked + .toggle-slider::before {
    transform: translateX(-22px);
}

/* ============================================
   LIVE TV MODE - TV-Style 3 Column Layout
   ============================================ */

.livetv-screen {
    position: fixed;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.4s ease;
    background: linear-gradient(135deg, #050a18 0%, #0a1628 100%);
    overflow: hidden;
}

.livetv-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
    z-index: 10;
}

.livetv-title {
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-light);
}

.livetv-title svg { color: var(--accent-light); }

.livetv-search {
    flex: 1;
    max-width: 400px;
    margin-left: auto;
    position: relative;
}

[dir="rtl"] .livetv-search { margin-left: 0; margin-right: auto; }

.livetv-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

[dir="rtl"] .livetv-search svg { left: auto; right: 14px; }

.livetv-search input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: var(--bg-deep);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 13px;
    transition: all var(--trans-fast);
}

[dir="rtl"] .livetv-search input { padding: 10px 40px 10px 16px; }

.livetv-search input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Body - 3 column layout */
.livetv-body {
    flex: 1;
    display: grid;
    grid-template-columns: 240px 280px 1fr;
    overflow: hidden;
    min-height: 0;
}

/* Section headers */
.livetv-section-header {
    padding: 14px 18px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-light);
    border-bottom: 1px solid var(--border-soft);
    background: rgba(10, 22, 40, 0.5);
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(10px);
}

.livetv-section-header svg {
    width: 14px;
    height: 14px;
}

/* Bouquets column */
.livetv-bouquets {
    background: rgba(10, 22, 40, 0.6);
    border-right: 1px solid var(--border-soft);
    overflow-y: auto;
}

[dir="rtl"] .livetv-bouquets {
    border-right: none;
    border-left: 1px solid var(--border-soft);
}

/* Channels column */
.livetv-channels {
    background: rgba(13, 31, 58, 0.4);
    border-right: 1px solid var(--border-soft);
    overflow-y: auto;
}

[dir="rtl"] .livetv-channels {
    border-right: none;
    border-left: 1px solid var(--border-soft);
}

/* Lists */
.livetv-list {
    padding: 8px 0;
}

/* Bouquet item */
.bouquet-item {
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 13px;
}

[dir="rtl"] .bouquet-item {
    border-left: none;
    border-right: 3px solid transparent;
}

.bouquet-item:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.bouquet-item.active {
    background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
    border-left-color: var(--accent-light);
    color: var(--accent-light);
    font-weight: 600;
}

[dir="rtl"] .bouquet-item.active {
    border-left-color: transparent;
    border-right-color: var(--accent-light);
    background: linear-gradient(-90deg, var(--accent-soft) 0%, transparent 100%);
}

.bouquet-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bouquet-count {
    font-size: 11px;
    opacity: 0.6;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Channel item */
.channel-item {
    padding: 10px 18px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
    color: var(--text-secondary);
}

[dir="rtl"] .channel-item {
    border-left: none;
    border-right: 3px solid transparent;
}

.channel-item:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.channel-item.active {
    background: linear-gradient(90deg, var(--accent-primary) 0%, var(--accent-soft) 100%);
    border-left-color: var(--accent-bright);
    color: white;
    font-weight: 600;
    box-shadow: inset 0 0 20px rgba(91, 192, 255, 0.2);
}

[dir="rtl"] .channel-item.active {
    border-left-color: transparent;
    border-right-color: var(--accent-bright);
    background: linear-gradient(-90deg, var(--accent-primary) 0%, var(--accent-soft) 100%);
}

.channel-num {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    flex-shrink: 0;
}

.channel-item.active .channel-num {
    color: white;
}

.channel-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px;
    flex-shrink: 0;
}

.channel-logo-placeholder {
    width: 28px;
    height: 28px;
    background: rgba(91, 192, 255, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.channel-logo-placeholder svg {
    width: 16px;
    height: 16px;
    color: var(--accent-light);
    opacity: 0.5;
}

.channel-name {
    flex: 1;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-fav-icon {
    width: 14px;
    height: 14px;
    color: var(--accent-light);
    fill: currentColor;
    flex-shrink: 0;
}

/* Main player area */
.livetv-main {
    background: var(--bg-deep);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.livetv-player-area {
    background: black;
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

#livetvVideo {
    width: 100%;
    height: 100%;
    background: black;
    object-fit: contain;
}

.livetv-player-loader {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 24, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 5;
}

.livetv-player-loader.hidden { display: none; }

.livetv-player-empty,
.livetv-player-error {
    position: absolute;
    inset: 0;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
    text-align: center;
    z-index: 4;
}

.livetv-player-empty svg {
    width: 80px;
    height: 80px;
    color: var(--accent-light);
    opacity: 0.3;
}

.livetv-player-empty h3 {
    font-size: 18px;
    color: var(--text-primary);
}

.livetv-player-empty p,
.livetv-player-error p {
    color: var(--text-muted);
    font-size: 14px;
    max-width: 400px;
}

.livetv-player-error svg {
    width: 64px;
    height: 64px;
    color: var(--danger);
}

.livetv-player-error h3 {
    color: var(--text-primary);
    font-size: 18px;
}

.livetv-fullscreen {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 6;
    transition: all 0.2s ease;
    opacity: 0;
}

.livetv-player-area:hover .livetv-fullscreen { opacity: 1; }

.livetv-fullscreen:hover {
    background: var(--accent-primary);
    transform: scale(1.05);
}

.livetv-fullscreen svg {
    width: 18px;
    height: 18px;
}

[dir="rtl"] .livetv-fullscreen {
    right: auto;
    left: 16px;
}

/* Info panel */
.livetv-info {
    background: rgba(10, 22, 40, 0.9);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-soft);
    padding: 16px 20px;
    flex-shrink: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.livetv-info-channel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-soft);
}

.livetv-info-channel img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 6px;
    flex-shrink: 0;
    border: 1px solid var(--border-soft);
}

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

.livetv-info-meta h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.livetv-info-sub {
    font-size: 12px;
    color: var(--accent-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* EPG Section */
.livetv-epg {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.livetv-epg-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-light);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.livetv-epg-header svg {
    width: 14px;
    height: 14px;
}

.livetv-epg-item {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(20, 37, 71, 0.4);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--border-soft);
    transition: all 0.2s ease;
}

[dir="rtl"] .livetv-epg-item {
    border-left: none;
    border-right: 3px solid var(--border-soft);
}

.livetv-epg-item.now {
    background: linear-gradient(90deg, var(--accent-soft) 0%, transparent 100%);
    border-left-color: var(--accent-light);
}

[dir="rtl"] .livetv-epg-item.now {
    border-left-color: transparent;
    border-right-color: var(--accent-light);
    background: linear-gradient(-90deg, var(--accent-soft) 0%, transparent 100%);
}

.livetv-epg-time {
    flex-shrink: 0;
    width: 90px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.livetv-epg-item.now .livetv-epg-time {
    color: var(--accent-light);
}

.livetv-epg-content {
    flex: 1;
    min-width: 0;
}

.livetv-epg-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.livetv-epg-desc {
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.livetv-epg-now-badge {
    display: inline-block;
    padding: 2px 6px;
    background: var(--accent-primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
    animation: pulseBadge 2s ease-in-out infinite;
}

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

.livetv-epg-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 20px;
    font-style: italic;
}

.livetv-epg-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Custom scrollbar for info panel */
.livetv-info::-webkit-scrollbar {
    width: 6px;
}

.livetv-info::-webkit-scrollbar-thumb {
    background: rgba(91, 192, 255, 0.2);
    border-radius: 3px;
}

.livetv-fav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.livetv-fav-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-light);
}

.livetv-fav-btn.active {
    color: var(--warning);
    border-color: var(--warning);
}

.livetv-fav-btn.active svg {
    fill: currentColor;
}

.livetv-fav-btn svg {
    width: 18px;
    height: 18px;
}

/* Custom scrollbar for live tv columns */
.livetv-bouquets::-webkit-scrollbar,
.livetv-channels::-webkit-scrollbar {
    width: 6px;
}

.livetv-bouquets::-webkit-scrollbar-thumb,
.livetv-channels::-webkit-scrollbar-thumb {
    background: rgba(91, 192, 255, 0.2);
    border-radius: 3px;
}

.livetv-bouquets::-webkit-scrollbar-thumb:hover,
.livetv-channels::-webkit-scrollbar-thumb:hover {
    background: rgba(91, 192, 255, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .livetv-body {
        grid-template-columns: 200px 240px 1fr;
    }
    .livetv-info {
        padding: 12px 16px;
    }
    .livetv-info-channel img { width: 48px; height: 48px; }
    .livetv-info-meta h3 { font-size: 15px; }
    .livetv-epg-time { width: 80px; font-size: 11px; }
}

@media (max-width: 768px) {
    .livetv-header {
        padding: 12px 16px;
        flex-wrap: wrap;
    }
    .livetv-title { font-size: 16px; }
    .livetv-search {
        order: 3;
        flex-basis: 100%;
        max-width: none;
    }
    .livetv-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
        overflow: visible;
    }
    .livetv-main {
        order: 1;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    .livetv-bouquets {
        order: 2;
        max-height: 180px;
        border-right: none;
        border-bottom: 1px solid var(--border-soft);
    }
    .livetv-channels {
        order: 3;
        max-height: 50vh;
        border-right: none;
    }
    [dir="rtl"] .livetv-bouquets,
    [dir="rtl"] .livetv-channels {
        border-left: none;
        border-bottom: 1px solid var(--border-soft);
    }
    .livetv-info {
        padding: 10px 14px;
    }
    .livetv-info-channel { gap: 10px; margin-bottom: 12px; padding-bottom: 12px; }
    .livetv-info-channel img { width: 42px; height: 42px; }
    .livetv-info-meta h3 { font-size: 14px; }
    .livetv-epg-time { width: 70px; font-size: 11px; }
    .livetv-epg-title { font-size: 12px; }
    .livetv-epg-desc { font-size: 10px; }
}

/* ============================================
   PROFESSIONAL LOADERS (TV Style)
   ============================================ */

.tv-loader {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    height: 50px;
}

.tv-loader-bar {
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent-primary) 100%);
    border-radius: 3px;
    animation: tvBarBounce 1s ease-in-out infinite;
    box-shadow: 0 0 10px var(--accent-glow);
}

.tv-loader-bar:nth-child(1) { animation-delay: 0s; }
.tv-loader-bar:nth-child(2) { animation-delay: 0.15s; }
.tv-loader-bar:nth-child(3) { animation-delay: 0.3s; }
.tv-loader-bar:nth-child(4) { animation-delay: 0.45s; }

@keyframes tvBarBounce {
    0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.tv-loader-text {
    color: var(--accent-light);
    font-size: 12px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 600;
    animation: pulseFade 1.5s ease-in-out infinite;
}

@keyframes pulseFade {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Skeleton cards */
.content-skeleton {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    padding: 0;
}

.content-skeleton.live-mode {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

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

.skeleton-poster {
    aspect-ratio: 2/3;
    background: linear-gradient(90deg, 
        rgba(91, 192, 255, 0.05) 0%, 
        rgba(91, 192, 255, 0.1) 50%, 
        rgba(91, 192, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-poster.live {
    aspect-ratio: 1/1;
}

.skeleton-info {
    padding: 12px;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, 
        rgba(91, 192, 255, 0.05) 0%, 
        rgba(91, 192, 255, 0.1) 50%, 
        rgba(91, 192, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 6px;
}

.skeleton-line.short { width: 60%; }

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

/* Player fullscreen button */
.player-fullscreen-btn {
    position: absolute;
    bottom: 60px;
    right: 16px;
    width: 38px;
    height: 38px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 10;
    opacity: 0;
    transition: all 0.2s ease;
}

.player-video:hover .player-fullscreen-btn { opacity: 1; }

.player-fullscreen-btn:hover {
    background: var(--accent-primary);
    transform: scale(1.05);
}

.player-fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

[dir="rtl"] .player-fullscreen-btn {
    right: auto;
    left: 16px;
}

/* Click loading state on cards */
.content-card.loading {
    pointer-events: none;
    position: relative;
}

.content-card.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 24, 0.7);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-lg);
    z-index: 3;
    animation: fadeIn 0.2s ease;
}

.content-card.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border: 3px solid rgba(91, 192, 255, 0.2);
    border-top-color: var(--accent-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 4;
}
