:root {
    --yellow: #ffc107;
    --yellow-soft: #ffd95a;
    --yellow-muted: #f0b100;
    --dark: #040404;
    --dark-alt: #0f0f0f;
    --dark-card: #1a1a1f;
    --gray: #8e8e97;
    --gray-light: #b8b8c3;
    --white: #ffffff;
    --gradient-fire: linear-gradient(135deg, #181818 0%, #101010 40%, #2a1f10 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Keep scrollbar on the right even in RTL layouts */
html {
    direction: ltr;
    scrollbar-gutter: stable;
}

body {
    direction: rtl;
    font-family: 'Tajawal', 'Space Grotesk', sans-serif;
    background: var(--dark);
    color: var(--white);
    line-height: 1.6;
    min-height: 100vh;
}

/* Minimal dark scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #2b2b2b transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background-color: #2b2b2b;
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: #3a3a3a;
}

a {
    color: inherit;
    text-decoration: none;
}

.texture-layer {
    position: fixed;
    inset: 0;
    background: #0a0a0a;
    pointer-events: none;
    z-index: 0;
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
}

/* Apply padding to content sections, not the full-bleed hero */
.app-shell .content-rail,
.app-shell .promo-bar,
.app-shell footer {
    padding-inline: clamp(1.5rem, 5vw, 4rem);
    max-width: 1400px;
    margin-inline: auto;
}

.ilmuk-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    padding: 0.2rem 0;
    background: #000;
    backdrop-filter: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 5;
}

/* Ilmuk transparent overlay header */
.ilmuk-overlay-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 0.6rem clamp(2rem, 5vw, 5rem);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    backdrop-filter: none;
    border-bottom: none;
    z-index: 100;
    grid-template-columns: auto 1fr auto;
    box-sizing: border-box;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

/* Scrolled state for header */
.ilmuk-header.scrolled {
    background: #000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    padding: 0.2rem clamp(2rem, 5vw, 5rem);
}

.menu-button {
    display: none;
}

.menu-button span {
    display: block;
    width: 1.75rem;
    height: 2px;
    background: var(--white);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.brand-mark img {
    width: 55px;
    height: 55px;
}

.brand-mark div {
    text-align: right;
}

/* Stacked logo layout: SVG with text underneath */
.brand-logo-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.brand-logo-stack img {
    width: 74px;
    height: 74px;
}

.brand-logo-stack strong {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--yellow);
    font-weight: 700;
}

.ilmuk-overlay-header .brand-mark div {
    text-align: right;
}

.brand-mark .eyebrow {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: var(--gray);
}

.primary-nav {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    font-weight: 600;
    font-size: 0.9rem;
    align-items: center;
}

.primary-nav a {
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    color: var(--gray-light);
}

.primary-nav a.active,
.primary-nav a:hover {
    color: var(--white);
}

.header-search-wrapper {
    display: flex;
    align-items: center;
    margin-inline: 0.288rem;
}

.nav-search-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-search-btn:hover {
    color: var(--yellow);
    transform: scale(1.05);
}

/* User Menu - consistent across all pages */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 0;
    margin-left: 0;
    justify-self: end;
}

.header-right-actions .user-menu {
    order: 3;
}

.header-right-actions .primary-nav {
    order: 2;
}

.header-right-actions .header-search-wrapper {
    order: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: auto;
    margin-left: 0;
}

.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.header-search-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--yellow);
}

/* Fullscreen Search Overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.search-overlay-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0) 60%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0) 60%),
        radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0) 60%),
        repeating-radial-gradient(circle at 0 0, rgba(255, 255, 255, 0.04) 0 1px, rgba(255, 255, 255, 0) 1px 2px);
    opacity: 0.45;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.search-overlay-content {
    position: absolute;
    max-width: 1000px;
    width: 90%;
    left: 50%;
    top: 32%;
    transform: translateX(-50%);
    padding: 2rem;
    z-index: 1;
}

.search-overlay-close {
    display: none;
}

.search-overlay-close:hover {
    opacity: 1;
}

.search-overlay-input-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-overlay-input {
    width: 100%;
    padding: 16px 50px 16px 16px;
    background: #1a1a1a;
    border: 2px solid #333;
    border-radius: 10px;
    color: var(--yellow);
    font-size: 1.2rem;
    font-family: inherit;
    direction: rtl;
    text-align: right;
}

.search-overlay-input:focus {
    outline: none;
    border-color: var(--yellow);
}

.search-overlay-input::placeholder {
    color: #555;
}

.search-overlay-icon {
    position: absolute;
    right: 20px;
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    font-size: 1.3rem;
}

.search-overlay-results {
    max-height: calc(100vh - 200px);
    overflow-y: scroll;
    margin-top: 1rem;
    padding-bottom: 50vh;
    direction: rtl;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.search-overlay-results::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Fixed fade to darkness at bottom of search overlay */
.search-overlay.has-more::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 220px;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 15%,
        rgba(0, 0, 0, 0.7) 40%,
        rgba(0, 0, 0, 0.95) 70%,
        rgba(0, 0, 0, 1) 100%
    );
    pointer-events: none;
    z-index: 999999;
}

.search-results-section {
    margin-bottom: 2rem;
}

.search-results-title {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    direction: rtl;
    text-align: right;
}

.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    direction: rtl;
}

.search-result-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 24px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
    transition: background 0.15s ease;
    direction: rtl;
}

.search-result-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

.search-result-thumb {
    width: 200px;
    height: 112px;
    border-radius: 6px;
    overflow: hidden;
    flex: 0 0 auto;
    position: relative;
}

.search-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-badge {
    display: none;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    direction: rtl;
    text-align: right;
}

.search-result-info h4 {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.35;
}

.search-result-info p {
    color: rgba(255, 255, 255, 0.55);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.search-result-meta span {
    display: inline-flex;
    align-items: center;
}

.search-meta-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.search-overlay-loading,
.search-overlay-empty {
    text-align: center;
    color: #666;
    padding: 3rem;
    font-size: 1.1rem;
}

.search-overlay-open {
    overflow: hidden;
}

.user-menu {
    position: relative;
}

.user-name-btn {
    background: none;
    border: none;
    color: var(--yellow);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    transition: all 0.2s;
    font-family: inherit;
}

.user-name-btn:hover {
    opacity: 0.8;
}

/* Change name modal input - match username font but lighter weight */
#newDisplayName {
    font-family: 'Tajawal', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    color: #FFD400 !important;
}

/* Change name modal autofill styling */
#newDisplayName:-webkit-autofill,
#newDisplayName:-webkit-autofill:hover,
#newDisplayName:-webkit-autofill:focus,
#newDisplayName:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #222 inset !important;
    -webkit-text-fill-color: #FFD400 !important;
    box-shadow: 0 0 0 1000px #222 inset !important;
    caret-color: #FFD400 !important;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: #1a1a1a;
    border: 1px solid rgba(255,212,0,0.08);
    border-radius: 12px;
    min-width: 280px;
    max-width: 340px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
    z-index: 200;
    overflow: hidden;
}

.user-dropdown.invite-open {
    min-width: 340px;
    max-width: 380px;
}

.user-menu.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-item {
    display: block;
    padding: 12px 16px;
    color: #ddd;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    font-size: 0.9rem;
    font-family: inherit;
}

/* Center standard dropdown items (name change, logout) */
.user-dropdown-item:not(.invitation) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.user-dropdown-item:not(.invitation) i {
    margin-left: 0;
    margin-right: 0;
}

.user-dropdown-item:hover {
    background: #333;
    color: #fff;
}

.user-dropdown-item i {
    margin-left: 8px;
}

.user-dropdown-item.logout {
    color: #dc3545;
}

.user-dropdown-item.logout:hover {
    background: #dc354522;
}

/* Admin Invitation Notification Badge */
.user-name-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.notification-badge {
    position: relative;
    top: auto;
    left: auto;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    background: var(--yellow);
    color: var(--dark);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 212, 0, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(255, 212, 0, 0);
    }
}

/* Admin Invitation Item in Dropdown */
.user-dropdown-item.invitation {
    background: linear-gradient(135deg, #141414 0%, #1b1b1b 100%);
    border: 1px solid rgba(255, 212, 0, 0.35);
    border-radius: 12px;
    margin: 0;
    padding: 16px 18px 18px;
    color: #FFD400;
    display: flex;
    flex-direction: column;
    gap: 12px;
    white-space: normal;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    text-align: right;
}

.user-dropdown-item.invitation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #FFD400 0%, rgba(255, 212, 0, 0.35) 100%);
}

.user-dropdown-item.invitation:hover {
    background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
    border-color: rgba(255, 212, 0, 0.55);
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.invitation-title {
    font-weight: 700;
    font-size: 16px;
    color: #FFD400;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.3px;
}

.invitation-title::before {
    content: none;
}

.invitation-desc {
    font-size: 13px;
    color: #c3c3c3;
    white-space: normal;
    line-height: 1.7;
}

.invitation-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.invitation-btn {
    flex: 1;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
}

.invitation-btn.accept {
    background: #FFD400;
    color: #121212;
    box-shadow: 0 6px 14px rgba(255, 212, 0, 0.35);
}

.invitation-btn.accept:hover {
    background: #FFDE33;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(255, 212, 0, 0.45);
}

.invitation-btn.accept:active {
    transform: translateY(0);
}

.invitation-btn.reject {
    background: #1a1a1a;
    border: 1px solid rgba(255, 212, 0, 0.25);
    color: #FFD400;
}

.invitation-btn.reject:hover {
    background: #222;
    border-color: rgba(255, 212, 0, 0.55);
    color: #FFDE33;
}

/* Complaint notification badge & items */
.user-notif-badge {
    display: inline-block;
    background: #FFD400;
    color: #000;
    font-size: 10px;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
.user-notif-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    background: rgba(255, 212, 0, 0.07);
    border-right: 3px solid #FFD400;
    border-bottom: 1px solid rgba(255, 212, 0, 0.12);
    font-size: 12.5px;
    color: #e0e0e0;
    direction: rtl;
}
.user-notif-item span {
    flex: 1;
    line-height: 1.6;
}
.notif-dismiss-btn {
    background: none;
    border: none;
    color: rgba(255, 212, 0, 0.5);
    font-size: 16px;
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.notif-dismiss-btn:hover {
    color: #FFD400;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    grid-column: 2;
}

.cta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 999px;
    padding: 0.5rem 1.5rem;
    color: var(--yellow);
    font-weight: 600;
    cursor: pointer;
}

.cta-pill.dark {
    background: var(--yellow);
    color: var(--dark);
}

.profile-chip {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--dark);
    display: grid;
    place-items: center;
    font-weight: 700;
}

/* ==========================
   FULLSCREEN NETFLIX HERO
   ========================== */
.hero-fullscreen {
    position: relative;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.hero-fullscreen .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    z-index: 0;
}

.hero-fullscreen .hero-gradient {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        /* Right side fade for RTL text */
        linear-gradient(270deg, rgba(4, 4, 4, 0.9) 0%, rgba(4, 4, 4, 0.7) 20%, rgba(4, 4, 4, 0.3) 40%, transparent 60%),
        /* Bottom gradient */
        linear-gradient(180deg, transparent 50%, rgba(4, 4, 4, 0.6) 75%, rgba(4, 4, 4, 0.95) 90%, rgba(4, 4, 4, 1) 100%),
        /* Top vignette for header */
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 15%);
}

.hero-fullscreen .hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    padding-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
}

.hero-fullscreen .hero-info {
    max-width: 520px;
    text-align: right;
    direction: rtl;
}

.hero-fullscreen .hero-eyebrow {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--yellow);
    margin-bottom: 0.5rem;
}

.hero-fullscreen .hero-title-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hero-fullscreen .hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-fullscreen .hero-salawat {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: var(--yellow);
    font-family: 'Traditional Arabic', 'Tajawal', serif;
    text-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
}

.hero-fullscreen .hero-hd-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
}

.hero-fullscreen .hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-light);
    margin: 0.5rem 0 0.25rem 0;
}

.hero-fullscreen .hero-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-light);
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hero-fullscreen .hero-synopsis {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #e5e5e5;
    margin: 0 0 1.25rem 0;
    max-width: 460px;
}

.hero-fullscreen .hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hero-fullscreen .hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}

.hero-fullscreen .hero-btn-primary:hover {
    transform: scale(1.03);
}

.hero-fullscreen .hero-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}

.hero-fullscreen .hero-btn-outline:hover {
    transform: scale(1.03);
}

.hero-fullscreen .hero-series-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--yellow);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.hero-fullscreen .hero-logo-mini {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(75%) sepia(85%) saturate(500%) hue-rotate(5deg);
}

.hero-fullscreen .hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.hero-fullscreen .hero-meta-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--gray-light);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.hero-fullscreen .hero-meta-row .dot {
    color: var(--gray);
    font-size: 0.5rem;
}

.hero-fullscreen .hero-meta-row .age-badge {
    background: rgba(255, 193, 7, 0.2);
    color: var(--yellow);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.hero-fullscreen .hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-fullscreen .hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    border: none;
}

.hero-fullscreen .hero-btn:hover {
    transform: scale(1.03);
}

.hero-fullscreen .hero-btn-play {
    background: var(--yellow);
    color: var(--dark);
}

.hero-fullscreen .hero-btn-play:hover {
    background: var(--yellow-soft);
}

.hero-fullscreen .hero-btn-info {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    backdrop-filter: blur(4px);
}

.hero-fullscreen .hero-btn-info:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Decorative large title at bottom for fullscreen hero */
.hero-fullscreen .ilmuk-hero-title-deco {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    height: auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
}

.hero-fullscreen .deco-title {
    display: block;
    font-size: clamp(5rem, 14vw, 14rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(0, 80, 60, 0.5);
    line-height: 0.85;
    white-space: nowrap;
    transform: translateY(20%);
    font-family: 'Tajawal', sans-serif;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, rgba(0, 100, 70, 0.25) 0%, rgba(0, 80, 60, 0.15) 50%, transparent 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Continue watching peek section */
.hero-fullscreen .hero-peek-section {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    padding-bottom: 1rem;
    /* Show just the top part of the thumbnails */
}

.hero-fullscreen .peek-header {
    margin-bottom: 0.5rem;
}

.hero-fullscreen .peek-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.hero-fullscreen .peek-rail-wrapper {
    position: relative;
}

.hero-fullscreen .peek-rail-wrapper .rail-track {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
}

.hero-fullscreen .peek-rail-wrapper .rail-track .content-card {
    flex: 0 0 auto;
    width: clamp(220px, 20vw, 280px);
    scroll-snap-align: start;
}

/* Hide part of the thumbnails to create "peeking" effect */
.hero-fullscreen .peek-rail-wrapper .rail-track .content-card .card-poster {
    aspect-ratio: 16 / 9;
}

/* Continue watching peek section within fullscreen hero */
.hero-fullscreen .hero-peek-section .rail-track {
    display: flex;
    gap: 1rem;
    padding: 0;
}

.hero-fullscreen .hero-peek-section .continue-card {
    min-width: 240px;
    max-width: 240px;
}

.hero-fullscreen .hero-peek-section .continue-thumb {
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .hero-fullscreen {
        height: 85vh;
        min-height: 550px;
    }
    
    .hero-fullscreen .hero-gradient {
        background:
            linear-gradient(180deg, transparent 20%, rgba(4, 4, 4, 0.6) 50%, rgba(4, 4, 4, 0.95) 80%, rgba(4, 4, 4, 1) 100%),
            linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 15%);
    }
    
    .hero-fullscreen .hero-info {
        max-width: 100%;
    }
    
    .hero-fullscreen .hero-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .hero-fullscreen .hero-peek-section .continue-card {
        min-width: 200px;
        max-width: 200px;
    }
}

/* ==========================
   OLD HERO STYLES (BACKUP)
   ========================== */
.hero-banner {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: minmax(320px, 40%) 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* Home hero redesign (Netflix-style wide card) */
.hero-banner.hero-banner--netflix {
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    border-radius: 0;
    padding: clamp(6rem, 10vw, 8rem) clamp(1rem, 4vw, 4rem) clamp(4rem, 8vw, 6rem);
    margin-top: 0;
    background: var(--dark);
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-banner.hero-banner--netflix .hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.55;
    filter: saturate(1.1) blur(40px);
    transform: scale(1.25);
    pointer-events: none;
}

.hero-banner.hero-banner--netflix::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(255, 193, 7, 0.08) 0%, rgba(4, 4, 4, 0) 50%),
        linear-gradient(180deg, rgba(4, 4, 4, 0.65) 0%, rgba(4, 4, 4, 0.4) 40%, rgba(4, 4, 4, 0.7) 100%);
    pointer-events: none;
}

.hero-banner.hero-banner--netflix::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: clamp(100px, 16vh, 180px);
    background: linear-gradient(180deg, rgba(4, 4, 4, 0) 0%, rgba(4, 4, 4, 0.92) 55%, rgba(4, 4, 4, 1) 100%);
    pointer-events: none;
}

/* The wide card */
.hero-banner.hero-banner--netflix .hero-card {
    position: relative;
    z-index: 1;
    width: min(1600px, 96%);
    aspect-ratio: 2.76 / 1;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-banner.hero-banner--netflix .hero-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

.hero-banner.hero-banner--netflix .hero-card-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(4, 4, 4, 0.82) 0%, rgba(4, 4, 4, 0.25) 45%, rgba(4, 4, 4, 0.65) 100%),
        linear-gradient(180deg, rgba(4, 4, 4, 0.15) 0%, rgba(4, 4, 4, 0.7) 100%);
}

.hero-banner.hero-banner--netflix .hero-card-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: clamp(1.25rem, 3vw, 2.5rem);
}

.hero-banner.hero-banner--netflix .hero-card-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-banner.hero-banner--netflix .hero-series-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--yellow);
}

.hero-banner.hero-banner--netflix .hero-series-badge i {
    font-size: 1rem;
}

.hero-banner.hero-banner--netflix .hero-card-left h1 {
    font-size: clamp(1.8rem, 4.5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    margin: 0;
    line-height: 1.15;
}

.hero-banner.hero-banner--netflix .hero-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0;
    list-style: none;
    font-size: 0.9rem;
    color: var(--gray-light);
}

.hero-banner.hero-banner--netflix .hero-meta-row li {
    display: flex;
    align-items: center;
}

.hero-banner.hero-banner--netflix .hero-meta-row li:not(:last-child)::after {
    content: '·';
    margin: 0 0.55rem;
    color: var(--gray);
}

.hero-banner.hero-banner--netflix .hero-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.hero-banner.hero-banner--netflix .hero-play-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
}

.hero-banner.hero-banner--netflix .hero-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5);
}

.hero-banner.hero-banner--netflix .hero-play-btn i {
    color: var(--dark);
    font-size: 1.2rem;
    margin-left: 3px;
}

.hero-banner.hero-banner--netflix .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(4, 4, 4, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--white);
}

.hero-banner.hero-banner--netflix .hero-badge i {
    color: var(--yellow);
    font-size: 0.85rem;
}

/* Netflix hero responsive */
@media (max-width: 800px) {
    .hero-banner.hero-banner--netflix .hero-card {
        width: 96%;
        aspect-ratio: 1.9 / 1;
    }

    .hero-banner.hero-banner--netflix .hero-card-content {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 1rem;
    }

    .hero-banner.hero-banner--netflix .hero-card-right {
        flex-direction: row-reverse;
        align-items: center;
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 540px) {
    .hero-banner.hero-banner--netflix .hero-card {
        aspect-ratio: 1.5 / 1;
        border-radius: 16px;
    }

    .hero-banner.hero-banner--netflix .hero-card-left h1 {
        font-size: 1.6rem;
    }

    .hero-banner.hero-banner--netflix .hero-meta-row {
        font-size: 0.8rem;
    }

    .hero-banner.hero-banner--netflix .hero-play-btn {
        width: 48px;
        height: 48px;
    }
}

/* Keep old dribbble styles but not used now */

.hero-banner.hero-banner--dribbble .hero-badge {
    background: rgba(4, 4, 4, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-banner.hero-banner--dribbble .hero-content h1 {
    font-size: clamp(2.3rem, 5.2vw, 4.4rem);
    letter-spacing: 0.02em;
}

.hero-banner.hero-banner--dribbble .hero-copy {
    max-width: 62ch;
}

.hero-media {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45);
}

.hero-media img {
    width: 100%;
    display: block;
    height: 100%;
    object-fit: cover;
}

.hero-media .hero-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(252, 190, 17, 0.95);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.hero-media .hero-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.hero-media .hero-play-btn i {
    color: var(--dark);
    font-size: 1.5rem;
    margin-left: 4px;
}

.media-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero-badge {
    /* Removed absolute positioning - badge now stays inline in hero-meta */
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
}

.hero-logo {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    width: 60px;
}

.hero-content h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

.hero-copy {
    color: var(--gray-light);
    margin-bottom: 0.75rem;
}

.hero-host {
    color: var(--yellow);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-stats span {
    font-size: 1.25rem;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 16px;
    padding: 0.85rem 1.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.primary-action {
    background: var(--yellow);
    color: var(--dark);
}

.secondary-action {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
}

.notification-banner {
    margin: 2.5rem 0;
    padding: 1.75rem;
    border-radius: 24px;
    background: rgba(26, 26, 31, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-rail {
    margin-bottom: 3rem;
}

.rail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rail-eyebrow {
    color: var(--yellow);
    letter-spacing: 0.2em;
    font-size: 0.8rem;
}

.rail-controls {
    display: flex;
    gap: 0.5rem;
}

.rail-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    cursor: pointer;
}

.rail-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.rail-track.inline {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 1rem;
    padding-top: 0.5rem;
}

.content-rail .rail-track.inline {
    padding-top: 0;
    margin-top: -8px;
}

.rail-track.inline .episode-card {
    min-width: 220px;
}

.mobile-show-rail {
    display: none;
    gap: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.mobile-show-card {
    position: relative;
    min-width: 150px;
    height: 120px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.mobile-show-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.85) 100%);
}

.mobile-show-info {
    position: absolute;
    inset-inline: 0.75rem;
    bottom: 0.65rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.mobile-show-info p {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--gray-light);
}

.mobile-show-info h3 {
    font-size: 0.95rem;
    line-height: 1.2;
}

/* =========================
   Mobile Show Hero
   ========================= */
.mobile-show-hero {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem 2rem;
}

.mobile-hero-poster {
    position: relative;
    width: 100%;
    max-width: 320px;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.mobile-hero-poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4,4,4,0) 50%, rgba(4,4,4,0.95) 100%),
                radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(4,4,4,0.85) 100%);
    pointer-events: none;
}

.mobile-hero-poster img {
    width: 100%;
    display: block;
}

.mobile-hero-meta {
    margin-top: -3rem;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.mobile-hero-meta h1 {
    font-size: 1.75rem;
    margin: 0;
}

.mobile-hero-tags {
    display: flex;
    gap: 0.5rem;
}

.mobile-hero-tags span {
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.75rem;
}

.mobile-hero-actions {
    display: flex;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.icon-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    color: var(--gray-light);
    cursor: pointer;
}

.icon-action i {
    font-size: 1.3rem;
}

.icon-action small {
    font-size: 0.65rem;
}

.mobile-hero-actions .primary-action {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.mobile-hero-actions .primary-action i {
    font-size: 1.1rem;
}

.mobile-hero-info {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray-light);
}

.mobile-hero-info .rating {
    color: #46d369;
    font-weight: 600;
}

.mobile-hero-info .badge {
    padding: 0 0.4rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    font-size: 0.75rem;
}

.mobile-hero-desc {
    font-size: 0.9rem;
    color: var(--gray-light);
    line-height: 1.5;
    max-width: 340px;
}

/* Continue Watching Cards */
.continue-watching-section {
    display: none;
}

.continue-card {
    position: relative;
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    transition: none;
}

.continue-card:hover {
    transform: none;
    z-index: auto;
}

.continue-card:hover .continue-thumb {
    box-shadow: none;
}

.continue-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.continue-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

.continue-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: none;
    z-index: 2;
}

.continue-card:hover .continue-play {
    opacity: 1;
}

.continue-play i {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark);
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.continue-thumb .watch-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 3;
    border-radius: 0;
}

.continue-thumb .watch-progress-bar {
    height: 100%;
    background: var(--yellow);
    transition: width 0.3s ease;
    border-radius: 0;
}

.continue-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0 0.25rem;
}

.continue-episode {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-light);
    letter-spacing: 0.05em;
}

/* Rail scroll arrows */
.rail-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.rail-wrapper .rail-track.inline {
    flex: 1;
    margin: 0 50px;
}

.rail-track.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.rail-track.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.rail-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

.rail-arrow.rail-arrow-right {
    right: 0;
}

.rail-arrow.rail-arrow-left {
    left: 0;
}

.rail-arrow:hover {
    transform: translateY(-50%) scale(1.15);
    color: var(--white);
}

.rail-arrow i {
    font-size: 1.5rem;
}

@media (hover: hover) {
    .rail-wrapper:hover .rail-arrow {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (hover: none) {
    .rail-arrow {
        opacity: 1;
        pointer-events: auto;
    }
}

.episode-card {
    position: relative;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: none;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    overflow: visible;
}

/* Episode card hover effect - DISABLED for static cards */
.episode-card:hover {
    /* No animation - keep static */
}

.episode-card:hover .episode-thumb {
    /* No animation - keep static */
}

/* Disable hover for episodes-list items */
.episodes-list .episode-card:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.06);
}

/* Episode under repair styling */
.episode-under-repair {
    pointer-events: auto;
    cursor: default !important;
}
.episode-under-repair .episode-info {
    opacity: 0.5;
}
.episode-under-repair .episode-thumb {
    position: relative;
}
.episode-under-repair .episode-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}
.episode-under-repair .episode-play {
    display: none;
}
.repair-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: bold;
    font-family: 'Tajwal', 'Tajawal', sans-serif;
    color: #ffc107 !important;
    white-space: nowrap;
    z-index: 4;
    pointer-events: none;
}

.episode-thumb {
    position: relative;
    border-radius: 14px;
    height: 180px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    transition: none;
}

/* Notes count badge */
.notes-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--yellow);
    color: #141414;
    font-size: 0.61rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.episode-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%);
    opacity: 0;
    transition: none;
    border-radius: inherit;
    z-index: 1;
}

.episode-card:hover .episode-thumb::after {
    opacity: 1;
}

/* Watch progress indicator */
.watch-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(80, 80, 80, 0.8);
    border-radius: 0;
    direction: ltr;
    z-index: 2;
}

.watch-progress-bar {
    height: 100%;
    background: var(--yellow);
    border-radius: 0;
    transition: width 0.3s ease;
}

.episode-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: var(--yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.episode-card:hover .episode-play {
    opacity: 1;
}

.episode-play i {
    color: var(--dark);
    font-size: 1rem;
    margin-left: 3px;
}

/* For list layout, position play inside the thumbnail */
.episodes-list .episode-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
}

.episodes-list .episode-play {
    position: static;
    transform: none;
}

.episode-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.episode-number {
    color: var(--yellow);
    font-weight: 700;
    font-size: 0.9rem;
}

.episode-duration {
    color: var(--gray-light);
}

.tile {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tile-card {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    min-height: 260px;
}

.tile-thumb {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.85);
    transition: none;
}

.tile-card:hover .tile-thumb {
    transform: none;
}

.tile-overlay {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.tile-eyebrow {
    color: var(--yellow-soft);
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
}

.kid-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.kid-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: none;
}

.kid-card:hover {
    transform: none;
    box-shadow: none;
}

.kid-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.kid-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.kid-card:hover .kid-card-thumb img {
    transform: none;
}

.kid-card-episodes {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.kid-card-info {
    padding: 1rem 1.25rem 1.25rem;
}

.kid-card-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #fff;
}

.kid-card-info p {
    font-size: 0.85rem;
    color: var(--gray-light);
    line-height: 1.4;
}

.see-all {
    color: var(--gray-light);
    font-weight: 600;
}

.cta-panel {
    margin: 4rem 0;
    padding: 2.5rem;
    border-radius: 28px;
    background: var(--gradient-fire);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cta-eyebrow {
    letter-spacing: 0.15em;
    color: var(--yellow);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.ilmuk-footer {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 2rem 1rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: left;
}

.ilmuk-footer p {
    font-weight: 300;
}

.footer-links a {
    margin-inline-start: 1rem;
}

/* Series detail page */
.series-page .series-shell {
    max-width: 1400px;
}

/* =========================
   Ilmuk Full Hero
   ========================= */
.ilmuk-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: 0;
    padding-left: clamp(1rem, 5vw, 4rem);
    padding-right: clamp(1rem, 5vw, 4rem);
    margin-bottom: 0;
}

.ilmuk-hero-bg {
    position: absolute;
    inset: 0;
}

.ilmuk-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}
.ilmuk-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    pointer-events: none;
}

.ilmuk-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(270deg, rgba(4, 4, 4, 0.92) 0%, rgba(4, 4, 4, 0.7) 20%, rgba(4, 4, 4, 0.3) 45%, transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 15%, transparent 75%, rgba(4, 4, 4, 0.85) 95%, rgba(4, 4, 4, 1) 100%);
    pointer-events: none;
}

.ilmuk-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin-left: auto;
    margin-right: 0;
    padding: 0 clamp(2rem, 5vw, 5rem) 0 0;
    text-align: right;
    direction: rtl;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-eyebrow {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--yellow);
    margin-bottom: 0.5rem;
    text-align: right;
}

.hero-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}

.hero-title {
    font-size: clamp(2.42rem, 5.5vw, 3.85rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    text-align: right;
    white-space: nowrap;
}

.hero-salawat {
    font-size: clamp(2.2rem, 4.4vw, 3.3rem);
    color: var(--yellow);
    font-family: 'Traditional Arabic', 'Tajawal', serif;
    text-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
}

.hero-hd-badge {
    font-size: 0.715rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
}

.hero-subtitle {
    font-size: 1.265rem;
    color: var(--gray-light);
    margin: 0.75rem 0 0.5rem 0;
    text-align: right;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.99rem;
    color: var(--gray-light);
    margin-bottom: 1rem;
}

.hero-dot {
    font-size: 0.55rem;
    opacity: 0.6;
}

.hero-match {
    color: #46d369;
    font-weight: 600;
}

.hero-badge {
    padding: 0.15rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    font-size: 0.825rem;
}

.hero-synopsis {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #e5e5e5;
    margin: 0 0 1.5rem 0;
    max-width: 700px;
    text-align: right;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* NOTE: Main .hero-buttons rule is in the Hero buttons container section below */

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.hero-btn-primary:hover {
    transform: scale(1.03);
}

.hero-btn-primary i {
    font-size: 0.9rem;
}

.hero-btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.hero-btn-outline:hover {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.hero-btn-outline i {
    font-size: 0.85rem;
}

/* Netflix-style hero buttons */
.hero-btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    height: 50px;
    min-width: 190px;
    padding: 0 1.8rem;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
    text-decoration: none;
    box-shadow: none;
    letter-spacing: 0.01em;
}

.hero-btn-play:hover {
    background: var(--yellow-soft);
    transform: scale(1.04);
    box-shadow: none;
}

.hero-btn-play:active {
    transform: scale(0.97);
}

.hero-btn-play i {
    font-size: 0.95rem;
}

.hero-btn-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    height: 50px;
    min-width: 190px;
    padding: 0 1.8rem;
    background: rgba(120, 120, 122, 0.55);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.hero-btn-info:hover {
    background: rgba(120, 120, 122, 0.75);
    transform: scale(1.04);
}

.hero-btn-info:active {
    transform: scale(0.97);
}

.hero-btn-info i {
    font-size: 1rem;
    opacity: 0.9;
}

.hero-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(42, 42, 42, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.hero-btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    transform: scale(1.1);
}

.hero-btn-icon i {
    font-size: 1.1rem;
}

.hero-btn-icon.active {
    background: var(--white);
    border-color: var(--white);
    color: #141414;
}

.hero-btn-icon.active i {
    color: #141414;
}

/* =========================
   Netflix-style Show Modal
   ========================= */
.show-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.show-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.show-modal {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: #181818;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.show-modal-overlay.active .show-modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #181818;
    border: none;
    color: var(--white);
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #282828;
}

.modal-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-video-container {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000;
}

.modal-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.modal-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, #181818 100%);
    z-index: 2;
}

.modal-hero-content {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    left: 2rem;
    text-align: right;
    direction: rtl;
    z-index: 3;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-tagline {
    font-size: 1.1rem;
    color: var(--gray-light);
    margin: 0 0 1rem 0;
}

.modal-buttons {
    display: flex;
    gap: 7px;
    justify-content: flex-start;
}

.modal-buttons .modal-btn-play,
.modal-buttons .modal-btn-restart,
.modal-buttons .modal-continue-btn {
    margin-right: 8px;
}

.modal-btn-play {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.75rem;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.modal-btn-play:hover {
    background: #e6b800;
}

/* Continue watching yellow buttons */
.modal-btn-continue,
.modal-continue-btn {
    background: var(--accent);
    color: var(--dark);
}

.modal-btn-continue:hover,
.modal-continue-btn:hover {
    background: #e6b800;
}

.modal-btn-restart {
    background: #141414;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.modal-btn-restart:hover {
    background: #1f1f1f;
}

.modal-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(42, 42, 42, 0.6);
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
}

.modal-btn-icon:hover {
    border-color: var(--white);
    background: rgba(42, 42, 42, 0.9);
}

.modal-mute-btn {
    position: absolute;
    bottom: 2rem;
    left: 2rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: var(--white);
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 3;
}

.modal-body {
    padding: 1.5rem 2rem 2rem;
    direction: rtl;
    text-align: right;
}

.modal-info-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    margin-bottom: 2rem;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.modal-match {
    color: #46d369;
    font-weight: 600;
}

.modal-badge {
    padding: 0.1rem 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    font-size: 0.7rem;
}

.modal-age {
    padding: 0.1rem 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    font-size: 0.75rem;
}

.modal-synopsis {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #d2d2d2;
    margin: 0;
}

.modal-info-side {
    font-size: 0.85rem;
    color: var(--gray-light);
    min-width: 180px;
}

.modal-info-side p {
    margin: 0 0 0.5rem 0;
}

.modal-label {
    color: #777;
}

.modal-episodes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.modal-episodes-header h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    border-bottom: 1.5px solid #aaa;
    display: inline-block;
    padding-bottom: 4px;
}

.modal-episodes h3 {
    font-size: 1.3rem;
    margin-bottom: 6px;
    border-bottom: 1.5px solid #aaa;
    display: inline-block;
    padding-bottom: 4px;
}

.modal-episodes {
    margin-top: 1.5rem;
}

.modal-season-dropdown {
    padding: 0.4rem 1.5rem 0.4rem 0.75rem;
    font-size: 0.9rem;
    min-width: 100px;
}

.modal-episode-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-episode {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #2f2f2f;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.modal-episode:hover {
    background: #3f3f3f;
}

.modal-episode .ep-num {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray);
    min-width: 30px;
    text-align: center;
}

.ep-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.modal-episode .ep-thumb {
    width: 130px;
    height: 73px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    display: block;
}

.ep-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 34px;
    height: 34px;
    background: #FFD400;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.modal-episode:hover .ep-play-btn {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.ep-play-btn i {
    color: #141414;
    font-size: 0.7rem;
    margin-left: 2px;
}

.modal-episode .ep-info {
    flex: 1;
}

.modal-episode .ep-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.modal-episode .ep-info p {
    font-size: 0.85rem;
    color: #999;
    margin: 0.5rem 0 0 0;
    line-height: 1.4;
}

.modal-episode .ep-duration {
    font-size: 0.8rem;
    color: var(--gray);
    display: block;
    margin-top: 0.5rem;
}

.modal-see-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--white);
    font-weight: 600;
    text-decoration: none;
}

.modal-see-all:hover {
    text-decoration: underline;
}

/* Toggle Episodes Button */
.modal-toggle-episodes {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    background: linear-gradient(to bottom, transparent, rgba(24, 24, 24, 0.9));
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-toggle-episodes:hover {
    color: var(--accent);
}

.modal-toggle-episodes i {
    transition: transform 0.3s ease;
}

/* Modal responsive */
@media (max-width: 768px) {
    .show-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    
    .show-modal {
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-info-row {
        grid-template-columns: 1fr;
    }
    
    .modal-title {
        font-size: 1.75rem;
    }
    
    .modal-episode .ep-thumb {
        width: 100px;
        height: 56px;
    }
}

/* =========================
   Netflix-style Show Cards
   ========================= */
.show-card {
    position: relative;
    flex: 0 0 auto;
    width: clamp(200px, 18vw, 280px);
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: visible;
    cursor: pointer;
    transition: none;
}

.show-card:hover {
    transform: none;
    z-index: inherit;
    transition: none;
}

.show-card-thumb {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    transition: none;
    overflow: hidden;
}

/* The hover preview card */
.show-card-preview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 380px;
    min-height: 280px;
    background: #181818;
    border-radius: 8px;
    box-shadow: 0 14px 50px rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: none;
    z-index: 10;
    overflow: hidden;
}

@media (min-width: 1400px) {
    .show-card-preview {
        width: 420px;
    }
}

@media (min-width: 1800px) {
    .show-card-preview {
        width: 450px;
    }
}

.show-card:hover .show-card-preview {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.9);
    transition: none;
}

.show-card:hover .show-card-thumb {
    opacity: 1;
    transition: none;
}

.preview-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.preview-video-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.preview-mute-btn {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: border-color 0.2s;
}

.preview-mute-btn:hover {
    border-color: var(--white);
}

.preview-title {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    max-width: 60%;
    text-align: right;
    direction: rtl;
    z-index: 5;
}

.preview-body {
    padding: 1.25rem;
    direction: rtl;
    text-align: right;
}

.preview-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.preview-buttons-right {
    display: flex;
    gap: 0.5rem;
}

.preview-btn-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--yellow);
    color: var(--dark);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.preview-btn-play:hover {
    background: var(--yellow-soft);
}

.preview-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.preview-btn-icon:hover {
    border-color: var(--white);
}

.preview-btn-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: var(--white);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s;
}

.preview-btn-info:hover {
    border-color: var(--white);
}

.preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray-light);
    margin-bottom: 0.75rem;
}

.preview-match {
    color: #46d369;
    font-weight: 600;
}

.preview-badge {
    padding: 0.1rem 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    font-size: 0.65rem;
}

.preview-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-light);
    line-height: 1.5;
}

.preview-tags span::before {
    content: '•';
    margin-left: 0.5rem;
    color: #555;
}

.preview-tags span:first-child::before {
    display: none;
}

/* Decorative large title at bottom */
.ilmuk-hero-title-deco {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    height: auto;
    padding: 0 clamp(1rem, 3vw, 3rem);
}

.deco-title {
    display: block;
    font-size: clamp(5rem, 14vw, 14rem);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(0, 80, 60, 0.5);
    line-height: 0.85;
    white-space: nowrap;
    transform: translateY(20%);
    font-family: 'Tajawal', sans-serif;
    letter-spacing: -0.02em;
    background: linear-gradient(180deg, rgba(0, 100, 70, 0.25) 0%, rgba(0, 80, 60, 0.15) 50%, transparent 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* Mobile adjustments for ilmuk hero */
@media (max-width: 768px) {
    .ilmuk-hero {
        height: auto;
        min-height: 90vh;
        padding-top: 100px;
        padding-bottom: 3rem;
        align-items: flex-end;
    }
    
    .ilmuk-hero-content {
        max-width: 100%;
        padding-right: 0;
    }
    
    .ilmuk-hero-overlay {
        background:
            linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 20%, transparent 50%, rgba(4, 4, 4, 0.9) 85%, rgba(4, 4, 4, 1) 100%);
    }
    
    .deco-title {
        font-size: clamp(3rem, 18vw, 6rem);
    }
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.yellow-play {
    width: auto;
    height: 50px;
    padding: 0 2rem;
    border-radius: 6px;
    background: var(--yellow);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    align-self: flex-start;
}

.yellow-play:hover {
}

.yellow-play i {
    margin-left: 3px;
}

/* Hero buttons container */
.hero-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-buttons .hero-play-btn,
.hero-buttons .hero-restart-btn {
    margin-right: 8px;
}

.hero-restart-btn {
    background: #141414 !important;
    color: var(--accent) !important;
    border: 2px solid var(--accent) !important;
}

.hero-restart-btn:hover {
    background: #1f1f1f !important;
}

.hero-restart-btn.hidden {
    display: none;
}

/* Show Shell (in-page show loader) */
.show-shell {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--dark);
    display: none;
    overflow-y: auto;
}

.show-shell.active {
    display: block;
}

.show-shell .texture-layer {
    position: fixed;
}

.show-shell .app-shell {
    position: relative;
    z-index: 1;
}

/* Loading Episodes State */
.loading-episodes {
    text-align: center;
    padding: 40px;
    color: #888;
}

/* Loading Transition */
.loading-transition {
    position: fixed;
    inset: 0;
    background: var(--yellow);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background 0.8s ease;
}

.loading-transition.active {
    opacity: 1;
    pointer-events: all;
}

.loading-transition.fade-to-black {
    background: #000;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: pulse 1.5s ease-in-out infinite;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.loading-logo {
    width: 120px;
    height: auto;
    transition: filter 0.8s ease;
    /* Make logo black on yellow background */
    filter: brightness(0);
}

.loading-brand {
    display: block;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    color: #000;
    margin-top: 0.1rem;
    font-weight: 700;
    transition: color 0.8s ease;
}

.loading-transition.fade-to-black .loading-brand {
    color: #ffc107;
}

.loading-transition.fade-to-black .loading-content {
    animation: none;
    transform: scale(1);
    opacity: 1;
}

.loading-transition.fade-to-black .loading-logo {
    filter: brightness(0) saturate(100%) invert(76%) sepia(85%) saturate(1568%) hue-rotate(2deg) brightness(104%) contrast(101%);
    animation: none;
    transform: scale(1);
    opacity: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Fullscreen Player */
.fullscreen-player {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-player.active {
    display: flex;
}

.close-player {
    position: absolute;
    top: calc(2rem + 4px);
    left: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.report-player-btn {
    position: absolute;
    top: calc(2rem + 4px);
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, filter 0.2s ease;
    pointer-events: auto;
}

.fullscreen-player:not(.active) .report-player-btn {
    display: none;
}

.report-player-btn:hover {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(255, 212, 0, 0.7));
}

/* Fix overlay (text correction) */
.fix-overlay {
    position: absolute;
    z-index: 20;
    color: #fff;
    text-align: center;
    pointer-events: none;
    font-family: inherit;
    direction: rtl;
}
.fix-overlay-subtitle {
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.92);
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 1.3rem;
    max-width: 80%;
}
.fix-overlay-banner {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 16px 40px;
    border-radius: 10px;
    font-size: 1.8rem;
    font-weight: bold;
    border: 2px solid #FFD400;
}

/* Fix watermark (قيل) */
.fix-watermark {
    position: absolute;
    top: 40px;
    right: 60px;
    font-size: 2rem;
    font-weight: bold;
    color: rgba(255, 212, 0, 0.2);
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 15;
    white-space: nowrap;
}

.close-player.hidden,
.report-player-btn.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

/* Hide close button and report button when episodes panel is open (but not when PDF is active) */
.fullscreen-player.episodes-open:not(.pdf-active) .close-player,
.fullscreen-player.episodes-open:not(.pdf-active) .report-player-btn {
    opacity: 0;
    pointer-events: none;
}

.close-player:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

#youtubePlayerContainer {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
}

#youtubePlayerContainer iframe,
iframe#youtubePlayerContainer {
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Hide YouTube's native pause overlay elements */
#youtubePlayerContainer iframe::after {
    content: "";
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

/* Target YouTube's internal pause overlay classes */
.ytp-pause-overlay,
.ytp-scroll-min,
.ytp-expand-pause-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Pause thumbnail overlay - covers YouTube UI when paused */
.pause-thumbnail {
    position: absolute;
    inset: 0;
    z-index: 5;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.pause-thumbnail::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.pause-thumbnail.visible {
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* Shield overlay - disabled */
.pause-shield {
    display: none;
}

.pause-shield.hidden {
    display: none;
}

.pause-shield.fading-out {
    opacity: 0;
    pointer-events: none;
}

/* Keep last frame clean: don't show pause text layer */
.pause-shield-content {
    display: none;
}

.pause-shield-bg {
    display: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 40px;
    max-width: 700px;
}

.pause-shield-title {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    letter-spacing: -0.01em;
}

.pause-shield-synopsis {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 16px 0 0 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    max-width: 500px;
}

/* In-player Episodes panel - Netflix style right sidebar */
.episodes-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 450px;
    max-width: 90vw;
    z-index: 50;
    background: linear-gradient(to left, rgba(20, 20, 20, 0.98) 0%, rgba(20, 20, 20, 0.95) 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
    pointer-events: auto;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    visibility: hidden;
}

.episodes-panel.visible {
    transform: translateX(0);
    visibility: visible;
}

.episodes-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
    visibility: hidden;
}

.episodes-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    direction: ltr;
    flex-shrink: 0;
}

.episodes-panel-title {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.episodes-panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.episodes-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.episodes-panel-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    direction: ltr;
}

.episodes-panel-list::-webkit-scrollbar {
    width: 4px;
}

.episodes-panel-list::-webkit-scrollbar-track {
    background: transparent;
}

.episodes-panel-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.player-episode-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    cursor: pointer;
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.15s ease;
}

.player-episode-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.player-episode-item.playing {
    background: rgba(255, 255, 255, 0.06);
}

.player-episode-item.playing .player-episode-number {
    color: var(--yellow);
}

.player-episode-thumb {
    width: 130px;
    height: 73px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
}

.player-episode-thumb .episode-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.75);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-episode-thumb .episode-play-icon {
    display: none !important;
}

.player-episode-meta {
    flex: 1;
    min-width: 0;
}

.player-episode-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

.player-episode-meta .player-episode-number {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.player-episode-meta .player-episode-duration {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    white-space: nowrap;
}

.player-episode-meta h4 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    margin: 0 0 8px 0;
}

.player-episode-meta .player-episode-synopsis {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide all YouTube branding and UI */
.fullscreen-player {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: none;
}

.fullscreen-player.active {
    display: block;
}

/* Custom Player Controls */
.custom-controls {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.custom-controls.hidden {
    opacity: 0;
    pointer-events: none;
}

.controls-gradient {
    display: none;
}

/* Clickable area for play/pause */
.controls-click-area {
    position: absolute;
    inset: 0;
    z-index: 5;
    cursor: pointer;
    pointer-events: auto;
}

/* Netflix-style bottom controls */
.controls-center-info {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.episode-info {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.episode-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.controls-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 20px 60px 32px;
    z-index: 10;
    pointer-events: auto;
}

.progress-container {
    margin-bottom: 15px;
}

.progress-bar {
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: height 0.15s ease;
}

.progress-bar:hover {
    height: 8px;
}

.progress-buffered {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    pointer-events: none;
}

.progress-played {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--yellow);
    border-radius: 3px;
    pointer-events: none;
}

.progress-handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 16px;
    height: 16px;
    background: var(--yellow);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease;
    pointer-events: none;
}

.progress-bar:hover .progress-handle {
    transform: translate(-50%, -50%) scale(1);
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: ltr;
    position: relative;
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: ltr;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 16px;
    direction: ltr;
}

/* Next Episode Button and Popup */
.next-episode-wrapper {
    position: relative;
}

.next-episode-popup {
    position: absolute;
    bottom: 50px;
    right: 0;
    width: 500px;
    background: rgba(20, 20, 20, 0.95);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
    direction: rtl;
}

.next-episode-wrapper:hover .next-episode-popup,
.next-episode-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.next-episode-popup-header {
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.next-episode-popup-content {
    display: flex;
    flex-direction: row;
    gap: 14px;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.next-episode-popup-content:hover {
    background: rgba(255, 255, 255, 0.1);
}

.next-episode-popup-thumb {
    width: 160px;
    height: 90px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    position: relative;
}

.next-episode-popup-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.next-episode-popup-thumb i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 1.2rem;
    z-index: 1;
}

.next-episode-popup-info {
    flex: 1;
    min-width: 0;
}

.next-episode-popup-num {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
}

.next-episode-popup-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.next-episode-popup-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.time-display {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.control-btn-sm {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.control-btn-sm:hover {
    opacity: 1;
    transform: scale(1.1);
}

#volumeBtn.control-btn-sm {
    width: 48px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

#volumeBtn .volume-icon {
    position: relative;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.volume-icon svg {
    position: absolute;
    width: 24px;
    height: 24px;
    transition: opacity 0.2s ease;
}

.volume-icon .speaker-base {
    color: #fff;
}

.volume-icon .wave {
    color: #fff;
    opacity: 1;
}

.volume-icon .wave-1 {
    left: 0;
}

.volume-icon .wave-2 {
    left: 0;
}

.volume-icon .mute-slash {
    color: #fff;
    opacity: 0;
}

/* Medium volume: fade wave-2 */
.control-btn-sm[data-volume-level="medium"] .wave-2 {
    opacity: 0.4;
}

/* Low volume: hide wave-2 */
.control-btn-sm[data-volume-level="low"] .wave-1,
.control-btn-sm[data-volume-level="low"] .wave-2 {
    opacity: 0;
}

/* Muted: hide all waves, show slash */
.control-btn-sm[data-volume-level="muted"] .wave-1,
.control-btn-sm[data-volume-level="muted"] .wave-2 {
    opacity: 0;
}

.control-btn-sm[data-volume-level="muted"] .mute-slash {
    opacity: 1;
}

.volume-control {
    position: relative;
    display: flex;
    align-items: center;
}

.volume-control::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 68px;
    transform: translateX(-50%);
    height: 20px;
    z-index: 1;
}

.volume-control .control-btn-sm {
    z-index: 2;
}

.volume-control:hover .control-btn-sm,
.volume-control.active .control-btn-sm {
    transform: scale(1.2);
    opacity: 1;
}

.volume-slider {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    width: 64px;
    height: 170px;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 40px;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translate(-50%, 8px) scale(0.94);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    z-index: 3;
}

.volume-control:hover .volume-slider,
.volume-control.active .volume-slider {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
}

.volume-slider:focus-visible {
    outline: 2px solid var(--yellow);
}

.volume-track {
    position: relative;
    margin: 0 auto;
    width: 6px;
    height: 100%;
    background: rgba(255, 255, 255, 0.28);
    border-radius: 999px;
}

.volume-level {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 50%;
    background: var(--yellow);
    border-radius: inherit;
}

.volume-handle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--yellow);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease;
}

.volume-control:hover .volume-handle,
.volume-control.active .volume-handle {
    transform: translate(-50%, -50%) scale(1.05);
}

/* Skip Intro Button (Netflix-style) */
.skip-intro-btn {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--yellow);
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    backdrop-filter: blur(4px);
}

.skip-intro-btn:hover {
    background: rgba(255, 193, 7, 0.2);
    border-color: #fff;
}

.skip-intro-btn:active {
    transform: translateY(-50%) scale(0.98);
}

.skip-intro-btn i {
    font-size: 0.9rem;
    color: var(--yellow);
}

@media (max-width: 768px) {
    .skip-intro-btn {
        left: 20px;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Episode End Screen */
.episode-end-screen {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

.end-screen-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3);
}

.end-screen-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.next-episode-card {
    cursor: pointer;
    transition: none;
}

.next-episode-card:hover {
    transform: none;
}

.next-episode-thumbnail {
    position: relative;
    width: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.next-episode-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.next-episode-countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
}

.countdown-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.countdown-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 4;
}

.countdown-progress {
    fill: none;
    stroke: var(--yellow);
    stroke-width: 4;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 1s linear;
}

.countdown-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.next-episode-text {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.netflix-play {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: white;
    color: #141414;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.netflix-play:hover {
    background: rgba(255, 255, 255, 0.8);
}

.netflix-play i {
    font-size: 1.25rem;
}

.hero-info-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(109, 109, 110, 0.7);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.hero-info-btn:hover {
    background: rgba(109, 109, 110, 0.5);
}

/* Hide old desktop hero */
.desktop-hero {
    display: none;
}

/* =========================
   Episodes List Layout
   ========================= */
.episodes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.episodes-list .episode-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem;
    min-height: auto;
}

.episodes-list .episode-thumb {
    height: 100px;
    border-radius: 12px;
}

.episodes-list .episode-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    text-align: right;
}

.episodes-list .episode-info > div {
    width: 100%;
    text-align: right;
}

.episodes-list .episode-info p {
    margin: 0;
}


.episodes-list .episode-duration {
    margin-top: 0.5rem;
    color: var(--gray-light);
    display: block;
    text-align: right;
    width: 100%;
}

.series-hero {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    padding: 2.5rem;
    border-radius: 32px;
    overflow: hidden;
}

.series-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    filter: blur(25px);
    transform: scale(1.1);
    opacity: 0.4;
}

.series-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.85), rgba(0,0,0,0.6));
}

.series-hero > * {
    position: relative;
    z-index: 1;
}

.series-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.series-hero-content .crumbs {
    color: var(--gray);
    font-size: 0.85rem;
}

.series-hero-content h1 {
    font-size: clamp(2.5rem, 4vw, 4rem);
}

.series-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.series-tags span {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
}

.series-hero-video {
    position: relative;
}

.video-glow {
    position: absolute;
    inset: 10%;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.2), transparent 60%);
    filter: blur(40px);
}

.video-wrapper {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 35px 60px rgba(0, 0, 0, 0.6);
}

.video-wrapper::after {
    content: '';
    display: block;
    padding-top: 56.25%;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.series-episodes {
    max-width: 1400px;
    margin: 2rem auto 0;
    position: relative;
    z-index: 1;
    background: rgba(13, 13, 13, 0.85);
    border-radius: 32px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 2;
}

.episodes-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.episode-filters {
    display: flex;
    gap: 0.75rem;
}

.filter-pill {
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: var(--gray-light);
    cursor: pointer;
}

.filter-pill.active {
    background: var(--yellow);
    color: var(--dark);
    border-color: var(--yellow);
}

/* Season Dropdown Styles */
.season-dropdown {
    padding: 0.6rem 2rem 0.6rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
    color: var(--yellow);
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E2BE14' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    min-width: 130px;
    transition: all 0.2s ease;
}

.season-dropdown:hover {
    border-color: var(--yellow);
    background-color: rgba(226, 190, 20, 0.1);
}

.season-dropdown:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 2px rgba(226, 190, 20, 0.3);
}

.season-dropdown option {
    background: #1a1a1a;
    color: var(--yellow);
    padding: 0.5rem;
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.episodes-grid .episode-card {
    min-height: 320px;
}

.episodes-grid .episode-info p {
    color: var(--gray-light);
    font-size: 0.9rem;
    margin-top: 0.35rem;
}

.series-stories {
    margin-top: 3rem;
}

.stories-inner {
    background: rgba(8, 8, 8, 0.9);
    border-radius: 28px;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stories-grid article {
    padding: 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
}

.stories-grid span {
    color: var(--yellow);
    font-weight: 700;
}

.video-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.video-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.video-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.video-dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 90vw);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
    background: #000;
}

.video-frame {
    position: relative;
    padding-top: 56.25%;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-close {
    position: absolute;
    top: 0.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
}

@media (max-width: 960px) {
    .ilmuk-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .primary-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-banner {
        grid-template-columns: 1fr;
    }

    .notification-banner {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .cta-panel {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 720px) {
    .primary-nav {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        background: rgba(10, 10, 10, 0.9);
        padding: 1rem;
        border-radius: 18px;
    }

    .primary-nav.nav-open {
        display: flex;
    }

    .hero-actions {
        flex-direction: column;
    }

    #rail-originals {
        display: none;
    }

    .mobile-show-rail {
        display: flex;
        scroll-snap-type: x mandatory;
    }

    .mobile-show-card {
        scroll-snap-align: start;
    }

    /* Show mobile hero on narrow screens */
    .mobile-show-hero {
        display: flex;
    }

    .series-hero {
        display: none;
    }

    .desktop-hero {
        display: none;
    }

    /* Switch list back to grid on mobile */
    .episodes-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }

    .episodes-list .episode-card {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .episodes-list .episode-thumb {
        height: 180px;
    }
}

/* Netflix-style Poster Cards for Originals */
.netflix-poster-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem 0;
}

/* Hide any stray floating buttons */
#soon::before,
#soon::after {
    display: none !important;
}

.netflix-poster-card {
    position: relative;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: none;
}

.netflix-poster-card:hover {
    transform: none;
    z-index: 10;
}

.netflix-poster-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.poster-badge {
    position: absolute;
    top: 0.75rem;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.poster-play-btn {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, transparent 100%);
    padding: 2rem 1rem 1rem;
    opacity: 0;
    transition: none;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.netflix-poster-card:hover .poster-play-btn {
    opacity: 1;
}

.poster-play-btn i {
    font-size: 1.25rem;
}

.poster-play-btn span {
    font-size: 0.875rem;
    font-weight: 600;
}

.poster-info {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 1;
}

.poster-info h3 {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .netflix-poster-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .netflix-poster-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .netflix-poster-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Shared series page styles (Programs/Lessons)
   ============================================ */
.series-header {
    padding: 2rem 4rem;
    text-align: right;
}
.series-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.series-header p {
    color: var(--gray-light);
    font-size: 1.1rem;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding: 0 4rem 4rem;
}

@media (min-width: 2200px) {
    .series-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .series-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .series-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 2rem;
    }
    .series-header {
        padding: 1.5rem 1.5rem;
    }
    .series-header h1 {
        font-size: 1.5rem;
    }
}

.series-show-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #181818;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
    text-decoration: none;
    display: block;
}

.series-show-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    z-index: 10;
}

/* Avoid double scale: keep playing state at the same scale as hover */
.series-show-card.video-playing {
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(0,0,0,0.7);
    z-index: 20;
}

.series-show-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 10px;
}

.series-show-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 14px;
}

.series-show-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease;
}

.series-show-card.video-playing .series-show-thumb img {
    opacity: 0;
}

.series-show-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(24,24,24,0.9) 100%);
    pointer-events: none;
    z-index: 2;
    border-radius: inherit;
}

/* Video container inside card */
.card-video-container {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.card-video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.card-video-container iframe.visible {
    opacity: 1;
}
.card-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.card-video-container video.visible {
    opacity: 1;
}

#heroVideoContainer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}
#heroVideoContainer video.visible {
    opacity: 1;
}
#heroVideoContainer iframe {
    opacity: 0;
    transition: opacity 0.5s ease;
}
#heroVideoContainer iframe.visible {
    opacity: 1;
}

/* Buttons container on thumbnail (left side) */
.card-thumb-buttons {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 7px;
    z-index: 5;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.series-show-card:hover .card-thumb-buttons {
    opacity: 1;
    pointer-events: auto;
}

.mylist-card:hover .card-thumb-buttons {
    opacity: 1;
    pointer-events: auto;
}

.series-show-card.video-playing .card-thumb-buttons {
    opacity: 1;
    pointer-events: auto;
}

/* Mute and modal buttons on thumbnail */
.card-mute-btn,
.card-modal-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.card-mute-btn:hover,
.card-modal-btn:hover {
    background: rgba(0,0,0,0.8);
    border-color: #fff;
    transform: scale(1.1);
}

.card-mute-btn i,
.card-modal-btn i {
    color: #fff;
    font-size: 0.75rem;
}

/* Netflix-style Like Button System */
.card-like-wrapper {
    position: relative;
}

.card-like-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.card-like-btn:hover {
    background: rgba(0,0,0,0.8);
    border-color: #fff;
    transform: scale(1.1);
}

.card-like-btn i {
    color: #fff;
    font-size: 0.75rem;
}

.card-like-btn.liked {
    background: var(--yellow);
    border-color: var(--yellow);
}

.card-like-btn.liked i {
    color: #141414;
}

/* Like popup menu */
.card-like-popup {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-bottom: 8px;
    background: #1a1a1a;
    border-radius: 30px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) scale(0.8);
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    z-index: 100;
}

.card-like-wrapper:hover .card-like-popup {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

.card-like-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1a1a1a;
}

.like-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #333;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.like-option:hover {
    background: var(--yellow);
    border-color: var(--yellow);
    transform: scale(1.2);
}

.like-option:hover i {
    color: #141414;
}

.like-option i {
    color: #fff;
    font-size: 0.75rem;
}

.like-option.active {
    background: var(--yellow);
    border-color: var(--yellow);
}

.like-option.active i {
    color: #141414;
}

/* Double thumbs icon */
.like-option .double-thumbs {
    display: flex;
    align-items: center;
}

.like-option .double-thumbs i {
    font-size: 0.55rem;
}

.like-option .double-thumbs i:last-child {
    margin-left: -3px;
}

/* Tooltip for like options */
.like-option-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    background: #fff;
    color: #000;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.15s;
}

.like-option:hover .like-option-tooltip {
    opacity: 1;
    visibility: visible;
}

.like-option-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
}

/* Badges container on thumbnail (right side) */
.card-thumb-badges {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}

.series-show-card.video-playing .card-thumb-badges {
    opacity: 1;
}

.card-thumb-badges span {
    padding: 3px 8px;
    background: rgba(0,0,0,0.7);
    border-radius: 4px;
    font-size: 0.7rem;
    color: #fff;
}

.card-thumb-badges .card-match {
    color: #46d369;
    font-weight: 600;
}

.card-thumb-badges .card-badge {
    border: 1px solid #777;
    background: transparent;
}

.series-show-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    display: none;
}

.series-show-card:hover .series-show-play {
    opacity: 0;
}

.series-show-card:hover .series-show-play:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.series-show-card.video-playing .series-show-play {
    opacity: 0 !important;
}

.series-show-play i {
    color: #141414;
    font-size: 1rem;
    margin-left: 3px;
}

/* Netflix-style info section */
.series-show-info {
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
}

.series-show-info h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-show-info p {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.series-show-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.series-show-info-row h3 {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

.card-hd-badge,
.card-pdf-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ============================================
   INTERACTIVE GAMES PAGE
   ============================================ */

/* Hero Section */
.interactive-hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow: hidden;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: clamp(1rem, 5vw, 4rem);
    padding-right: clamp(1rem, 5vw, 4rem);
}

.interactive-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 40%, #16213e 70%, #0f0f0f 100%);
    z-index: 0;
}

.interactive-hero-bg img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 2;
}

.interactive-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212, 175, 55, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(26, 158, 158, 0.06) 0%, transparent 50%);
    z-index: 1;
}

.interactive-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(270deg, rgba(4, 4, 4, 0.92) 0%, rgba(4, 4, 4, 0.7) 20%, rgba(4, 4, 4, 0.3) 45%, transparent 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 15%, transparent 75%, rgba(4, 4, 4, 0.85) 95%, rgba(4, 4, 4, 1) 100%);
    pointer-events: none;
    z-index: 3;
}

.interactive-hero-content {
    position: relative;
    z-index: 5;
    max-width: 700px;
    margin-left: auto;
    margin-right: 0;
    padding: 0 clamp(2rem, 5vw, 5rem) 0 0;
    text-align: right;
    direction: rtl;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.interactive-hero-eyebrow {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--yellow);
    margin-bottom: 0.5rem;
    text-align: right;
}

.interactive-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(212, 175, 55, 0.15);
    color: #d4af37;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 16px;
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.interactive-hero-title {
    font-family: 'Tajawal', sans-serif;
    font-size: clamp(2.42rem, 5.5vw, 3.85rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px;
    line-height: 1.2;
}

.interactive-hero-subtitle {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.15rem;
    color: #b3b3b3;
    margin: 0 0 24px;
    line-height: 1.7;
    max-width: 600px;
}

.interactive-hero-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.interactive-hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-main) 0%, transparent 60%);
    z-index: 2;
}

/* Games Grid Section */
.interactive-games-section {
    padding: 1rem 4rem 4rem;
}

.interactive-category-section {
    margin-bottom: 1rem;
}

.interactive-category-section .series-header {
    padding: 2rem 0 0.5rem;
}

.interactive-games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

@media (min-width: 2200px) {
    .interactive-games-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .interactive-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .interactive-games-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem 2rem;
    }
}

/* Game Card */
.game-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #181818;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
    outline: none;
}

.game-card:hover,
.game-card:focus-visible {
    transform: scale(1.04);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.game-card:focus-visible {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(212, 175, 55, 0.6);
}

.game-card-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #111;
    border-radius: 14px;
}

.game-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.4s ease;
}

.game-card:hover .game-card-thumb img {
    transform: scale(1.08);
    filter: brightness(0.7);
}

.game-card-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e. #16213e);
    color: rgba(212, 175, 55, 0.3);
    font-size: 3rem;
}

.game-card-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-card-play-overlay {
    opacity: 1;
}

.game-card-play-btn {
    background: #FFD400;
    color: #111;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    letter-spacing: 0.06em;
    padding: 8px 28px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
    transition: transform 0.2s ease, background 0.2s ease;
}

.game-card:hover .game-card-play-btn {
    transform: scale(1.06);
    background: #ffe033;
}

.game-card-info {
    padding: 16px 18px 18px;
}

.game-card-title {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 6px;
    line-height: 1.4;
}

.game-card-desc {
    font-family: 'Tajawal', sans-serif;
    font-size: 0.9rem;
    color: #999;
    margin: 0 0 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Loading / Empty States */
.interactive-loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #888;
    gap: 16px;
}

.interactive-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top-color: #d4af37;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.interactive-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: #666;
    gap: 12px;
    text-align: center;
}

.interactive-empty i {
    font-size: 3rem;
    color: #444;
    margin-bottom: 8px;
}

.interactive-empty h3 {
    font-family: 'Tajawal', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #888;
    margin: 0;
}

.interactive-empty p {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

/* Coming Soon — full-page state when no applications exist */
.interactive-coming-soon {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    text-align: center;
    gap: 16px;
    padding: 40px 20px;
}

.interactive-coming-soon-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gold, #FFD400);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.interactive-coming-soon-icon i {
    font-size: 2.2rem;
    color: #0a0a0a;
}

.interactive-coming-soon h2 {
    font-family: 'Tajawal', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.interactive-coming-soon p {
    font-size: 1.1rem;
    color: #888;
    margin: 0;
    max-width: 400px;
}

.interactive-error i {
    color: #e50914;
}

/* ============================================
   FULLSCREEN GAME CONTAINER
   ============================================ */

body.game-fullscreen-active {
    overflow: hidden !important;
}

.game-fullscreen-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-fullscreen-container.visible {
    opacity: 1;
}

.game-fullscreen-container.closing {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.game-iframe {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.game-back-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.game-back-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.4);
    transform: scale(1.03);
}

.game-back-btn i {
    font-size: 0.9rem;
}

/* ============================================
   INTERACTIVE PAGE RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .interactive-hero {
        height: 70vh;
        min-height: 500px;
    }
    .interactive-hero-title {
        font-size: 2.4rem;
    }
    .interactive-games-section {
        padding: 1rem 2.5rem 3rem;
    }
    .interactive-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .interactive-hero {
        height: 60vh;
        min-height: 400px;
    }
    .interactive-hero-title {
        font-size: 1.8rem;
    }
    .interactive-hero-subtitle {
        font-size: 1rem;
    }
    .interactive-games-section {
        padding: 0.5rem 1.5rem 2rem;
    }
    .interactive-games-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .game-back-btn {
        top: 10px;
        right: 10px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .game-back-btn span {
        display: none;
    }
}

/* ==========================================================================
   Skeleton placeholders
   Replaces every spinner + "loading..." text the pages used to ship as
   content. Container ids are unchanged, so the page JS that hides or
   overwrites them (mainLoading.style.display='none', heroTitle.textContent=,
   grid.innerHTML=) keeps working exactly as before.
   ========================================================================== */
@keyframes skShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.sk {
    display: block;
    border-radius: 8px;
    background: linear-gradient(100deg, #1b1b1b 40%, #262626 50%, #1b1b1b 60%);
    background-size: 200% 100%;
    animation: skShimmer 1.6s linear infinite;
}
.sk-title { height: 2.2rem; width: min(320px, 60%); border-radius: 6px; }
.sk-line  { height: 0.9rem; margin-top: 0.6rem; width: 100%; }
.sk-card  { aspect-ratio: 16 / 9; width: 100%; }
.sk-section-title { height: 1.3rem; width: 180px; margin: 0 0 1rem; }
.sk-rail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin: 0 0 2.5rem;
}
.sk-row   { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.sk-thumb { width: 130px; aspect-ratio: 16 / 9; flex: 0 0 auto; }
.sk-lines { flex: 1; min-width: 0; }
.sk-avatar { width: 96px; height: 96px; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) {
    .sk { animation: none; }
}
