/*
Theme Name: Movie
*/

        @font-face {
            font-family: 'Vazirmatn';
            font-style: normal;
            font-weight: 400;
            src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
        }
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }
        
        :root {
            --primary: #8a2be2;
            --primary-dark: #6a1fb9;
            --secondary: #ff6b6b;
            --dark: #121212;
            --darker: #0a0a0a;
            --light: #f0f0f0;
            --gray: #2a2a2a;
            --light-gray: #3a3a3a;
            --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
        }
        
        body {
            background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
            color: var(--light);
            min-height: 100vh;
            padding: 20px;
            overflow-x: hidden;
            position: relative;
        }
        
        body::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle at 20% 30%, rgba(138, 43, 226, 0.1) 0%, transparent 40%),
                        radial-gradient(circle at 80% 70%, rgba(255, 107, 107, 0.1) 0%, transparent 40%);
            z-index: -1;
        }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
        }
        
        header {
            text-align: center;
            padding: 25px 0;
            margin-bottom: 30px;
            position: relative;
        }
        
        h1 {
            font-size: 2.2rem;
            margin-bottom: 15px;
            color: var(--light);
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
        }
        
        .subtitle {
            font-size: 1.1rem;
            color: #bbb;
            max-width: 800px;
            margin: 0 auto;
            line-height: 1.7;
        }
        
        .player-container {
            display: grid;
            grid-template-columns: 1fr 350px;
            gap: 25px;
            margin-bottom: 40px;
        }
        
        @media (max-width: 992px) {
            .player-container {
                grid-template-columns: 1fr;
            }
        }
        
        .video-section {
            background: rgba(20, 20, 30, 0.7);
            border-radius: 20px;
            overflow: hidden;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            position: relative;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        
        .video-wrapper {
            position: relative;
            width: 100%;
            padding-top: 56.25%;
            background: linear-gradient(45deg, #1a1a1a, #0d0d0d);
        }
        
        video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            outline: none;
            background: #000;
            object-fit: cover;
        }
        
        .header-ad {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            background: linear-gradient(90deg, rgba(255, 107, 107, 0.9), rgba(138, 43, 226, 0.9));
            color: white;
            padding: 12px 20px;
            text-align: center;
            font-weight: bold;
            font-size: 1.1rem;
            z-index: 20;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            transition: var(--transition);
            transform: translateY(-100%);
        }
        
        .header-ad.show {
            transform: translateY(0);
        }
        
        .header-ad .close-ad {
            background: rgba(0,0,0,0.2);
            border-radius: 50%;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
        }
        
        .header-ad .close-ad:hover {
            background: rgba(0,0,0,0.4);
            transform: rotate(90deg);
        }
        
        .playlist-section {
            background: rgba(20, 20, 30, 0.7);
            border-radius: 20px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        
        .playlist-header {
            padding: 20px;
            background: linear-gradient(90deg, var(--primary-dark), var(--primary));
            display: flex;
            align-items: center;
            gap: 15px;
        }
        
        .playlist-header h2 {
            font-size: 1.6rem;
        }
        
        .playlist-content {
            padding: 20px 15px;
            overflow-y: auto;
            flex: 1;
            max-height: 700px;
        }
        
        .playlist-search {
            position: relative;
            margin-bottom: 20px;
        }
        
        .playlist-search input {
            width: 100%;
            padding: 12px 15px 12px 45px;
            background: rgba(40, 40, 50, 0.5);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            color: var(--light);
            font-size: 1rem;
        }
        
        .playlist-search i {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: #aaa;
        }
        
        .schedule-list {
            list-style: none;
        }
        
        .schedule-item {
            padding: 18px 15px;
            margin-bottom: 12px;
            background: rgba(40, 40, 50, 0.4);
            border-radius: 12px;
            transition: var(--transition);
            cursor: pointer;
            border-left: 4px solid var(--primary);
            display: flex;
            gap: 15px;
            align-items: center;
        }
        
        .schedule-item:hover {
            background: rgba(60, 60, 80, 0.6);
            transform: translateX(-5px);
        }
        
        .schedule-item.active {
            background: linear-gradient(90deg, rgba(138, 43, 226, 0.3), rgba(138, 43, 226, 0.1));
            border-left: 4px solid var(--secondary);
        }
        
        .schedule-thumb {
            width: 50px;
            height: 70px;
            border-radius: 6px;
            background: linear-gradient(45deg, #2a0b45, #6a1fb9);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            opacity: 0.8;
        }
        
        .schedule-info {
            flex: 1;
        }
        
        .schedule-title {
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 5px;
            color: #fff;
        }
        
        .schedule-time {
            color: #bbb;
            font-size: 0.85rem;
            display: flex;
            gap: 15px;
        }
        
        .schedule-duration {
            background: rgba(255, 107, 107, 0.2);
            color: var(--secondary);
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
        }
        
        .controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 25px;
            background: rgba(15, 15, 25, 0.9);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            direction:ltr !important;
        }
        
        .control-group {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        
        .control-btn {
            background: rgba(60, 60, 80, 0.4);
            border: none;
            color: white;
            width: 45px;
            height: 45px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
            font-size: 1.2rem;
            position: relative;
            overflow: hidden;
        }
        
        .control-btn::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, var(--primary), transparent);
            opacity: 0;
            transition: var(--transition);
        }
        
        .control-btn:hover {
            background: rgba(90, 90, 120, 0.6);
            transform: scale(1.1);
        }
        
        .control-btn:hover::after {
            opacity: 0.3;
        }
        
        .control-btn.active {
            background: var(--primary);
            box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
        }
        
        .time-display {
            font-size: 1.1rem;
            font-family: monospace;
            background: rgba(0, 0, 0, 0.3);
            padding: 8px 20px;
            border-radius: 30px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .cast-btn {
            background: linear-gradient(135deg, var(--secondary), #ff8e8e);
        }
        
        .volume-control {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .volume-slider {
            width: 100px;
            height: 6px;
            -webkit-appearance: none;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 3px;
            outline: none;
        }
        
        .volume-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: var(--primary);
            cursor: pointer;
            box-shadow: 0 0 5px rgba(0,0,0,0.5);
        }
        
        .channel-info {
            display: flex;
            justify-content: space-between;
            padding: 15px 25px;
            background: rgba(15, 15, 25, 0.7);
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            align-items: center;
        }
        
        .channel-name {
            font-size: 1.3rem;
            font-weight: bold;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .now-playing {
            color: #bbb;
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .live-indicator {
            background: var(--secondary);
            color: white;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.85rem;
            font-weight: bold;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        
        .live-indicator::before {
            content: "";
            width: 8px;
            height: 8px;
            background: white;
            border-radius: 50%;
            display: block;
            animation: pulse 1.5s infinite;
        }
        
        @keyframes pulse {
            0% { opacity: 1; }
            50% { opacity: 0.4; }
            100% { opacity: 1; }
        }
        
        .schedule-grid {
            background: rgba(20, 20, 30, 0.7);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
            margin-top: 30px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        
        .schedule-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 25px;
            flex-wrap: wrap;
            gap: 15px;
        }
        
        .schedule-header h2 {
            font-size: 1.8rem;
            color: var(--light);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .week-nav {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding: 5px 0;
        }
        
        .day-btn {
            background: rgba(60, 60, 80, 0.4);
            color: #ddd;
            border: none;
            padding: 10px 20px;
            border-radius: 30px;
            cursor: pointer;
            transition: var(--transition);
            white-space: nowrap;
        }
        
        .day-btn:hover {
            background: var(--primary);
        }
        
        .day-btn.active {
            background: var(--primary);
            box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
        }
        
        .time-slots {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }
        
        .time-slot {
            background: rgba(40, 40, 50, 0.4);
            padding: 20px;
            border-radius: 15px;
            transition: var(--transition);
            border-left: 4px solid var(--primary);
            cursor: pointer;
        }
        
        .time-slot:hover {
            background: rgba(60, 60, 80, 0.6);
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }
        
        .time-slot.active {
            background: linear-gradient(90deg, rgba(138, 43, 226, 0.3), rgba(138, 43, 226, 0.1));
            border-left: 4px solid var(--secondary);
        }
        
        .slot-time {
            font-size: 1.1rem;
            font-weight: bold;
            color: var(--primary);
            margin-bottom: 10px;
            display: flex;
            justify-content: space-between;
        }
        
        .slot-title {
            font-size: 1.05rem;
            color: #fff;
            line-height: 1.6;
            margin-bottom: 15px;
        }
        
        .slot-meta {
            display: flex;
            gap: 15px;
            color: #bbb;
            font-size: 0.9rem;
        }
        
        .quality-tag {
            background: rgba(255, 107, 107, 0.2);
            color: var(--secondary);
            padding: 3px 10px;
            border-radius: 4px;
            font-size: 0.8rem;
        }
        
        footer {
            text-align: center;
            padding: 40px 0 20px;
            margin-top: 40px;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            color: #888;
            font-size: 0.9rem;
        }
        
        .footer-links {
            display: flex;
            justify-content: center;
            gap: 25px;
            margin-top: 15px;
            flex-wrap: wrap;
        }
        
        .footer-link {
            color: #aaa;
            text-decoration: none;
            transition: var(--transition);
        }
        
        .footer-link:hover {
            color: var(--primary);
        }
        
        .progress-container {
            width: 100%;
            height: 6px;
            background: rgba(255, 255, 255, 0.05);
            cursor: pointer;
            position: relative;
            direction:ltr !important;
            
        }
        
        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--primary), var(--secondary));
            width: 0%;
            border-radius: 3px;
            transition: width 0.1s linear;
            position: relative;

        }
        
        .progress-bar::after {
            content: '';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 12px;
            height: 12px;
            background: white;
            border-radius: 50%;
            box-shadow: 0 0 5px rgba(0,0,0,0.5);
            opacity: 0;
            transition: opacity 0.2s;
        }
        
        .progress-container:hover .progress-bar::after {
            opacity: 1;
        }
        
        /* Cast modal */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(5px);
        }
        
        .modal-content {
            background: linear-gradient(135deg, #1a0b2e, #2d0b55);
            border-radius: 20px;
            padding: 40px;
            width: 90%;
            max-width: 500px;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
            border: 1px solid rgba(138, 43, 226, 0.3);
            position: relative;
        }
        
        .modal h2 {
            font-size: 1.8rem;
            margin-bottom: 25px;
            color: var(--light);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }
        
        .devices-list {
            list-style: none;
            margin: 30px 0;
        }
        
        .device-item {
            padding: 18px;
            margin: 15px 0;
            background: rgba(60, 30, 100, 0.4);
            border-radius: 15px;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: 15px;
            text-align: right;
            border: 1px solid rgba(138, 43, 226, 0.2);
        }
        
        .device-item:hover {
            background: rgba(90, 50, 150, 0.6);
            transform: translateX(-10px);
            border-color: var(--primary);
        }
        
        .device-icon {
            font-size: 1.5rem;
            color: var(--primary);
        }
        
        .device-info {
            flex: 1;
        }
        
        .device-name {
            font-size: 1.1rem;
            color: #fff;
            margin-bottom: 5px;
        }
        
        .device-status {
            color: #bbb;
            font-size: 0.9rem;
        }
        
        .close-btn {
            background: var(--secondary);
            color: white;
            border: none;
            padding: 12px 35px;
            border-radius: 30px;
            cursor: pointer;
            font-size: 1rem;
            margin-top: 10px;
            transition: var(--transition);
            font-weight: 600;
        }
        
        .close-btn:hover {
            background: #ff8e8e;
            transform: scale(1.05);
            box-shadow: 0 0 15px rgba(255, 107, 107, 0.4);
        }
        
        /* Animation for active item */
        @keyframes highlight {
            0% { box-shadow: 0 0 0 0 rgba(138, 43, 226, 0.6); }
            70% { box-shadow: 0 0 0 10px rgba(138, 43, 226, 0); }
            100% { box-shadow: 0 0 0 0 rgba(138, 43, 226, 0); }
        }
        
        .highlight {
            animation: highlight 1.5s;
        }
        
        /* Ad settings panel */
        .ad-settings {
            position: fixed;
            top: 20px;
            left: 20px;
            background: rgba(30, 30, 40, 0.9);
            padding: 20px;
            border-radius: 15px;
            z-index: 100;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            width: 300px;
            display: none;
        }
        
        .ad-settings.show {
            display: block;
        }
        
        .ad-settings h3 {
            margin-bottom: 15px;
            color: var(--primary);
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .ad-control-group {
            margin-bottom: 15px;
        }
        
        .ad-control-group label {
            display: block;
            margin-bottom: 5px;
            color: #ddd;
        }
        
        .ad-control-group input, 
        .ad-control-group textarea {
            width: 100%;
            padding: 10px;
            border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.1);
            background: rgba(20,20,30,0.7);
            color: white;
        }
        
        .ad-control-group textarea {
            height: 80px;
            resize: vertical;
        }
        
        .save-ad-btn {
            background: var(--primary);
            color: white;
            border: none;
            padding: 10px 15px;
            border-radius: 8px;
            cursor: pointer;
            width: 100%;
            transition: var(--transition);
        }
        
        .save-ad-btn:hover {
            background: var(--primary-dark);
        }
        
        /* Responsive adjustments */
        @media (max-width: 768px) {
            .controls {
                flex-direction: column;
                gap: 15px;
            }
            
            .channel-info {
                flex-direction: column;
                gap: 10px;
                text-align: center;
            }
            
            .schedule-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .week-nav {
                width: 100%;
            }
        }
        
        @media (max-width: 480px) {
            .time-slots {
                grid-template-columns: 1fr;
            }
            
            h1 {
                font-size: 1.8rem;
            }
            
            .logo {
                font-size: 2.2rem;
            }
        }
