* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Cairo', sans-serif; }

body {
    background: linear-gradient(135deg, #0a1628 0%, #1a2332 50%, #0a1628 100%);
    background-attachment: fixed;
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* Header (same look as channels.php) */
.header {
    background: linear-gradient(90deg, #ea580c 0%, #f97316 50%, #ea580c 100%);
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 50;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { width: 50px; height: 50px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-size: 22px; font-weight: 800; }
.logo-sub { font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.nav-menu { display: flex; gap: 10px; align-items: center; }
.nav-item {
    font-size: 15px; font-weight: 600; padding: 8px 16px; border-radius: 8px;
    transition: background .3s; white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.15); }
.nav-item.active { background: rgba(255, 255, 255, 0.22); }

.page { max-width: 1280px; margin: 0 auto; padding: 28px 40px 40px; }
.footer { text-align: center; color: #64748b; font-size: 13px; padding: 20px; }

/* Hero (latest movie) */
.hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    min-height: 340px;
    display: flex;
    align-items: flex-end;
    border: 1px solid rgba(249, 115, 22, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    margin-bottom: 36px;
}
.hero-bg {
    position: absolute; inset: -30px;
    background: #111827 center/cover no-repeat;
    filter: blur(28px) brightness(.45) saturate(1.3);
    transform: scale(1.1);
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(10, 22, 40, .95) 0%, rgba(10, 22, 40, .2) 70%);
}
.hero-content {
    position: relative; z-index: 1;
    display: flex; gap: 28px; align-items: flex-end;
    padding: 30px; width: 100%;
}
.hero-poster {
    width: 190px; flex-shrink: 0; aspect-ratio: 2/3; border-radius: 14px;
    background: #1e293b center/cover no-repeat;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .6);
    display: flex; align-items: center; justify-content: center; font-size: 60px;
}
.hero-info { flex: 1; min-width: 0; padding-bottom: 6px; }
.hero-label {
    display: inline-block; background: rgba(249, 115, 22, .2); color: #fb923c;
    border: 1px solid rgba(249, 115, 22, .5); border-radius: 999px;
    padding: 2px 14px; font-size: 13px; font-weight: 700; margin-bottom: 10px;
}
.hero-title { font-size: 36px; font-weight: 800; line-height: 1.3; margin-bottom: 8px; }
.hero-meta { color: #cbd5e1; font-size: 14px; margin-bottom: 18px; }
.btn-play {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(90deg, #ea580c, #f97316);
    color: white; font-weight: 700; font-size: 16px;
    padding: 12px 28px; border-radius: 12px;
    box-shadow: 0 8px 24px rgba(234, 88, 12, .45);
    transition: transform .2s, box-shadow .2s;
}
.btn-play:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(234, 88, 12, .6); }
.btn-play .tri { width: 0; height: 0; border-style: solid; border-width: 8px 13px 8px 0; border-color: transparent white transparent transparent; }

/* Sections */
.section { margin-bottom: 38px; }
.section-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; gap: 12px;
}
.section-title {
    font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 10px;
}
.section-title::before {
    content: ''; width: 5px; height: 24px; border-radius: 4px;
    background: linear-gradient(180deg, #f97316, #ea580c);
}
.see-all {
    color: #fb923c; font-weight: 700; font-size: 14px;
    padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(249, 115, 22, .4);
    transition: background .2s; white-space: nowrap;
}
.see-all:hover { background: rgba(249, 115, 22, .15); }

/* Horizontal row */
.row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 170px;
    gap: 16px;
    overflow-x: auto;
    /* Room around the cards so the hover zoom is not cut off by the scrolling row */
    padding: 10px 8px 14px;
    margin: -10px -8px 0;
    scroll-padding: 0 8px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: rgba(249, 115, 22, .5) transparent;
}
.row::-webkit-scrollbar { height: 6px; }
.row::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .5); border-radius: 6px; }
.row .movie-card { scroll-snap-align: start; }

/* Grid (category page) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 20px;
}

/* Movie card */
.movie-card { display: block; }
.movie-card .poster {
    position: relative;
    aspect-ratio: 2/3;
    border-radius: 14px;
    background: #1e293b center/cover no-repeat;
    border: 2px solid rgba(51, 65, 85, .5);
    overflow: hidden;
    transition: transform .25s, border-color .25s, box-shadow .25s;
    display: flex; align-items: center; justify-content: center;
}
.poster-icon { font-size: 46px; opacity: .5; }
.movie-card:hover .poster {
    transform: scale(1.06);
    border-color: rgba(249, 115, 22, .8);
    box-shadow: 0 14px 30px rgba(234, 88, 12, .25);
}
.play-hover {
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .25s;
}
.movie-card:hover .play-hover { opacity: 1; }
.play-circle {
    width: 56px; height: 56px; border-radius: 50%;
    border: 3px solid #f97316; background: rgba(0, 0, 0, .6);
    position: relative;
}
.play-circle::after {
    content: ''; position: absolute; top: 50%; left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid; border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #f97316;
}
.badge-new {
    position: absolute; top: 10px; right: 10px;
    background: #ea580c; color: white; font-size: 11px; font-weight: 700;
    padding: 2px 10px; border-radius: 999px;
}
.movie-title {
    margin-top: 8px; font-size: 14px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.movie-card.big { grid-row: span 1; }

/* Category hero cards on home page */
.empty {
    text-align: center; color: #94a3b8; padding: 60px 20px;
    background: rgba(15, 23, 42, .5); border-radius: 16px;
    border: 1px dashed rgba(148, 163, 184, .3);
}
.breadcrumb { color: #94a3b8; font-size: 14px; margin-bottom: 14px; }
.breadcrumb a { color: #fb923c; font-weight: 600; }
.page-title { font-size: 30px; font-weight: 800; margin-bottom: 4px; }
.page-sub { color: #94a3b8; margin-bottom: 24px; }

/* Category chips */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.chip {
    background: rgba(30, 41, 59, .6); border: 2px solid rgba(51, 65, 85, .4);
    padding: 7px 18px; border-radius: 8px; font-weight: 600; font-size: 14px;
    transition: all .2s;
}
.chip:hover { border-color: rgba(249, 115, 22, .5); }
.chip.active { background: rgba(249, 115, 22, .2); border-color: rgba(249, 115, 22, .6); color: #fb923c; }

/* Watch page */
.watch-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.player-box {
    background: #000;
    border: 4px solid rgba(251, 109, 7, .93);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}
.player-frame { position: relative; aspect-ratio: 16/9; background: #000; }
.player-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.servers {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    padding: 14px 16px; background: rgba(15, 23, 42, .95);
}
.servers-label { color: #94a3b8; font-weight: 700; font-size: 14px; margin-left: 4px; }
.server-btn {
    background: rgba(30, 41, 59, .8); color: white;
    border: 2px solid rgba(51, 65, 85, .6); border-radius: 8px;
    padding: 6px 16px; font-weight: 700; font-size: 14px; cursor: pointer;
    transition: all .2s;
}
.server-btn:hover { border-color: rgba(249, 115, 22, .6); }
.server-btn.active { background: rgba(249, 115, 22, .2); border-color: #f97316; color: #fb923c; }
.server-msg { display: none; width: 100%; color: #fca5a5; font-size: 13px; }
.server-msg.show { display: block; }
.movie-info {
    display: flex; gap: 18px; margin-top: 20px; align-items: flex-start;
    background: rgba(15, 23, 42, .6); border: 1px solid rgba(51, 65, 85, .5);
    border-radius: 16px; padding: 18px;
}
.movie-info .mini-poster {
    width: 90px; flex-shrink: 0; aspect-ratio: 2/3; border-radius: 10px;
    background: #1e293b center/cover no-repeat;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.movie-info h1 { font-size: 24px; font-weight: 800; line-height: 1.35; margin-bottom: 6px; }
.movie-info .meta { color: #94a3b8; font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.movie-info .meta a { color: #fb923c; font-weight: 600; }
.side h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.side-list { display: flex; flex-direction: column; gap: 12px; }
.side-item {
    display: flex; gap: 12px; align-items: center;
    background: rgba(15, 23, 42, .6); border: 1px solid rgba(51, 65, 85, .5);
    border-radius: 12px; padding: 8px; transition: border-color .2s;
}
.side-item:hover { border-color: rgba(249, 115, 22, .6); }
.side-item .thumb {
    width: 58px; flex-shrink: 0; aspect-ratio: 2/3; border-radius: 8px;
    background: #1e293b center/cover no-repeat;
    display: flex; align-items: center; justify-content: center;
}
.side-item .t { font-weight: 700; font-size: 14px; line-height: 1.4; }
.side-item .d { color: #94a3b8; font-size: 12px; }

/* Responsive */
@media (max-width: 1000px) {
    .watch-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .header { padding: 10px 16px; }
    .logo-icon { width: 42px; height: 42px; }
    .logo-main { font-size: 18px; }
    .nav-menu { gap: 4px; }
    .nav-item { font-size: 13px; padding: 6px 10px; }
    .page { padding: 18px 16px 30px; }
    .hero { min-height: 0; border-radius: 16px; }
    .hero-content { padding: 18px; gap: 16px; }
    .hero-poster { width: 110px; border-radius: 10px; }
    .hero-title { font-size: 22px; }
    .hero-meta { margin-bottom: 12px; font-size: 13px; }
    .btn-play { padding: 10px 20px; font-size: 15px; }
    .section-title { font-size: 18px; }
    .row { grid-auto-columns: 130px; gap: 12px; }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .movie-title { font-size: 13px; }
    .page-title { font-size: 24px; }
    .player-box { border-width: 3px; border-radius: 12px; margin: 0 -6px; }
    .movie-info h1 { font-size: 19px; }
    .movie-info .mini-poster { width: 70px; }
}
@media (max-width: 480px) {
    .logo-text { display: none; }
    /* 4 section buttons: their own full-width row under the logo, above the search */
    .header .nav-menu { order: 2; flex-basis: 100%; justify-content: space-between; gap: 4px; }
    .header .nav-item { padding: 6px 4px; font-size: 13px; flex: 1; text-align: center; }
    .grid { grid-template-columns: repeat(2, 1fr); }
    .hero-poster { width: 92px; }
    .hero-title { font-size: 19px; }
    .server-btn { padding: 5px 12px; font-size: 13px; }
}

/* Year + translation tags */
.movie-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.movie-tags span {
    font-size: 11px; font-weight: 700; line-height: 1.7;
    padding: 0 8px; border-radius: 6px; white-space: nowrap;
}
.tag-year { background: rgba(148, 163, 184, .18); color: #cbd5e1; }
.tag-lang { background: rgba(249, 115, 22, .18); color: #fb923c; }
.hero-tags { margin: 0 0 8px; }
.hero-tags span, .info-tags span { font-size: 13px; padding: 1px 12px; }
.info-tags { margin: 0 0 8px; }
.hero-desc {
    color: #e2e8f0; font-size: 15px; line-height: 1.8; max-width: 720px; margin-bottom: 18px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.movie-desc { margin-top: 12px; }
.movie-desc h2 { font-size: 15px; color: #fb923c; margin-bottom: 4px; }
.movie-desc p { color: #cbd5e1; font-size: 15px; line-height: 1.9; }
@media (max-width: 768px) {
    .hero-desc { font-size: 13px; -webkit-line-clamp: 2; margin-bottom: 12px; }
    .movie-tags span { font-size: 10px; padding: 0 6px; }
    .hero-tags span, .info-tags span { font-size: 12px; }
}

/* Cast */
.movie-cast { margin-top: 14px; }
.movie-cast h2 { font-size: 15px; color: #fb923c; margin-bottom: 8px; }
.cast-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cast-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(30, 41, 59, .8); border: 1px solid rgba(51, 65, 85, .7);
    border-radius: 999px; padding: 3px 12px; font-size: 13px; font-weight: 600; color: #e2e8f0;
    transition: border-color .2s, background .2s;
}
a.cast-chip:hover { border-color: #f5c518; background: rgba(245, 197, 24, .08); }
.cast-chip .imdb {
    background: #f5c518; color: #000; font-size: 9px; font-weight: 800;
    border-radius: 3px; padding: 0 4px; line-height: 1.6; direction: ltr;
}
.hero-cast { color: #e2e8f0; font-size: 14px; font-weight: 600; margin: -8px 0 12px; }
@media (max-width: 768px) {
    .hero-cast { font-size: 12px; margin: -6px 0 8px; }
    .cast-chip { font-size: 12px; padding: 2px 10px; }
}

/* ===== Banner slider (movies home) ===== */
.hero-slider {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(249, 115, 22, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    margin-bottom: 36px;
    background: #0f172a;
}
.hero-slider .slides { display: grid; }
.hero-slider .hero {
    grid-area: 1 / 1;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 380px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .8s ease, visibility .8s;
}
.hero-slider .hero.active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slider .hero-content { padding: 30px 70px 50px; align-items: center; }
.hero-slider .hero.active .hero-info > * { animation: heroIn .7s ease both; }
.hero-slider .hero.active .hero-info > *:nth-child(2) { animation-delay: .08s; }
.hero-slider .hero.active .hero-info > *:nth-child(n+3) { animation-delay: .16s; }
@keyframes heroIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero-slider .hero-desc {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    max-width: 820px;
    font-size: 15px;
    line-height: 1.9;
    text-align: justify;
}
.hero-title a:hover { color: #fb923c; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.read-more {
    color: #fb923c; font-weight: 800; white-space: nowrap;
    border-bottom: 1px solid rgba(251, 146, 60, .5); transition: color .2s, border-color .2s;
}
.read-more:hover { color: #fdba74; border-color: #fdba74; }

.slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(0, 0, 0, .45); color: white; font-size: 30px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    padding-bottom: 4px; transition: background .2s, border-color .2s;
}
.slider-arrow:hover { background: rgba(234, 88, 12, .8); border-color: #f97316; }
.slider-arrow.prev { right: 14px; }
.slider-arrow.next { left: 14px; }
.slider-dots {
    position: absolute; bottom: 16px; left: 0; right: 0; z-index: 3;
    display: flex; justify-content: center; gap: 7px; flex-wrap: wrap; padding: 0 60px;
}
.slider-dots .dot {
    width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
    background: rgba(255, 255, 255, .35); transition: width .3s, background .3s;
}
.slider-dots .dot.active { width: 26px; background: #f97316; }
.slider-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; z-index: 3; background: rgba(255, 255, 255, .08); }
.slider-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ea580c, #f97316); margin-right: auto; }

@media (max-width: 768px) {
    .hero-slider { border-radius: 16px; margin-bottom: 26px; }
    .hero-slider .hero { min-height: 0; }
    .hero-slider .hero-content { padding: 18px 16px 42px; align-items: flex-start; flex-wrap: wrap; }
    .hero-slider .hero-desc { font-size: 13px; line-height: 1.8; text-align: start; }
    .slider-arrow { display: none; }
    .slider-dots { bottom: 12px; gap: 5px; padding: 0 16px; }
    .slider-dots .dot { width: 7px; height: 7px; }
    .slider-dots .dot.active { width: 18px; }
}
@media (max-width: 480px) {
    .hero-slider .hero-info { flex-basis: 100%; }
    .hero-slider .hero-poster { width: 100px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-slider .hero, .hero-slider .hero.active .hero-info > * { transition: none; animation: none; }
}

/* Category labels under the movie thumbnail */
.movie-cats { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.movie-cats span, .movie-cats a {
    font-size: 11px; font-weight: 600; line-height: 1.7; white-space: nowrap;
    padding: 0 8px; border-radius: 6px;
    background: rgba(99, 102, 241, .16); color: #a5b4fc;
}
.movie-cats a:hover { background: rgba(99, 102, 241, .3); }
@media (max-width: 768px) {
    .movie-cats span, .movie-cats a { font-size: 10px; padding: 0 6px; }
}

/* ===== Banner slider: compact layout on phones (poster on the side, text next to it) ===== */
.hero-desc .desc-short { display: none; }
@media (max-width: 768px) {
    .hero-desc .desc-full { display: none; }
    .hero-desc .desc-short { display: inline; }

    .hero-slider .hero-content {
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 14px 32px;
    }
    .hero-slider .hero-poster {
        width: 96px;
        flex-shrink: 0;
        border-radius: 10px;
        font-size: 32px;
    }
    .hero-slider .hero-info { flex: 1; flex-basis: auto; padding-bottom: 0; }
    .hero-slider .hero-label,
    .hero-slider .hero-meta { display: none; }
    .hero-slider .hero-title {
        font-size: 16px;
        line-height: 1.35;
        margin-bottom: 4px;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    .hero-slider .hero-tags { margin: 0 0 4px; }
    .hero-slider .hero-tags span { font-size: 10.5px; padding: 0 7px; }
    .hero-slider .hero-cast {
        font-size: 11.5px;
        margin: 0 0 4px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .hero-slider .hero-desc {
        font-size: 12.5px;
        line-height: 1.7;
        margin-bottom: 8px;
        color: #cbd5e1;
    }
    .hero-slider .btn-play { padding: 7px 16px; font-size: 13px; gap: 7px; border-radius: 10px; }
    .hero-slider .btn-play .tri { border-width: 6px 10px 6px 0; }
    .slider-dots { bottom: 10px; }
}

/* ===== Header search ===== */
.search {
    position: relative;
    flex: 1;
    max-width: 520px;
    margin: 0 24px;
}
.search input {
    width: 100%;
    height: 42px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    padding: 0 18px 0 50px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: #9ca3af; }
.search input:focus { border-color: #0a1628; box-shadow: 0 0 0 4px rgba(10, 22, 40, .18); }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search-btn {
    position: absolute; left: 4px; top: 4px;
    width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
    background: linear-gradient(135deg, #ea580c, #f97316); color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.search-btn svg { width: 17px; height: 17px; }
.search-btn:hover { filter: brightness(1.1); }

.search-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 60;
    background: #111c2e; border: 1px solid rgba(249, 115, 22, .35); border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .5);
    max-height: min(70vh, 460px); overflow-y: auto; padding: 6px;
    display: none;
}
.search-dropdown.show { display: block; }
.search-dropdown.loading { opacity: .7; }
.sd-item {
    display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px;
    color: #fff; transition: background .15s;
}
.sd-item:hover, .sd-item.active { background: rgba(249, 115, 22, .15); }
.sd-thumb {
    width: 40px; flex-shrink: 0; aspect-ratio: 2/3; border-radius: 6px;
    background: #1e293b center/cover no-repeat;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sd-text { min-width: 0; display: flex; flex-direction: column; }
.sd-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-meta { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sd-meta em { font-style: normal; color: #fb923c; margin-right: 8px; }
.sd-all {
    justify-content: center; margin-top: 4px; padding: 10px; font-weight: 700; font-size: 13px;
    color: #fb923c; border-top: 1px solid rgba(148, 163, 184, .15); border-radius: 0 0 10px 10px;
}
.sd-empty { padding: 16px; text-align: center; color: #94a3b8; font-size: 14px; }

/* Phones: search box on its own row under the logo and buttons, above the banners */
@media (max-width: 768px) {
    .header { flex-wrap: wrap; row-gap: 10px; }
    .search { order: 3; flex-basis: 100%; max-width: none; margin: 0; }
    .search input { height: 40px; font-size: 16px; } /* 16px stops iPhone zooming in on focus */
    .search-btn { width: 32px; height: 32px; }
    .search-dropdown { max-height: 60vh; }
}

/* ===== Category boxes slider (movies home) ===== */
.cat-arrows { display: flex; gap: 8px; }
.cat-arrow {
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    border: 1px solid rgba(249, 115, 22, .45); background: rgba(15, 23, 42, .7); color: #fb923c;
    font-size: 24px; line-height: 1; padding-bottom: 3px;
    display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s;
}
.cat-arrow:hover { background: #ea580c; color: #fff; }
.cat-slider {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 150px;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 8px 6px 14px;
    margin: -8px -6px 0;
    scrollbar-width: none;
}
.cat-slider::-webkit-scrollbar { display: none; }
.cat-box {
    position: relative;
    scroll-snap-align: start;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    color: #fff;
    background: linear-gradient(var(--ang, 145deg), var(--c1), var(--c2));
    color: var(--cat-text, #fff);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
    transition: transform .25s, box-shadow .25s;
}
/* Soft light + a big faded copy of the icon in the background */
.cat-box::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 25% 15%, rgba(255, 255, 255, .28), transparent 55%);
}
.cat-box:hover { transform: scale(1.06); box-shadow: 0 14px 30px rgba(0, 0, 0, .45); }
.cat-icon {
    position: relative; font-size: 44px; line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35));
    transition: transform .25s;
}
.cat-box:hover .cat-icon { transform: translateY(-3px) rotate(-6deg); }
.cat-name { position: relative; font-size: 16px; font-weight: 800; padding: 0 8px; line-height: 1.3; }
.cat-count {
    position: relative; font-size: 11px; font-weight: 700;
    background: rgba(0, 0, 0, .25); border-radius: 999px; padding: 1px 10px;
}
@media (max-width: 768px) {
    .cat-arrows { display: none; }
    .cat-slider { grid-auto-columns: 112px; gap: 10px; }
    .cat-box { height: 118px; border-radius: 14px; gap: 4px; }
    .cat-icon { font-size: 34px; }
    .cat-name { font-size: 13.5px; }
    .cat-count { font-size: 10px; }
}

/* ===== Download ===== */
.watch-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.btn-download {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    border: 0; border-radius: 12px; padding: 10px 26px;
    background: linear-gradient(90deg, #ea580c, #f97316); color: #fff;
    font-family: inherit; font-size: 16px; font-weight: 800;
    box-shadow: 0 8px 22px rgba(234, 88, 12, .4); transition: transform .2s, box-shadow .2s;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(234, 88, 12, .55); }
.dl-modal {
    position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
    padding: 16px; background: rgba(5, 10, 20, .75); backdrop-filter: blur(4px);
}
.dl-modal.show { display: flex; }
.dl-card {
    position: relative; width: 100%; max-width: 440px; background: #111c2e;
    border: 1px solid rgba(249, 115, 22, .4); border-radius: 18px; padding: 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .55);
}
.dl-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 2px; }
.dl-name { color: #94a3b8; font-size: 14px; margin-bottom: 16px; }
.dl-close {
    position: absolute; top: 14px; left: 14px; width: 32px; height: 32px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; font-size: 15px;
}
.dl-list { display: flex; flex-direction: column; gap: 10px; }
.dl-item {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    padding: 13px 16px; border-radius: 12px; background: rgba(30, 41, 59, .8);
    border: 1px solid rgba(51, 65, 85, .8); transition: border-color .2s, background .2s;
}
.dl-item:hover { border-color: #f97316; background: rgba(249, 115, 22, .12); }
.dl-item.disabled { opacity: .45; pointer-events: none; }
.dl-q { font-weight: 700; }
.dl-size { color: #fb923c; font-size: 13px; font-weight: 700; direction: ltr; white-space: nowrap; }
.dl-note { margin-top: 14px; font-size: 12.5px; color: #94a3b8; line-height: 1.7; }
.dl-loading, .dl-ok, .dl-error { text-align: center; padding: 14px 6px; line-height: 1.8; }
.dl-ok { color: #86efac; font-weight: 700; }
.dl-ok small { color: #94a3b8; font-weight: 600; }
.dl-error { color: #fca5a5; font-weight: 600; margin-bottom: 10px; }
.dl-spin {
    display: inline-block; width: 18px; height: 18px; vertical-align: middle; margin-left: 6px;
    border: 3px solid rgba(249, 115, 22, .25); border-top-color: #f97316; border-radius: 50%;
    animation: dlspin .8s linear infinite;
}
@keyframes dlspin { to { transform: rotate(360deg); } }
@media (max-width: 768px) {
    .watch-actions { justify-content: stretch; }
    .btn-download { width: 100%; justify-content: center; }
}

/* ===== Report "not working" ===== */
.watch-actions { gap: 10px; align-items: center; }
.btn-report {
    cursor: pointer; border-radius: 12px; padding: 9px 16px;
    font-family: inherit; font-size: 14px; font-weight: 700;
    color: #fca5a5; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .45);
    transition: background .2s, color .2s;
}
.btn-report:hover { background: rgba(239, 68, 68, .22); color: #fff; }
.btn-report.done, .btn-report:disabled { color: #86efac; border-color: rgba(34, 197, 94, .45); background: rgba(34, 197, 94, .1); cursor: default; }
.report-card { text-align: center; }
.report-card .report-icon { font-size: 46px; margin-bottom: 6px; }
.report-card p { color: #cbd5e1; font-size: 15px; line-height: 1.9; margin-bottom: 8px; }
.report-card .report-tip { color: #94a3b8; font-size: 13px; }
.report-card .report-ok { margin-top: 10px; padding: 9px 40px; }
@media (max-width: 768px) {
    .watch-actions { flex-wrap: nowrap; }
    .btn-report { flex-shrink: 0; padding: 10px 12px; font-size: 13px; }
}

/* ===== Servers row: one line on phones ===== */
.servers-label .label-short { display: none; }
@media (max-width: 768px) {
    .servers { gap: 6px; padding: 10px; flex-wrap: wrap; }
    .servers-label { font-size: 12.5px; margin-left: 2px; flex-shrink: 0; white-space: nowrap; }
    .servers-label .label-long { display: none; }
    .servers-label .label-short { display: inline; }
    .server-btn {
        flex: 1 1 0;
        min-width: 0;
        padding: 5px 4px;
        font-size: 12.5px;
        border-width: 1.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .server-msg { flex-basis: 100%; font-size: 12px; }
}
@media (max-width: 360px) {
    .server-btn { font-size: 11.5px; padding: 4px 2px; }
    .servers-label { font-size: 11.5px; }
}

/* ===== "👥 شاهد مع صديق" ===== */
.btn-together {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer; text-decoration: none; font-family: inherit;
    padding: 11px 22px; border-radius: 12px; font-weight: 700; font-size: 15px;
    color: #e0e7ff; background: rgba(99, 102, 241, .22); border: 1px solid rgba(129, 140, 248, .6);
    backdrop-filter: blur(6px); transition: background .2s, transform .2s;
}
.btn-together:hover { background: rgba(99, 102, 241, .4); color: #fff; transform: translateY(-2px); }
.watch-actions .btn-together { padding: 9px 16px; font-size: 14px; margin-left: auto; }
.su-wrap { margin-right: 10px; }
@media (max-width: 768px) {
    .hero-slider .btn-together { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
    .watch-actions { flex-wrap: wrap; }
    .watch-actions .btn-together { flex: 1 1 100%; justify-content: center; margin-left: 0; }
    .su-wrap { margin-right: 0; }
}

/* ===== Site-wide search results: channels + people ===== */
.sr-channels { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.sr-channel {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; text-align: center;
    background: rgba(15, 23, 42, .6); border: 2px solid rgba(51, 65, 85, .5); border-radius: 14px; transition: border-color .2s, transform .2s;
}
.sr-channel:hover { border-color: rgba(249, 115, 22, .7); transform: translateY(-3px); }
.sr-logo { width: 72px; height: 72px; border-radius: 12px; background: #1e293b center/contain no-repeat; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.sr-name { font-weight: 800; font-size: 14px; }
.sr-sub { font-size: 11.5px; color: #94a3b8; }
.sr-live { font-size: 11px; font-weight: 800; color: #f87171; }
.sr-users { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sr-user {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    background: rgba(15, 23, 42, .6); border: 1px solid rgba(51, 65, 85, .5); border-radius: 14px; transition: border-color .2s;
}
.sr-user:hover { border-color: rgba(249, 115, 22, .6); }
.sr-avatar { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: rgba(249, 115, 22, .2) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fb923c; border: 2px solid #ea580c; }
.sr-uname { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sr-uname b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-uname small { color: #94a3b8; font-size: 12px; direction: ltr; text-align: right; }
.sr-tag { font-size: 11px; font-weight: 700; color: #a5b4fc; background: rgba(99, 102, 241, .2); border-radius: 6px; padding: 1px 8px; }
@media (max-width: 768px) {
    .sr-channels { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .sr-logo { width: 56px; height: 56px; }
    .sr-channel { padding: 10px 6px; }
    .sr-users { grid-template-columns: 1fr; }
}

/* ===== Home page (sawavibe.com) ===== */
.home-tv { max-width: 980px; margin: 0 auto 34px; }
.home-tv-player {
    position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden;
    border: 5px solid rgba(251, 109, 7, .93); border-radius: 16px 16px 0 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
}
.home-tv-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.home-tv-info {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: rgba(15, 23, 42, .85); border: 5px solid rgba(251, 109, 7, .93); border-top: 0; border-radius: 0 0 16px 16px;
}
.home-tv-logo { width: 48px; height: 48px; flex-shrink: 0; border-radius: 10px; background: #1e293b center/contain no-repeat; }
.home-tv-text { flex: 1; min-width: 0; }
.home-tv-name { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-live { color: #f87171; font-size: 12px; font-weight: 800; margin-left: 4px; }
.home-tv-desc { color: #94a3b8; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-tv-together { flex-shrink: 0; }
.home-tv-together .btn-together { padding: 8px 14px; font-size: 13.5px; }
.home-channels {
    display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: 10px;
    overflow-x: auto; padding: 14px 4px 10px; scroll-snap-type: x proximity;
    scrollbar-width: thin; scrollbar-color: rgba(249, 115, 22, .5) transparent;
}
.home-channels::-webkit-scrollbar { height: 6px; }
.home-channels::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .5); border-radius: 6px; }
.home-ch {
    scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 10px 6px; border-radius: 14px; text-align: center;
    background: rgba(30, 41, 59, .6); border: 2px solid rgba(51, 65, 85, .5); transition: border-color .2s, transform .2s;
}
.home-ch:hover { border-color: rgba(249, 115, 22, .6); transform: translateY(-2px); }
.home-ch.active { border-color: #f97316; background: rgba(249, 115, 22, .15); }
.home-ch-logo { width: 64px; height: 64px; border-radius: 10px; background: #0f172a center/contain no-repeat; display: flex; align-items: center; justify-content: center; font-size: 28px; }
.home-ch-name { font-size: 12.5px; font-weight: 700; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-tv-all { text-align: center; margin-top: 6px; }
.home-cat-row { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s ease; }
.home-cat-row.shown { opacity: 1; transform: none; }
@media (max-width: 768px) {
    .home-tv { margin-bottom: 26px; }
    .home-tv-player { border-width: 3px; border-radius: 12px 12px 0 0; margin: 0 -6px; }
    .home-tv-info { border-width: 3px; border-radius: 0 0 12px 12px; margin: 0 -6px; padding: 10px; gap: 10px; flex-wrap: wrap; }
    .home-tv-logo { width: 38px; height: 38px; }
    .home-tv-name { font-size: 15px; }
    .home-tv-together { flex-basis: 100%; }
    .home-tv-together .btn-together { width: 100%; justify-content: center; }
    .home-channels { grid-auto-columns: 88px; gap: 8px; }
    .home-ch-logo { width: 50px; height: 50px; }
    .home-ch-name { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) { .home-cat-row { transition: none; } }

/* ===== Home page v2: one width for everything + one thin box around the TV ===== */
.page.home { max-width: calc(980px + 80px); }            /* content = 980px, same as the TV box */
.home-tv {
    max-width: none; margin: 0 0 34px;
    border: 2px solid rgba(251, 109, 7, .85); border-radius: 16px; overflow: hidden;
    background: rgba(15, 23, 42, .7); box-shadow: 0 18px 45px rgba(0, 0, 0, .4);
}
.home-tv-player { border: 0; border-radius: 0; box-shadow: none; }
.home-tv-info {
    border: 0; border-radius: 0; background: rgba(15, 23, 42, .9);
    border-bottom: 1px solid rgba(51, 65, 85, .6);
}
.home-channels { padding: 12px 12px 8px; }
.home-tv-all { margin: 0; padding: 4px 12px 14px; }
@media (max-width: 768px) {
    .page.home { max-width: none; }
    .home-tv { margin: 0 -6px 26px; border-width: 2px; border-radius: 12px; }
    .home-tv-player, .home-tv-info { margin: 0; border: 0; border-radius: 0; }
    .home-tv-info { border-bottom: 1px solid rgba(51, 65, 85, .6); }
    .home-channels { padding: 10px 8px 6px; }
    .home-tv-all { padding: 4px 8px 12px; }
}

/* ===== Home page: 9 movie-category boxes across on desktop (the rest scroll) ===== */
@media (min-width: 769px) {
    .page.home .cat-slider {
        grid-auto-columns: calc((100% - 8 * 10px - 12px) / 9);   /* 9 boxes + 8 gaps fill the width */
        gap: 10px;
    }
    .page.home .cat-box { height: 104px; border-radius: 14px; gap: 4px; }
    .page.home .cat-icon { font-size: 30px; }
    .page.home .cat-name { font-size: 13px; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .page.home .cat-count { font-size: 10px; padding: 0 8px; }
}

/* ===== Home page: category boxes per row – 9 (wide desktop), 6 (smaller windows, tablets, phones) ===== */
.home-cat-tools { display: flex; align-items: center; gap: 10px; }
@media (max-width: 1059px) {
    .page.home .cat-slider { grid-auto-columns: calc((100% - 5 * 10px - 12px) / 6); gap: 10px; }
    .page.home .cat-box { height: 100px; }
}
@media (max-width: 768px) {
    /* phones: 6 compact boxes (icon + short name) */
    .page.home .cat-slider { grid-auto-columns: calc((100% - 5 * 6px - 12px) / 6); gap: 6px; }
    .page.home .cat-box { height: 70px; border-radius: 10px; gap: 2px; padding: 0 2px; }
    .page.home .cat-icon { font-size: 22px; }
    .page.home .cat-name { font-size: 10px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0; }
    .page.home .cat-count { display: none; }
    .page.home .cat-box:hover { transform: none; }
}

/* ===================== مسلسلات (series) ===================== */
.series-count {
    position: absolute; left: 8px; right: 8px; bottom: 8px; text-align: center;
    background: rgba(10, 22, 40, .85); border: 1px solid rgba(20, 184, 166, .5); color: #5eead4;
    font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 7px; backdrop-filter: blur(4px);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Latest episodes row */
.ep-row { grid-auto-columns: 230px; }
.ep-card { display: block; scroll-snap-align: start; }
.ep-card-img {
    position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
    background: #1e293b center 22% / cover no-repeat; border: 2px solid rgba(51, 65, 85, .5);
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s, border-color .25s, box-shadow .25s;
}
.ep-card:hover .ep-card-img { transform: scale(1.04); border-color: rgba(249, 115, 22, .8); box-shadow: 0 14px 30px rgba(234, 88, 12, .25); }
.ep-card:hover .play-hover { opacity: 1; }
.ep-card-num {
    position: absolute; top: 8px; right: 8px; background: #ea580c; color: #fff;
    font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; box-shadow: 0 3px 10px rgba(0,0,0,.4);
}
.ep-card-sub { color: #94a3b8; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Watch page: the episode being watched + previous / next */
.ep-now { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ep-now-badge {
    display: inline-block; font-size: 13px; font-weight: 800; color: #5eead4;
    background: rgba(20, 184, 166, .14); border: 1px solid rgba(20, 184, 166, .45); padding: 2px 12px; border-radius: 999px;
}
.ep-now-title { font-size: 22px; font-weight: 800; line-height: 1.4; margin-top: 4px; }
.ep-now-title small { font-size: 15px; color: #cbd5e1; font-weight: 700; margin-right: 6px; }
.ep-nav { display: flex; gap: 8px; }
.ep-nav-btn {
    padding: 8px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; white-space: nowrap;
    background: rgba(30, 41, 59, .8); border: 2px solid rgba(51, 65, 85, .7); transition: border-color .2s, background .2s;
}
.ep-nav-btn:hover { border-color: rgba(249, 115, 22, .7); }
.ep-nav-btn.next { background: linear-gradient(135deg, #f97316, #ea580c); border-color: transparent; }
.ep-nav-btn.next:hover { box-shadow: 0 8px 20px rgba(234, 88, 12, .45); }

/* "Next episode" after an episode ends */
.next-ep-overlay {
    position: absolute; inset: 0; z-index: 5; display: flex; align-items: center; justify-content: center;
    background: rgba(2, 6, 23, .82); backdrop-filter: blur(3px); padding: 16px;
}
.next-ep-overlay[hidden] { display: none; }
.next-ep-card { text-align: center; max-width: 420px; }
.next-ep-label { color: #cbd5e1; font-size: 15px; font-weight: 700; }
.next-ep-label b { color: #fb923c; font-size: 20px; }
.next-ep-name { font-size: 20px; font-weight: 800; margin: 8px 0 16px; }
.next-ep-actions { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.next-ep-cancel {
    background: transparent; color: #e2e8f0; border: 2px solid rgba(148, 163, 184, .5); border-radius: 999px;
    padding: 9px 22px; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer;
}
.next-ep-cancel:hover { border-color: #fff; }

/* Seasons + episode list */
.seasons-box {
    margin-top: 20px; background: rgba(15, 23, 42, .6); border: 1px solid rgba(51, 65, 85, .5);
    border-radius: 16px; padding: 16px 18px;
}
.seasons-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.seasons-head h2 { font-size: 19px; font-weight: 800; }
.seasons-total { color: #94a3b8; font-size: 13px; font-weight: 700; }
.season-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: thin; }
.season-tab {
    flex-shrink: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.35;
    background: rgba(30, 41, 59, .8); color: #fff; border: 2px solid rgba(51, 65, 85, .6); border-radius: 10px;
    padding: 6px 16px; font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer; transition: all .2s;
}
.season-tab small { font-size: 11px; font-weight: 600; color: #94a3b8; }
.season-tab:hover { border-color: rgba(249, 115, 22, .6); }
.season-tab.active { background: rgba(249, 115, 22, .2); border-color: #f97316; color: #fb923c; }
.season-tab.active small { color: #fdba74; }
.season-title { color: #cbd5e1; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.ep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.ep-list[hidden] { display: none; }
.ep-item {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
    background: rgba(30, 41, 59, .55); border: 1px solid rgba(51, 65, 85, .6); transition: border-color .2s, background .2s;
}
a.ep-item:hover { border-color: rgba(249, 115, 22, .7); background: rgba(30, 41, 59, .9); }
.ep-item.current { border-color: #f97316; background: rgba(249, 115, 22, .16); }
.ep-item.soon { opacity: .5; }
.ep-num {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .9); border: 1px solid rgba(249, 115, 22, .35); color: #fb923c; font-weight: 800; font-size: 15px;
}
.ep-item.current .ep-num { background: #ea580c; color: #fff; border-color: #ea580c; }
.ep-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.ep-text b { font-size: 14px; }
.ep-text small { color: #94a3b8; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-state { color: #fb923c; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ep-empty { color: #94a3b8; font-size: 14px; padding: 10px 0; }

@media (max-width: 768px) {
    .ep-row { grid-auto-columns: 180px; }
    .ep-now-title { font-size: 18px; }
    .ep-nav { width: 100%; }
    .ep-nav-btn { flex: 1; text-align: center; padding: 8px 10px; font-size: 13px; }
    .seasons-box { padding: 14px 12px; }
    .ep-list { grid-template-columns: 1fr 1fr; max-height: 360px; }
    .next-ep-name { font-size: 16px; margin: 4px 0 10px; }
}
@media (max-width: 480px) {
    .ep-list { grid-template-columns: 1fr; }
    .series-count { font-size: 10px; }
}

/* ===== Home page: channels box without the player (a click opens /tv/ playing that channel) ===== */
.home-tv-channels { padding-top: 4px; }
.home-tv-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px 0; }
.home-tv-head .section-title { font-size: 19px; }
.home-tv-head .home-live { font-size: 12px; margin-right: 2px; }
.home-tv-channels .home-channels { padding: 12px 14px 16px; }
.home-ch-logo { position: relative; overflow: hidden; }
.home-ch-play {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: 3px;
    background: rgba(234, 88, 12, .78); color: #fff; font-size: 22px; opacity: 0; transition: opacity .2s;
}
.home-ch:hover .home-ch-play, .home-ch:focus-visible .home-ch-play { opacity: 1; }
@media (max-width: 768px) {
    .home-tv-head { padding: 10px 10px 0; }
    .home-tv-head .section-title { font-size: 16px; }
    .home-tv-channels .home-channels { padding: 10px 10px 12px; }
}

/* ===== Series watch page: orange scroll bar for the episode list (and the season tabs) ===== */
.ep-list {
    padding: 2px 2px 2px 10px;            /* room between the episodes and the bar (on the left in RTL) */
    scrollbar-width: thin;
    scrollbar-color: #f97316 rgba(15, 23, 42, .6);
    overscroll-behavior: contain;
}
.ep-list::-webkit-scrollbar { width: 8px; }
.ep-list::-webkit-scrollbar-track { background: rgba(15, 23, 42, .6); border-radius: 8px; }
.ep-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #fb923c, #ea580c); border-radius: 8px; border: 2px solid rgba(15, 23, 42, .6); }
.ep-list::-webkit-scrollbar-thumb:hover { background: #f97316; }
.season-tabs { scrollbar-color: #f97316 transparent; }
.season-tabs::-webkit-scrollbar { height: 6px; }
.season-tabs::-webkit-scrollbar-thumb { background: rgba(249, 115, 22, .7); border-radius: 6px; }

/* ===== "💬 تعليق": comments box under the player ===== */
.btn-comment {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-family: inherit;
    border-radius: 12px; padding: 9px 18px; font-size: 15px; font-weight: 800;
    color: #fff; background: rgba(20, 184, 166, .18); border: 1px solid rgba(45, 212, 191, .6);
    transition: background .2s, transform .2s;
}
.btn-comment:hover, .btn-comment.open { background: rgba(20, 184, 166, .35); transform: translateY(-2px); }
.btn-comment small { color: #99f6e4; font-size: 13px; }
.mc-box {
    margin-top: 16px; padding: 16px; border-radius: 16px; background: rgba(17, 28, 46, .85);
    border: 1px solid rgba(45, 212, 191, .35); animation: mcIn .25s ease;
}
.mc-box[hidden] { display: none; }
@keyframes mcIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mc-head h2 { font-size: 18px; font-weight: 800; }
.mc-count { min-width: 26px; padding: 1px 9px; border-radius: 999px; background: rgba(45, 212, 191, .18); color: #99f6e4; font-weight: 800; font-size: 13px; text-align: center; }
.mc-list { display: flex; flex-direction: column; gap: 10px; max-height: 560px; overflow-y: auto; padding-left: 4px; }
.mc-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(30, 41, 59, .7); border: 1px solid rgba(51, 65, 85, .7); }
.mc-item.new { animation: mcNew 1.6s ease; }
@keyframes mcNew { 0% { background: rgba(249, 115, 22, .35); border-color: #f97316; } 100% { background: rgba(30, 41, 59, .7); } }
.mc-av {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ea580c, #f97316); color: #fff; font-weight: 800; font-size: 17px; text-decoration: none;
    border: 2px solid rgba(249, 115, 22, .55);
}
.mc-av img { width: 100%; height: 100%; object-fit: cover; }
.mc-body { min-width: 0; flex: 1; }
.mc-name { color: #fb923c; font-weight: 800; font-size: 14.5px; text-decoration: none; }
.mc-name:hover { text-decoration: underline; }
.mc-text { color: #e2e8f0; font-size: 14.5px; line-height: 1.75; margin-top: 2px; overflow-wrap: anywhere; }
.mc-when { color: #94a3b8; font-size: 11.5px; margin-top: 4px; }
.mc-empty { color: #94a3b8; text-align: center; padding: 14px 6px; }
.mc-empty[hidden] { display: none; }
.mc-foot { margin-top: 14px; display: flex; justify-content: center; }
.mc-write, .mc-login {
    display: inline-flex; align-items: center; gap: 7px; cursor: pointer; text-decoration: none; font-family: inherit;
    border: 0; border-radius: 12px; padding: 10px 26px; font-size: 15px; font-weight: 800; color: #fff;
    background: linear-gradient(90deg, #ea580c, #f97316); box-shadow: 0 8px 22px rgba(234, 88, 12, .35);
}
.mc-login { background: rgba(255, 255, 255, .08); border: 1px solid rgba(249, 115, 22, .6); box-shadow: none; }
.mc-modal {
    position: fixed; inset: 0; z-index: 210; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(5, 10, 20, .75); backdrop-filter: blur(4px); opacity: 1; transition: opacity .35s ease;
}
.mc-modal[hidden] { display: none; }
.mc-modal.fade { opacity: 0; }
.mc-card {
    position: relative; width: 100%; max-width: 480px; background: #111c2e; border: 1px solid rgba(249, 115, 22, .4);
    border-radius: 18px; padding: 22px; box-shadow: 0 25px 60px rgba(0, 0, 0, .55);
}
.mc-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 12px; }
.mc-close {
    position: absolute; top: 14px; left: 14px; width: 32px; height: 32px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; font-size: 15px;
}
.mc-card textarea {
    width: 100%; resize: vertical; min-height: 110px; padding: 12px; border-radius: 12px; font-family: inherit; font-size: 15px; line-height: 1.7;
    color: #fff; background: #0b1424; border: 1px solid rgba(51, 65, 85, .9); outline: none;
}
.mc-card textarea:focus { border-color: #f97316; }
.mc-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mc-left { color: #64748b; font-size: 12px; }
.mc-err { flex: 1; color: #fca5a5; font-size: 13px; font-weight: 600; }
.mc-add {
    margin-right: auto; cursor: pointer; border: 0; border-radius: 12px; padding: 10px 30px; font-family: inherit; font-size: 15px; font-weight: 800;
    color: #fff; background: linear-gradient(90deg, #ea580c, #f97316);
}
.mc-add:disabled { opacity: .6; cursor: default; }
.mc-note { margin-top: 10px; color: #94a3b8; font-size: 12px; }
@media (max-width: 768px) {
    .btn-comment { flex-shrink: 0; padding: 10px 12px; font-size: 13.5px; }
    .mc-box { padding: 12px; }
    .mc-list { max-height: none; }
}

/* 🗑 delete your own comment */
.mc-item { position: relative; transition: opacity .3s, transform .3s; }
.mc-item.gone { opacity: 0; transform: translateX(20px); }
.mc-del {
    flex-shrink: 0; align-self: flex-start; width: 32px; height: 32px; border-radius: 9px; cursor: pointer; font-size: 15px;
    border: 1px solid rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .1); color: #fca5a5; transition: background .2s;
}
.mc-del:hover { background: rgba(239, 68, 68, .28); }
.mc-del-card { text-align: center; max-width: 380px; }
.mc-del-icon { font-size: 40px; margin-bottom: 4px; }
.mc-del-card .mc-err { display: block; margin-top: 6px; }
.mc-del-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.mc-del-btns .mc-add { margin: 0; background: linear-gradient(90deg, #dc2626, #ef4444); }

/* ===== ⏯ Continue watching (home page, under the live channels) ===== */
.home-continue { margin-top: 18px; }
.home-continue[hidden] { display: none; }
.cw-row {
    display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px;
    /* Orange scroll bar (Chrome / Edge / Firefox use these two; without the color they draw the default white bar) */
    scrollbar-width: thin; scrollbar-color: #f97316 rgba(255, 255, 255, .08);
}
.cw-row::-webkit-scrollbar { height: 6px; }
.cw-row::-webkit-scrollbar-track { background: rgba(255, 255, 255, .08); border-radius: 6px; }
.cw-row::-webkit-scrollbar-thumb { background: #f97316; border-radius: 6px; }
.cw-row::-webkit-scrollbar-thumb:hover { background: #fb923c; }
.cw-card { flex: 0 0 132px; display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: #fff; }
.cw-poster {
    position: relative; display: block; height: 190px; border-radius: 12px; overflow: hidden; background: #1e293b center/cover no-repeat;
    border: 1px solid rgba(51, 65, 85, .8); transition: transform .2s, border-color .2s;
}
.cw-card:hover .cw-poster { transform: translateY(-3px); border-color: #f97316; }
.cw-play {
    position: absolute; inset: 0; margin: auto; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(234, 88, 12, .9); color: #fff; font-size: 16px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.cw-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, .25); }
.cw-bar i { display: block; height: 100%; background: #f97316; }
.cw-next .cw-poster { border-color: rgba(45, 212, 191, .6); }
.cw-title { font-weight: 800; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-sub { color: #fb923c; font-size: 12px; font-weight: 700; }
.cw-label { color: #94a3b8; font-size: 11.5px; }
.cw-next .cw-label { color: #5eead4; font-weight: 700; }
@media (max-width: 600px) { .cw-card { flex-basis: 112px; } .cw-poster { height: 160px; } }

/* ===== 🔜 Coming soon (home row + /movies/upcoming.php) ===== */
.home-upcoming { margin-top: 18px; }
.up-row {
    display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px;
    scrollbar-width: thin; scrollbar-color: #f97316 rgba(255, 255, 255, .08);
}
.up-row::-webkit-scrollbar { height: 6px; }
.up-row::-webkit-scrollbar-track { background: rgba(255, 255, 255, .08); border-radius: 6px; }
.up-row::-webkit-scrollbar-thumb { background: #f97316; border-radius: 6px; }
.up-row .up-card { flex: 0 0 140px; }
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; margin-top: 10px; }
.up-card { display: flex; flex-direction: column; gap: 3px; text-decoration: none; color: #fff; }
.up-poster {
    position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: #1e293b center/cover no-repeat;
    border: 1px solid rgba(51, 65, 85, .8); transition: transform .2s, border-color .2s;
}
.up-card:hover .up-poster { transform: translateY(-3px); border-color: #f97316; }
.up-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.up-plat {
    position: absolute; top: 8px; right: 8px; padding: 2px 10px; border-radius: 999px; color: #fff;
    font-size: 11.5px; font-weight: 800; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); max-width: calc(100% - 16px);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-cd {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; text-align: center; font-size: 12.5px; font-weight: 800;
    background: linear-gradient(transparent, rgba(0, 0, 0, .88)); color: #fdba74;
}
.up-now .up-cd { color: #86efac; }
.up-title { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-date { color: #94a3b8; font-size: 12px; }
.up-modal {
    position: fixed; inset: 0; z-index: 220; display: flex; align-items: center; justify-content: center; padding: 16px;
    background: rgba(5, 10, 20, .78); backdrop-filter: blur(4px);
}
.up-modal[hidden] { display: none; }
.up-mcard {
    position: relative; width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: #111c2e;
    border: 1px solid rgba(249, 115, 22, .4); border-radius: 18px; padding: 22px; box-shadow: 0 25px 60px rgba(0, 0, 0, .55);
}
.up-mclose {
    position: absolute; top: 14px; left: 14px; width: 32px; height: 32px; border-radius: 50%; border: 0; z-index: 2;
    background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; font-size: 15px;
}
.up-mtop { display: flex; gap: 16px; align-items: flex-start; }
.up-mposter {
    flex: 0 0 130px; aspect-ratio: 2 / 3; border-radius: 12px; background: #1e293b center/cover no-repeat;
    display: flex; align-items: center; justify-content: center; font-size: 40px; border: 1px solid rgba(249, 115, 22, .35);
}
.up-minfo { flex: 1; min-width: 0; padding-top: 4px; }
.up-minfo .up-plat { position: static; display: inline-block; }
.up-minfo h2 { font-size: 21px; font-weight: 800; margin: 8px 0 6px; }
.up-mdate { color: #fdba74; font-weight: 700; }
.up-mcd { color: #94a3b8; font-size: 14px; margin-top: 2px; }
.up-msec { margin-top: 16px; }
.up-msec[hidden] { display: none; }
.up-msec h3 { color: #fb923c; font-size: 16px; margin-bottom: 8px; }
.up-msec p { color: #cbd5e1; line-height: 1.9; font-size: 14.5px; white-space: pre-line; }
.up-cast { display: flex; flex-wrap: wrap; gap: 6px; }
.up-cast span { padding: 4px 12px; border-radius: 999px; background: rgba(30, 41, 59, .9); border: 1px solid rgba(51, 65, 85, .9); font-size: 13px; }
@media (max-width: 600px) {
    .up-row .up-card { flex-basis: 118px; }
    .up-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
    .up-mposter { flex-basis: 100px; }
    .up-minfo h2 { font-size: 18px; }
}

/* ===== 🔜 A coming-soon movie's page (/movies/soon/<name>) ===== */
.soon-hero {
    position: relative; display: flex; gap: 24px; align-items: flex-start; padding: 24px; margin-top: 10px; border-radius: 20px; overflow: hidden;
    background: #0f172a; border: 1px solid rgba(249, 115, 22, .35); isolation: isolate;
}
.soon-hero::before {
    content: ''; position: absolute; inset: -30px; z-index: -1; background: var(--soon-bg, none) center/cover no-repeat;
    filter: blur(28px) brightness(.35); transform: scale(1.1);
}
.soon-poster {
    flex: 0 0 240px; aspect-ratio: 2 / 3; border-radius: 16px; background: #1e293b center/cover no-repeat; display: flex; align-items: center; justify-content: center;
    font-size: 60px; border: 2px solid rgba(249, 115, 22, .5); box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
}
.soon-info { flex: 1; min-width: 0; padding-top: 6px; }
.soon-kind { display: inline-block; padding: 3px 14px; border-radius: 999px; background: rgba(249, 115, 22, .2); color: #fdba74; font-weight: 800; font-size: 13px; }
.soon-info h1 { font-size: 34px; font-weight: 800; margin: 10px 0 12px; line-height: 1.3; }
.soon-plat { display: inline-block; padding: 5px 16px; border-radius: 999px; color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.soon-when { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.soon-date, .soon-cd { padding: 10px 18px; border-radius: 14px; background: rgba(15, 23, 42, .75); border: 1px solid rgba(51, 65, 85, .9); }
.soon-date small, .soon-cd small { display: block; color: #94a3b8; font-size: 12px; font-weight: 700; }
.soon-date b { color: #fdba74; font-size: 17px; }
.soon-cd b { color: #fff; font-size: 17px; }
.soon-cd.now b { color: #86efac; }
.soon-share {
    margin-top: 18px; cursor: pointer; border: 0; border-radius: 12px; padding: 10px 24px; font-family: inherit; font-size: 15px; font-weight: 800; color: #fff;
    background: linear-gradient(90deg, #ea580c, #f97316); box-shadow: 0 8px 22px rgba(234, 88, 12, .35);
}
.soon-sec { margin-top: 20px; padding: 18px 20px; border-radius: 16px; background: rgba(17, 28, 46, .85); border: 1px solid rgba(51, 65, 85, .8); }
.soon-sec h2 { color: #fb923c; font-size: 19px; font-weight: 800; margin-bottom: 10px; }
.soon-sec p { color: #cbd5e1; line-height: 2; font-size: 15.5px; }
.soon-sec .up-cast span { font-size: 14px; padding: 5px 14px; }
@media (max-width: 768px) {
    .soon-hero { flex-direction: column; align-items: center; text-align: center; padding: 18px; }
    .soon-poster { flex-basis: auto; width: 200px; }
    .soon-info h1 { font-size: 24px; }
    .soon-when { justify-content: center; }
}

/* ===== Category boxes: look from "🎨 التصميم" (control panel) ===== */
.cat-box[data-noglow]::before { display: none; }
.cat-icon .cat-img { width: 54px; height: 54px; object-fit: contain; display: block; }
.cat-img-title { width: 26px; height: 26px; object-fit: contain; vertical-align: middle; }
.wp-cat-img { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; }
@media (max-width: 768px) { .cat-icon .cat-img { width: 42px; height: 42px; } }
