:root {
    --bg-primary: #0f0f1a;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252540;
    --accent-red: #e50914;
    --accent-red-hover: #ff1a25;
    --text-primary: #ffffff;
    --text-secondary: #b0b0c0;
    --text-muted: #6b6b80;
    --border-color: #2a2a40;
}

.player-section {
    background: var(--bg-primary);
    padding: 80px 0 0;
}

.player-wrapper {
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    background: #000;
}

.player-container {
    position: relative;
    width: 100%;
    padding-top: 40%;
    background: #000;
    overflow: hidden;
}

.player-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-overlay-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 16px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
    z-index: 5;
    pointer-events: none;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-red);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    animation: livePulse 2s infinite;
    pointer-events: auto;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: dotPulse 1.5s infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.player-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
    padding: 40px 16px 12px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.player-container:hover .player-controls {
    opacity: 1;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.controls-right,
.controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.control-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.1);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0;
    direction: ltr;
    position: relative;
}

.volume-control .control-btn {
    flex-shrink: 0;
}

.volume-slider-wrapper {
    width: 0;
    overflow: hidden;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0;
}

.volume-control:hover .volume-slider-wrapper {
    width: 90px;
    padding-left: 6px;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: transparent;
    outline: none;
    cursor: pointer;
    position: relative;
}

.volume-slider::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
}

.volume-slider::-moz-range-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.2);
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    border: none;
    margin-top: -5px;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.volume-slider::-moz-range-thumb {
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: #fff;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 4px rgba(0,0,0,0.3);
}

.volume-slider::-moz-range-progress {
    height: 4px;
    border-radius: 2px;
    background: var(--accent-red);
}

.volume-slider::-ms-fill-lower {
    height: 4px;
    border-radius: 2px;
    background: var(--accent-red);
}

.player-error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.error-content {
    text-align: center;
    color: #fff;
}

.error-icon {
    font-size: 48px;
    color: var(--accent-red);
    margin-bottom: 16px;
}

.error-message {
    font-size: 16px;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.retry-btn {
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.retry-btn:hover {
    background: var(--accent-red-hover);
}

.player-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.6);
    z-index: 8;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--accent-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.small {
    width: 24px;
    height: 24px;
    border-width: 3px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.now-playing-bar {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 12px 20px;
    gap: 16px;
    flex-wrap: wrap;
}

.now-playing-channel {
    display: flex;
    align-items: center;
    gap: 10px;
}

.now-channel-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: #1a1a2e;
    border: 1px solid var(--border-color);
    padding: 2px;
}

.now-channel-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 700;
}

.now-playing-current,
.now-playing-next {
    display: flex;
    align-items: center;
    gap: 10px;
}

.now-label {
    background: var(--accent-red);
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.next-label {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.now-program-name,
.next-program-name {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.now-program-time,
.next-program-time {
    color: var(--text-muted);
    font-size: 12px;
}

.now-playing-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.channels-strip-section {
    background: var(--bg-primary);
    padding: 16px 20px;
}

.channels-strip-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strip-nav-btn {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    font-size: 14px;
    z-index: 2;
}

.strip-nav-btn:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
}

.channels-strip {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.channels-strip-inner {
    display: flex;
    gap: 12px;
    transition: transform 0.4s ease;
    padding: 4px 0;
}

.channel-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    min-width: 100px;
    max-width: 100px;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s, transform 0.2s;
    text-align: center;
    flex-shrink: 0;
    position: relative;
}

.channel-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-2px);
}

.channel-card.active {
    background: rgba(229,9,20,0.15);
    animation: channelActiveGlow 2s ease-in-out infinite;
}

@keyframes channelActiveGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229,9,20,0); }
    50% { box-shadow: 0 0 12px 2px rgba(229,9,20,0.3); }
}

.channel-card.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--accent-red);
    border-radius: 3px;
    animation: activeBarPulse 2s ease-in-out infinite;
}

@keyframes activeBarPulse {
    0%, 100% { width: 40px; opacity: 1; }
    50% { width: 50px; opacity: 0.8; }
}

.channel-card-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: contain;
    background: #1a1a2e;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.3s;
    padding: 4px;
}

.channel-card.active .channel-card-logo {
    border-color: var(--accent-red);
    box-shadow: 0 0 12px rgba(229,9,20,0.4);
    background: rgba(229,9,20,0.1);
}

.channel-card-name {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.channel-card.active .channel-card-name {
    color: var(--text-primary);
}

.channel-card-badge {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: var(--accent-red);
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 700;
}

.channel-card-badge .badge-dot {
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: dotPulse 1.5s infinite;
}

.epg-section {
    background: var(--bg-primary);
    padding: 16px 20px 50px;
}

.epg-sticky-header {
    position: sticky;
    top: 56px;
    z-index: 20;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-primary);
    padding-bottom: 0;
}

.epg-toolbar {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 0 8px;
    height: 52px;
    gap: 0;
    overflow: visible;
    margin-bottom: 8px;
}

.epg-time-header-scroll {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    direction: rtl;
}

.epg-time-header-scroll::-webkit-scrollbar {
    display: none;
}

.epg-toolbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    height: 52px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
    white-space: nowrap;
    position: relative;
}

.epg-toolbar-item:hover {
    color: var(--text-primary);
}

.epg-toolbar-item.active {
    color: var(--text-primary);
}

.epg-toolbar-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--accent-red);
    border-radius: 2px;
}

.epg-toolbar-item svg {
    flex-shrink: 0;
}

.epg-toolbar-separator {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    flex-shrink: 0;
}

.epg-toolbar-dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
    margin-right: 4px;
}

.epg-toolbar-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-red) var(--bg-secondary);
}

.epg-toolbar-dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.dropdown-item.active {
    color: var(--accent-red);
    font-weight: 600;
}

.dropdown-item.active::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 11px;
}

.epg-toolbar-spacer {
    flex: 1;
}

.epg-toolbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 8px;
    margin-left: 0;
}

.epg-nav-arrow {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 14px;
}

.epg-nav-arrow:hover {
    color: #fff;
}

.epg-grid-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border-color);
    border-top: none;
    direction: rtl;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.epg-grid-wrapper::-webkit-scrollbar {
    display: none;
}

.epg-grid {
    position: relative;
    direction: rtl;
    min-width: fit-content;
}

.epg-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.epg-time-header {
    display: flex;
    flex-direction: row;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    min-width: 7300px;
    direction: rtl;
    position: relative;
}

.epg-time-indicator-header {
    top: 0;
    bottom: 0;
    z-index: 5;
}

.epg-time-indicator-header .epg-time-indicator-label {
    top: 50%;
    transform: translate(-50%, -50%);
}

.epg-time-indicator-header .epg-time-indicator-label::after {
    display: none;
}

.epg-time-slots-wrapper {
    display: flex;
    flex-direction: row;
    direction: rtl;
    width: 7200px;
    min-width: 7200px;
    flex-shrink: 0;
}

.epg-time-header-channel-placeholder {
    width: 100px;
    min-width: 100px;
    flex-shrink: 0;
    position: sticky;
    right: 0;
    background: var(--bg-tertiary);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    border-left: 1px solid var(--border-color);
}

.epg-time-slot {
    min-width: 150px;
    width: 150px;
    padding: 10px 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    border-left: 1px solid var(--border-color);
    flex-shrink: 0;
    direction: ltr;
    position: relative;
}

.epg-time-slot.half-hour {
    color: rgba(255,255,255,0.25);
    font-size: 10px;
    border-left: 1px solid rgba(255,255,255,0.04);
}

.epg-time-slot::after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 1px;
    height: 2000px;
    background: rgba(255,255,255,0.03);
    pointer-events: none;
}

.epg-time-slot.half-hour::after {
    background: rgba(255,255,255,0.015);
}

.epg-body {
    position: relative;
    min-width: 7300px;
    padding-top: 28px;
    background: var(--bg-primary);
}

.epg-time-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-red);
    z-index: 10;
    pointer-events: none;
    animation: indicatorPulse 2s ease-in-out infinite;
}

@keyframes indicatorPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(229,9,20,0.3); }
    50% { opacity: 0.8; box-shadow: 0 0 10px rgba(229,9,20,0.6); }
}

.epg-time-indicator::before {
    content: '';
    position: absolute;
    top: -6px;
    left: -5px;
    width: 12px;
    height: 12px;
    background: var(--accent-red);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(229,9,20,0.6);
    animation: indicatorDotPulse 2s ease-in-out infinite;
}

@keyframes indicatorDotPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 8px rgba(229,9,20,0.6); }
    50% { transform: scale(1.3); box-shadow: 0 0 16px rgba(229,9,20,0.8); }
}

.epg-time-indicator-label {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(229,9,20,0.4);
    z-index: 20;
}

.epg-time-indicator-label::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid var(--accent-red);
}

.epg-channel-row {
    display: flex;
    flex-direction: row;
    border-bottom: 1px solid var(--border-color);
    min-height: 90px;
    direction: rtl;
}

.epg-channel-info {
    width: 100px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--bg-secondary);
    position: sticky;
    right: 0;
    z-index: 1;
    border-left: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.epg-channel-info:hover {
    background: var(--bg-tertiary);
}

.epg-channel-logo {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: contain;
    background: #1a1a2e;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
    padding: 4px;
}

.epg-programs-row {
    position: relative;
    width: 7200px;
    min-height: 80px;
    direction: rtl;
    padding: 4px 0;
}

.epg-program {
    position: absolute;
    top: 4px;
    bottom: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 12px;
    background: #1e1e35;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    overflow: hidden;
    min-width: 40px;
    box-sizing: border-box;
}

.epg-program:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    z-index: 1;
}

.epg-program.current {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

.epg-program.current:hover {
    background: var(--accent-red-hover);
    border-color: var(--accent-red-hover);
}

.epg-gap {
    background: transparent;
}

.epg-program-time {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
    direction: ltr;
    text-align: right;
}

.epg-program-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: rtl;
    text-align: right;
}

.epg-program.current .epg-program-title {
    color: #fff;
}

.epg-program.current .epg-program-time {
    color: rgba(255,255,255,0.85);
}

.epg-no-programs {
    padding: 16px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    width: 100%;
    direction: rtl;
    min-height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.program-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.popup-content {
    background: linear-gradient(135deg, #1a2a3a, #1a1a2e);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    border-top: 3px solid var(--accent-red);
    padding: 0;
    max-width: 480px;
    width: 90%;
    position: relative;
    direction: rtl;
    text-align: right;
    overflow: hidden;
}

.popup-poster-wrap {
    position: relative;
    width: 100%;
    max-height: 220px;
    overflow: hidden;
    background: #111;
}

.popup-poster-wrap img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.popup-poster-wrap .popup-poster-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, #1a2a3a);
}

.popup-body {
    padding: 20px 24px 24px;
}

.popup-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.popup-close:hover {
    color: var(--text-primary);
}

.popup-time {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
}

.popup-title {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
}

.popup-channel-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.popup-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.popup-tag.genre-tag {
    background: rgba(229,9,20,0.15);
    color: var(--accent-red);
}

.popup-tag.duration-tag {
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
}

.popup-tag.repeat-tag {
    background: rgba(255,165,0,0.12);
    color: #ffa726;
}

.popup-tag.year-tag {
    background: rgba(33,150,243,0.12);
    color: #42a5f5;
}

.popup-cast {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
    margin: 8px 0 12px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    border-right: 3px solid var(--accent-red);
}

.popup-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 20px;
    max-height: 120px;
    overflow-y: auto;
}

.popup-watch-btn {
    background: var(--accent-red);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.15s;
}

.popup-watch-btn:hover {
    background: var(--accent-red-hover);
    transform: scale(1.02);
}

.player-container.fullscreen-active .player-controls {
    opacity: 1;
}

.player-container.fullscreen-active {
    padding-top: 0;
    height: 100vh;
}

.sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 16px;
    color: var(--text-muted);
    font-size: 13px;
    width: 100%;
}

@media (max-width: 900px) {
    .player-section {
        padding: 60px 0 0;
    }

    .player-container {
        padding-top: 42%;
    }

    .now-playing-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 16px;
    }

    .now-playing-divider {
        width: 100%;
        height: 1px;
    }

    .channels-strip-section {
        padding: 12px 10px;
    }

    .channel-card {
        min-width: 80px;
        max-width: 80px;
        padding: 8px 4px;
    }

    .channel-card-logo {
        width: 44px;
        height: 44px;
    }

    .channel-card-name {
        font-size: 10px;
    }

    .epg-toolbar {
        flex-wrap: wrap;
        height: auto;
        padding: 8px;
        gap: 4px;
    }

    .epg-toolbar-item {
        height: 40px;
        font-size: 13px;
        padding: 0 10px;
    }

    .epg-toolbar-separator {
        display: none;
    }

    .epg-toolbar-nav {
        margin-left: 0;
    }

    .epg-channel-info {
        width: 60px;
        min-width: 60px;
        padding: 6px;
    }

    .epg-channel-logo {
        width: 32px;
        height: 32px;
    }

    .epg-time-header-channel-placeholder {
        width: 60px;
        min-width: 60px;
    }

    .epg-time-slot {
        min-width: 120px;
        width: 120px;
    }
}

@media (max-width: 480px) {
    .player-container {
        padding-top: 50%;
    }

    .player-controls {
        padding: 20px 8px 8px;
    }

    .control-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .live-badge {
        font-size: 11px;
        padding: 3px 8px;
    }

    .epg-toolbar-item {
        padding: 0 8px;
        font-size: 12px;
        gap: 4px;
    }

    .epg-toolbar-item svg {
        width: 16px;
        height: 16px;
    }

    .channel-card {
        min-width: 70px;
        max-width: 70px;
    }

    .channel-card-logo {
        width: 38px;
        height: 38px;
    }
}

.livetv-locked-player {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #080818 0%, #0f1a2e 40%, #1a1030 70%, #0a0a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    overflow: hidden;
}

.livetv-locked-player::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(229,9,20,0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(100,50,200,0.04) 0%, transparent 50%);
    animation: lockedBgShift 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes lockedBgShift {
    0% { transform: translate(0, 0); }
    100% { transform: translate(5%, -3%); }
}

.locked-player-content {
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 2;
    direction: rtl;
}

.locked-icon-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(229,9,20,0.15) 0%, rgba(229,9,20,0.05) 100%);
    border: 2px solid rgba(229,9,20,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: lockPulse 3s ease-in-out infinite;
    position: relative;
}

.locked-icon-wrap::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 1px solid rgba(229,9,20,0.1);
    animation: lockRingPulse 3s ease-in-out infinite;
}

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

.locked-icon-wrap i {
    font-size: 36px;
    color: var(--accent-red);
}

@keyframes lockPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229,9,20,0); }
    50% { transform: scale(1.05); box-shadow: 0 0 40px 8px rgba(229,9,20,0.12); }
}

.locked-title {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 auto 10px;
    max-width: 450px;
    line-height: 1.6;
}

.locked-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    max-width: 420px;
    margin: 0 auto 20px;
    line-height: 1.7;
    opacity: 0.8;
}

.locked-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.locked-feature {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    background: rgba(255,255,255,0.04);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.06);
}

.locked-feature i {
    color: var(--accent-red);
    font-size: 11px;
}

.locked-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-red);
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(229,9,20,0.3);
}

.locked-action-btn:hover {
    background: var(--accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(229,9,20,0.4);
    color: #fff;
    text-decoration: none;
}

.locked-action-btn i {
    font-size: 14px;
}

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

.channel-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.45);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.channel-lock-overlay i {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.5);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.channel-card.locked:hover {
    cursor: pointer;
}

.channel-card.locked .channel-card-logo {
    filter: grayscale(0.4) brightness(0.7);
}

.livetv-access-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 70px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.livetv-access-modal.active {
    opacity: 1;
}

.access-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
}

.access-modal-container {
    position: relative;
    background: linear-gradient(145deg, #1a2a3a 0%, #151525 100%);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 40px 36px;
    max-width: 440px;
    width: 90%;
    text-align: center;
    direction: rtl;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 1px rgba(255,255,255,0.1);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.livetv-access-modal.active .access-modal-container {
    transform: translateY(0) scale(1);
}

.access-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255,255,255,0.06);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.access-modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.access-modal-icon {
    margin-bottom: 24px;
}

.access-modal-icon-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(229,9,20,0.15) 0%, rgba(229,9,20,0.05) 100%);
    border: 2px solid rgba(229,9,20,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    animation: iconRingPulse 3s ease-in-out infinite;
}

.access-modal-icon-ring i {
    font-size: 30px;
    color: var(--accent-red);
}

@keyframes iconRingPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(229,9,20,0), 0 0 20px rgba(229,9,20,0.05); }
    50% { box-shadow: 0 0 0 8px rgba(229,9,20,0.06), 0 0 40px rgba(229,9,20,0.1); }
}

.access-modal-title {
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 12px;
    line-height: 1.4;
}

.access-modal-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.8;
    margin: 0 0 20px;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.access-modal-plan-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,165,0,0.1);
    border: 1px solid rgba(255,165,0,0.2);
    color: #ffa726;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 24px;
}

.access-modal-plan-badge i {
    font-size: 12px;
}

.access-modal-features {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 28px;
    text-align: right;
}

.access-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.access-feature-item + .access-feature-item {
    border-top: 1px solid rgba(255,255,255,0.04);
}

.access-feature-item i {
    color: var(--accent-red);
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.access-modal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent-red) 0%, #c2070f 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(229,9,20,0.3);
}

.access-modal-btn:hover {
    background: linear-gradient(135deg, var(--accent-red-hover) 0%, #e50914 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(229,9,20,0.4);
    color: #fff;
    text-decoration: none;
}

.access-modal-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .access-modal-container {
        padding: 30px 24px;
    }
    .access-modal-title {
        font-size: 18px;
    }
    .access-modal-icon-ring {
        width: 64px;
        height: 64px;
    }
    .access-modal-icon-ring i {
        font-size: 24px;
    }
    .locked-icon-wrap {
        width: 70px;
        height: 70px;
    }
    .locked-icon-wrap i {
        font-size: 28px;
    }
    .locked-title {
        font-size: 18px;
    }
    .locked-subtitle {
        font-size: 13px;
    }
    .locked-features {
        gap: 10px;
    }
    .locked-feature {
        font-size: 11px;
        padding: 5px 10px;
    }
    .locked-action-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}
