        @import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;600&display=swap');
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Tajawal', sans-serif;
        }
        body {
            background: var(--primary);
            color: var(--text);
            min-height: 100vh;
            line-height: 1.6;
            transition: var(--transition);
        }
        .header {
            padding: 1rem;
            background: var(--secondary);
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        .nav {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1.5rem;
            padding: 0 1rem;
        }

        .nav-start {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.8rem;
            color: var(--accent);
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
        }

        .logo:hover {
            transform: translateY(-2px);
        }

        .menu-toggle {
            display: block;
            background: none;
            border: none;
            color: var(--text);
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: var(--transition);
        }

        .menu-toggle:hover {
            background: rgba(255,255,255,0.1);
        }

        .sidebar {
            position: fixed;
            top: 0;
            right: -100%;
            width: 50%;
            max-width: 300px;
            height: 100%;
            background: var(--secondary);
            box-shadow: -4px 0 12px rgba(0,0,0,0.2);
            transition: var(--transition);
            z-index: 2000;
            padding: 1rem;
        }
        .sidebar.active {
            right: 0;
        }
        .sidebar-menu {
            list-style: none;
            margin-top: 2rem;
        }
        .sidebar-item {
            padding: 1rem;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
        }
        .sidebar-item:hover {
            background: rgba(0,0,0,0.1);
        }
        .controls {
            flex: 1;
            display: flex;
            gap: 1rem;
            align-items: center;
        }
        .filters-container {
            display: flex;
            gap: .8rem;
            align-items: center;
            flex-wrap: wrap;        }
        .filter-btn {
            padding: .5rem 1rem;
            border: 2px solid var(--accent);
            border-radius: 20px;
            background: none;
            color: var(--text);
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            gap: .5rem;
        }
        .filter-menu {
            display: none;
            position: absolute;
            top: 100%;
            background: var(--secondary);
            border-radius: 12px;
            padding: .8rem;
            min-width: 200px;
            max-height: 400px;
            overflow-y: auto;
            z-index: 1000;
            box-shadow: 0 2px 8px rgba(0,0,0,.15);
        }
        .filter-menu.active {
            display: block;
        }
        .menu-item {
            padding: .8rem;
            cursor: pointer;
            border-radius: 8px;
            transition: var(--transition);
        }
        .menu-item:hover {
            background: rgba(74,90,233,.1);
        }
        .menu-item.selected {
            background: var(--accent);
            color: #fff;
        }
        .search-container {
            position: relative;
            flex: 1;
            max-width: 400px;
        }
        .search-input {
            width: 250px;
            padding: 0.6rem 2.5rem 0.6rem 1rem;
            border: 2px solid var(--accent);
            border-radius: 20px;
            background: rgba(255,255,255,0.05);
            color: var(--text);
        }
        .search-btn {
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            color: var(--accent);
            cursor: pointer;
        }
        .main {
            max-width: 1400px;
            margin: 2rem auto;
            padding: 0 1rem;
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* مثل المفضلة */
            gap: 1.5rem;
        }
        .series-card {
            background: var(--secondary);
            border-radius: 12px; /* مثل المفضلة */
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            height: 100%; /* مثل المفضلة */
            display: flex;
            flex-direction: column;
        }
        .series-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.2);
        }
        .series-poster-wrapper {
            position: relative;
            overflow: hidden;
        }
        .series-poster {
            width: 100%;
            aspect-ratio: 2/3; /* مثل المفضلة */
            object-fit: cover;
            border-bottom: 3px solid var(--accent); /* مثل المفضلة */
            transition: transform 0.3s ease;
        }
        .series-card:hover .series-poster {
            transform: scale(1.05);
        }
        
        .watch-later-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,0.7);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
            transition: var(--transition);
        }

        .watch-later-btn:hover {
            background: var(--accent);
        }

        .watch-later-btn.active {
            background: var(--accent);
            color: white;
        }
        .series-info {
            padding: 1rem;
        }
        .series-title {
            font-size: 1rem;
            margin-bottom: 0.5rem;
        }
        .series-genres {
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem;
            margin-bottom: 0.5rem;
        }
        .genre-tag {
           background: var(--border);
            padding: 0.2rem 0.5rem;
            border-radius: 12px;
            font-size: 0.8rem;
        }
        .series-stats {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.5rem;
            font-size: 0.9rem;
            opacity: 0.8;
            margin-top: auto;
        }
        .series-stats span {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            background: var(--border);
            padding: 0.3rem;
            border-radius: 8px;
        }
        .favorite-btn {
            position: absolute;
            top: 10px;
            left: 10px;
            background: rgba(0,0,0,0.7);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
        }
        .favorite-btn.active {
            color: #ff4081;
        }
        .rating-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0,0,0,0.7);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1;
        }
        .loader {
            text-align: center;
            padding: 2rem;
            font-size: 1.5rem;
            display: none;
        }
        .error-msg {
            text-align: center;
            padding: 2rem;
            color: #ff4444;
            display: none;
        }
        .age-rating {
            position: absolute;
            top: 50px; 
            right: 10px; 
            background: rgba(0,0,0,0.8);
            color: white;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 0.8rem;
            z-index: 1;
            font-weight: 600;
            backdrop-filter: blur(4px);
        }
        .age-rating.mature {
            background: rgba(255,0,0,0.8);
        }
        @media (max-width: 768px) {
            .nav {
                display: grid;
                grid-template-rows: auto auto;
                gap: 1rem;
            }
            .nav > :first-child {
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 100%;
            }
            .controls {
                width: 100%;
                overflow-x: auto;
                justify-content: flex-start;
                padding: 0.5rem 0;
                border-top: 1px solid rgba(255,255,255,0.1);
            }
            .sidebar {
                width: 70%;
            }
            .main {
                grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
                gap: 1rem;
                padding: 0.5rem;
            }
            .series-card {
                font-size: 0.9rem;
            }
            .series-poster {
                aspect-ratio: 2/3; /* مثل المفضلة */
                height: auto; /* إزالة height الثابت */
            }
            .series-info {
                padding: 0.75rem;
            }
            .series-title {
                font-size: 0.9rem;
                margin-bottom: 0.3rem;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            .series-genres {
                gap: 0.2rem;
                margin-bottom: 0.5rem;
            }
            .genre-tag {
                padding: 0.1rem 0.3rem;
                font-size: 0.7rem;
            }
            .series-stats {
                font-size: 0.8rem;
                flex-wrap: wrap;
                gap: 0.3rem;
            }
            .series-stats span {
                flex: 1 1 40%;
                text-align: center;
            }
            .search-input {
                width: 180px;
                padding: 0.4rem 2rem 0.4rem 0.8rem;
            }
            .age-rating {
                font-size: 0.7rem;
                padding: 2px 6px;
                top: 50px; 
                right: 10px; 
            }
        }
        .darkreader darkreader--cors, .darkreader darkreader--sync { display: none; }
