html, body {
    cursor: url('https://www.rw-designer.com/cursor-download/155958/Normal%20Select.cur'), auto;
}

a, button, [role="button"], select, select option, .cursor-pointer, .plyr__control, .plyr__menu__label, .plyr__menu__container [role="menuitem"], .plyr__menu__container [role="menuitemradio"] {
    cursor: url('https://www.rw-designer.com/cursor-download/155975/Link%20Select%202.cur'), pointer !important;
}

input[type="text"], input[type="email"], input[type="password"], input[type="search"], textarea, [contenteditable="true"], .plyr__progress__container {
    cursor: url('https://www.rw-designer.com/cursor-download/155964/Text%20Select.cur'), text;
}

.is-loading, .wait, .plyr--loading::after {
    cursor: url('https://www.rw-designer.com/cursor-download/155961/Busy.ani'), wait;
}

@font-face {
    font-family: 'AmeerFont';
    src: url('../ameer.ttf') format('truetype');
}

:root {
    --accent: #ffffff;
    --accent-glow: rgba(255, 255, 255, 0.3);
    --bg-main: #000000;
    --bg-card: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a3a3a3;
    --nav-bg: rgba(0, 0, 0, 0.85);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'AmeerFont', 'Noto Sans Arabic', sans-serif;
}

*, ::after, ::before {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #606060;
}

::selection {
    background-color: #ffffff;
    color: #000000;
}

::-moz-selection {
    background-color: #ffffff;
    color: #000000;
}

/* Fix for selectable text in sliders/hero */
#carousel, .hero-content, .hero-slide, .hero-slide *, .movie-card, .movie-card * {
    user-select: text !important;
    -webkit-user-select: text !important;
}

.absolute.inset-0.bg-gradient-to-r, 
.absolute.inset-0.bg-gradient-to-t,
.hero-overlay,
.card-image-wrapper::after {
    pointer-events: none;
}

.bg-gray-900 {
  --tw-bg-opacity: 1;
  background-color: rgb(18 18 18);
}

.border-gray-800 {
  --tw-border-opacity: 1;
  border-color: rgb(58 58 58);
}

/* News Ticker */
.news-ticker-container {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 40;
}

.news-ticker-label {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    background: #ffffff;
    color: #000000;
    padding: 0 15px;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 0.8rem;
    z-index: 45;
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}

.news-ticker-content {
    display: inline-block;
    padding-right: 120px; /* Space for label */
    animation: ticker 30s linear infinite;
}

.news-ticker-item {
    display: inline-block;
    padding: 0 20px;
    color: #a3a3a3;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.3s;
}

.news-ticker-item:hover {
    color: #ffffff;
}

.news-ticker-item span {
    color: #ffffff;
    font-weight: 600;
    margin-right: 5px;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

.animate-spin-slow {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Global Loader Styles */
#global-loader {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#global-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-icon {
    width: 80px;
    height: 80px;
    border: 4px dashed #ffffff;
    border-radius: 50%;
    position: relative;
    animation: spin 4s linear infinite;
}

.loader-icon::after {
    content: '';
    position: absolute;
    inset: 15px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    opacity: 0.3;
}

.loader-text {
    margin-top: 20px;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}

.top-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #ffffff, #888888);
    z-index: 10000;
    width: 0%;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.95); }
}

/* TV Mode Styles */
body.tv-mode { background-color: #000; font-size: 1.2rem; }
body.tv-mode .max-w-7xl { max-width: 96% !important; }
body.tv-mode .grid { grid-template-cols: repeat(5, 1fr) !important; gap: 30px !important; }
@media (max-width: 1024px) { body.tv-mode .grid { grid-template-cols: repeat(3, 1fr) !important; } }
body.tv-mode h1, body.tv-mode h2 { font-size: 2.4rem !important; }
body.tv-mode .glass-nav { height: 90px !important; }
body.tv-mode .live-activity-bar { display: none !important; }

/* Live Activity Ticker Styles */
.live-activity-bar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 16px;
    z-index: 9998;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 380px;
    transform: translateY(120px);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.live-activity-bar.active {
    transform: translateY(0);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 1.5s infinite;
}

.activity-text {
    color: #e5e7eb;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

.activity-movie-title {
    color: #ffffff;
    font-weight: 900;
}

.activity-icon {
    font-size: 14px;
    color: #94a3b8;
}

body {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 40%);
    color: var(--text-primary);
    direction: rtl;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #666666;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Typography */
h1, h2, h3 {
    font-weight: normal;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent);
    text-shadow: 0 0 15px var(--accent-glow);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-container input {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 10px 40px 10px 15px;
    border-radius: 12px;
    color: white;
    outline: none;
    transition: var(--transition);
}

.search-container input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.2);
}

.search-container i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(5, 5, 5, 1) 0%, rgba(5, 5, 5, 0.8) 40%, rgba(5, 5, 5, 0) 100%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mask-image: linear-gradient(to left, black 60%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #000 !important;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--accent-glow);
    color: #000 !important;
}

.btn-secondary {
    background: var(--glass);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Movie Grid */
.main-content {
    padding: 60px 5%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    padding-right: 20px;
}

.section-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 30px;
    background: var(--accent);
    border-radius: 5px;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

.movie-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 18px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.movie-card:hover {
    transform: translateY(-15px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.movie-poster {
    width: 100%;
    aspect-ratio: 2/3;
    position: relative;
}

.movie-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.movie-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.rating-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 5px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ffd700;
    font-weight: bold;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Watch Page */
.player-container {
    padding-top: 100px;
    min-height: 100vh;
}

.video-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 40px;
    aspect-ratio: 16/9;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--glass-border);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.movie-details {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 50px;
    padding-bottom: 80px;
}

.details-poster {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
}

.details-poster img {
    width: 100%;
    display: block;
}

.details-info h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.details-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    color: var(--text-secondary);
}

.genre-list {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.genre-tag {
    background: var(--glass);
    padding: 6px 18px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    font-size: 0.9rem;
}

.description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 40px;
}

/* Episode Selector */
.episodes-section {
    margin-top: 50px;
}

.episode-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.episode-link {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 12px 25px;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: var(--transition);
}

.episode-link:hover,
.episode-link.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000 !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

/* Responsive */
@media (max-width: 1024px) {
    .movie-details {
        grid-template-columns: 1fr;
    }

    .details-poster {
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    header {
        height: 70px;
    }

    .nav-links {
        display: none;
    }

    .search-container {
        width: 180px;
    }

    .hero {
        height: 70vh;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 15px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    animation: fadeInUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}