/**
 * ArabSeed Single Movie, Series & Episode Dedicated Styles
 */

/* 1. Hero Movie/Series Header */
.as-movie-hero {
    position: relative;
    background-size: cover;
    background-position: center top;
    padding: 30px 0 50px;
    border-bottom: 1px solid var(--as-border-color);
}

.as-movie-header-grid {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.as-movie-poster-col {
    width: 280px;
    flex-shrink: 0;
}

.as-movie-poster-wrap {
    position: relative;
    border-radius: var(--as-radius-md);
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: #141720;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.as-main-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.as-badge-floating-quality {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--as-primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.as-movie-info-col {
    flex: 1;
}

.as-movie-title {
    font-size: 34px;
    font-weight: 900;
    line-height: 1.3;
    color: #fff;
    margin-bottom: 6px;
}

.as-movie-orig-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--as-text-muted);
    margin-bottom: 18px;
    direction: ltr;
    display: inline-block;
}

/* Meta Pills Row */
.as-meta-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.as-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--as-bg-surface);
    border: 1px solid var(--as-border-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
}

.as-meta-pill .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--as-text-muted);
}

.as-pill-imdb {
    background: rgba(245, 197, 24, 0.15);
    border-color: rgba(245, 197, 24, 0.3);
    color: var(--as-accent-gold);
}

.as-pill-imdb .dashicons {
    color: var(--as-accent-gold);
}

/* Specs Table */
.as-movie-specs {
    margin-bottom: 22px;
    background: rgba(20, 24, 36, 0.6);
    border: 1px solid var(--as-border-color);
    border-radius: var(--as-radius-md);
    padding: 16px;
}

.as-spec-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

.as-spec-row:last-child {
    border-bottom: none;
}

.as-spec-label {
    width: 130px;
    font-weight: 700;
    color: var(--as-text-muted);
    flex-shrink: 0;
}

.as-spec-val {
    flex: 1;
    color: #e2e8f0;
}

.as-spec-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px 4px 2px 0;
    color: #fff;
}

.as-spec-tag:hover {
    background: var(--as-primary);
    color: #fff;
}

.as-star-link {
    color: #38bdf8;
}

.as-star-link:hover {
    text-decoration: underline;
}

/* Storyline */
.as-movie-storyline {
    margin-bottom: 25px;
}

.as-movie-storyline h3 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
}

.as-story-text {
    font-size: 15px;
    color: #cbd5e1;
    line-height: 1.8;
}

/* Action Buttons */
.as-movie-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.as-movie-action-buttons .as-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.as-movie-action-buttons .as-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.as-movie-action-buttons .as-btn-primary {
    background: linear-gradient(135deg, #e50914 0%, #b91c1c 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.38);
}

.as-movie-action-buttons .as-btn-secondary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
}

/* 2. Streaming Servers Switcher */
.as-media-body {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* ==========================================================================
   Player & Streaming Servers Section (Multi-Player)
   ========================================================================== */
.as-player-section {
    background: #0f1623;
    border: 1px solid #1e293b;
    border-radius: var(--as-radius-lg);
    padding: 24px;
    margin-bottom: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    position: relative;
    display: flex;
    flex-direction: column;
}

.as-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.as-header-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.as-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.as-section-title .dashicons {
    color: var(--as-primary);
    font-size: 22px;
}

.as-player-subtext {
    font-size: 13px;
    color: var(--as-text-muted);
}

.as-header-meta-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

.as-badge-counter {
    background: rgba(255, 255, 255, 0.08);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.as-badge-counter .dashicons {
    color: var(--as-primary);
    font-size: 15px;
}

.as-badge-live-quality {
    background: linear-gradient(135deg, #e50914, #b20710);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(229, 9, 20, 0.35);
}

/* 1. Servers Selector Bar (Desktop & Mobile: Strictly On Top) */
.as-servers-bar {
    order: 1;
    margin-bottom: 16px;
    background: #141c2c;
    border: 1px solid #1e293b;
    border-radius: var(--as-radius-md);
    padding: 16px 18px;
}

.as-servers-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.as-servers-bar-label {
    font-size: 14px;
    font-weight: 700;
    color: #f1f5f9;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.as-servers-bar-label .dashicons {
    color: var(--as-primary);
    font-size: 16px;
}

.as-servers-count-hint {
    font-size: 12px;
    color: var(--as-text-muted);
}

.as-servers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.as-server-tab {
    display: block;
}

.as-server-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #0d1522;
    border: 1px solid #232f45;
    border-radius: var(--as-radius-sm);
    color: #cbd5e1;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    outline: none;
    gap: 8px;
}

.as-server-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    flex-shrink: 0;
}

.as-server-main-info {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.as-server-icon {
    color: #64748b;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    transition: color 0.2s;
}

.as-server-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.as-server-btn:hover {
    background: #192438;
    color: #fff;
    border-color: rgba(229, 9, 20, 0.6);
    transform: translateY(-1px);
}

.as-server-btn:hover .as-server-icon {
    color: var(--as-primary);
}

.as-server-tab.active .as-server-btn {
    background: linear-gradient(135deg, #e50914 0%, #b20710 100%);
    border-color: #ff3344;
    color: #fff;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.45);
}

.as-server-tab.active .as-server-num {
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}

.as-server-tab.active .as-server-icon {
    color: #fff;
}

.as-server-badge {
    font-size: 10px;
    padding: 3px 7px;
    border-radius: 4px;
    font-weight: 700;
    flex-shrink: 0;
}

.as-server-badge.badge-vip {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.as-server-tab.active .as-server-badge.badge-vip {
    background: #000;
    color: #fbbf24;
}

.as-server-badge.badge-primary {
    background: rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
}

.as-server-tab.active .as-server-badge.badge-primary {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
}

.as-server-badge.badge-external {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.as-server-badge.badge-fast {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

/* 2. Active Server Status Bar */
.as-active-server-status {
    order: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: #0b111c;
    border: 1px solid #1e293b;
    border-radius: var(--as-radius-md);
    padding: 10px 18px;
    margin-bottom: 16px;
    color: var(--as-text-muted);
    font-size: 13px;
}

.as-status-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.as-active-server-status strong {
    color: #f1f5f9;
    font-weight: 700;
}

.as-active-server-status .dashicons {
    color: var(--as-primary);
    font-size: 15px;
    vertical-align: middle;
    margin-inline-end: 4px;
}

.as-status-sep {
    color: rgba(255, 255, 255, 0.2);
}

.as-status-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.as-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #141c2c;
    border: 1px solid #232f45;
    color: #cbd5e1;
    padding: 4px 10px;
    border-radius: var(--as-radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.as-status-btn:hover {
    background: var(--as-primary);
    border-color: var(--as-primary);
    color: #fff;
}

/* 3. Cinema Video Screen Container */
.as-player-container {
    order: 3;
    border-radius: var(--as-radius-md);
    overflow: hidden;
    background: #000;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid #1e293b;
    position: relative;
}

.as-player-screen {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    width: 100%;
}

.as-player-screen iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2;
}

.as-player-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(11, 15, 25, 0.94);
    color: #fff;
    font-weight: 700;
    gap: 14px;
    z-index: 3;
}

.as-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--as-primary);
    border-radius: 50%;
    animation: as-spin 0.8s linear infinite;
}

.as-loader-text {
    font-size: 14px;
    color: #cbd5e1;
}

.as-player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1522;
    padding: 25px;
    text-align: center;
    z-index: 2;
}

.as-placeholder-inner {
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.as-placeholder-icon {
    font-size: 46px;
    width: 46px;
    height: 46px;
    color: var(--as-primary);
}

.as-placeholder-inner h3 {
    font-size: 18px;
    color: #fff;
    margin: 0;
    font-weight: 800;
}

.as-placeholder-inner p {
    font-size: 13px;
    color: var(--as-text-muted);
    margin: 0;
    line-height: 1.6;
}

/* 4. Player Toolbar */
.as-player-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: #0b111c;
    border-top: 1px solid #1e293b;
    flex-wrap: wrap;
    gap: 12px;
}

.as-toolbar-left {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.as-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #141c2c;
    border: 1px solid #232f45;
    color: #cbd5e1;
    padding: 7px 14px;
    border-radius: var(--as-radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.as-tool-btn .dashicons {
    font-size: 15px;
}

.as-tool-btn:hover {
    background: var(--as-primary);
    color: #fff;
    border-color: var(--as-primary);
}

.as-tool-btn.active {
    background: #fbbf24;
    border-color: #f59e0b;
    color: #000;
}

.as-tip-text {
    font-size: 12px;
    color: var(--as-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.as-tip-text .dashicons {
    color: var(--as-primary);
}

/* Cinema Mode Backdrop */
.as-cinema-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9998;
    backdrop-filter: blur(4px);
}

body.as-cinema-active #watch-player {
    position: relative;
    z-index: 9999;
}

/* 3. Download Servers Section (Reference Matched - Image 2) */
.as-download-section {
    background: #0f1623;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 24px 28px;
    margin-top: 24px;
    margin-bottom: 35px;
    width: 100%;
    box-sizing: border-box;
    clear: both;
}

.as-dl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
    text-align: right;
    width: 100%;
    box-sizing: border-box;
}

.as-dl-header-right {
    flex: 1 1 auto;
    min-width: 240px;
}

.as-dl-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.as-dl-title .dashicons {
    color: #e50914;
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.as-dl-subtitle {
    font-size: 13.5px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.5;
}

.as-badge-counter {
    background: rgba(229, 9, 20, 0.12);
    color: #ef4444;
    border: 1px solid rgba(229, 9, 20, 0.25);
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Desktop Horizontal Grid: Flexible multi-column wrapping evenly */
.as-dl-servers-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    direction: rtl;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.as-dl-server-card {
    background: #141923;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px 14px 14px;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    min-height: 125px;
    width: 100% !important;
    max-width: 100% !important;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.as-dl-server-card:hover {
    background: #1a2232;
    border-color: #e50914;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(229, 9, 20, 0.2);
}

.as-dl-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    direction: rtl;
}

.as-dl-host-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(229, 9, 20, 0.12);
    color: #ef4444;
    transition: transform 0.2s ease;
}

.as-dl-server-card:hover .as-dl-host-icon {
    transform: scale(1.05);
}

.as-host-mediafire .as-dl-host-icon { background: rgba(0, 114, 255, 0.15); color: #38bdf8; }
.as-host-cloud .as-dl-host-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.as-host-drive .as-dl-host-icon { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.as-host-file .as-dl-host-icon { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.as-host-down .as-dl-host-icon { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.as-host-mixdrop .as-dl-host-icon { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

.as-dl-host-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
    text-align: right;
}

.as-dl-host-name {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.as-dl-server-type {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    line-height: 1.2;
}

.as-dl-badge-quality {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.as-dl-card-foot {
    margin-top: auto;
}

.as-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.as-dl-server-card:hover .as-dl-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.55);
}

.as-dl-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.as-dl-btn-ext {
    font-size: 12px;
    line-height: 1;
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.as-dl-server-card:hover .as-dl-btn-ext {
    transform: translate(-2px, -2px);
}

/* Legacy arrow/action text compatibility */
.as-dl-arrow {
    font-size: 22px;
    line-height: 1;
    color: #ef4444;
    margin-bottom: 12px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.as-dl-action-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1;
    transition: color 0.2s ease;
}

.as-dl-ext-arrow {
    font-size: 13px;
    line-height: 1;
    display: inline-block;
}

/* Empty State */
.as-dl-empty-state {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #94a3b8;
    direction: rtl;
    text-align: right;
}

.as-dl-empty-state .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #f59e0b;
    flex-shrink: 0;
}

.as-dl-empty-state p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: #94a3b8;
}

/* Responsive Grid for Downloads */
@media (max-width: 1200px) {
    .as-dl-servers-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 14px !important;
    }
}

@media (max-width: 992px) {
    .as-dl-servers-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
        gap: 12px !important;
    }
    .as-download-section {
        padding: 20px 18px;
    }
}

@media (max-width: 768px) {
    .as-dl-servers-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .as-download-section {
        padding: 16px 14px;
    }
    .as-dl-title {
        font-size: 19px;
    }
    .as-dl-subtitle {
        font-size: 12.5px;
    }
    .as-dl-host-name {
        font-size: 14px;
    }
    .as-dl-action-text {
        font-size: 11px;
    }
}

/* 4. Series Seasons & Episodes Switcher */
.as-seasons-wrapper {
    background: var(--as-bg-surface);
    border: 1px solid var(--as-border-color);
    border-radius: var(--as-radius-lg);
    padding: 25px;
    margin-bottom: 40px;
}

.as-season-tabs-bar {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--as-border-color);
    padding-bottom: 15px;
}

.as-season-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.as-season-tab button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--as-bg-card);
    border: 1px solid var(--as-border-color);
    color: #cbd5e1;
    font-weight: 800;
    font-size: 15px;
    padding: 10px 20px;
    border-radius: var(--as-radius-sm);
    cursor: pointer;
    transition: var(--as-transition);
}

.as-season-tab button:hover {
    background: var(--as-bg-card-hover);
    color: #fff;
}

.as-season-tab.active button {
    background: var(--as-primary);
    border-color: var(--as-primary);
    color: #fff;
}

.as-season-pane {
    display: none;
}

.as-season-pane.active {
    display: block;
    animation: as-fadeIn 0.3s ease;
}

/* 5. Episode Single Hero & Navigation */
.as-episode-hero {
    background-size: cover;
    background-position: center top;
    padding: 30px 0 40px;
    border-bottom: 1px solid var(--as-border-color);
}

.as-episode-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 15px;
}

.as-episode-heading {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    margin: 8px 0;
}

.as-episode-parent-series {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--as-text-muted);
}

.as-series-parent-link {
    color: var(--as-primary);
    font-size: 16px;
}

.as-series-parent-link:hover {
    text-decoration: underline;
}

.as-episode-nav-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.as-btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    border-radius: var(--as-radius-sm);
    color: #fff;
    background: var(--as-bg-card);
    border: 1px solid var(--as-border-color);
}

.as-btn-nav:hover:not(.as-btn-disabled) {
    background: var(--as-primary);
    border-color: var(--as-primary);
    color: #fff;
}

.as-btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Empty states */
.as-no-servers-box {
    text-align: center;
    padding: 40px 20px;
    color: var(--as-text-muted);
}

.as-no-servers-box .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #f59e0b;
    margin-bottom: 10px;
}

/* ==========================================================================
   6. Mobile & Tablet Responsiveness for Single Views
   ========================================================================== */
@media (max-width: 992px) {
    .as-movie-header-grid {
        gap: 25px;
    }
    .as-movie-poster-col {
        width: 240px;
    }
    .as-movie-title {
        font-size: 26px;
    }
}

@media (max-width: 768px) {
    .as-movie-hero {
        padding: 16px 0 24px;
        background-position: center top;
    }

    .as-movie-header-grid {
        flex-direction: column;
        align-items: center;
        gap: 18px;
        width: 100%;
        max-width: 100%;
    }

    .as-movie-poster-col {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
        flex: none;
    }

    .as-movie-poster-wrap {
        max-width: 200px;
        margin: 0 auto;
        border-radius: var(--as-radius-md);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    }

    .as-movie-info-col {
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

    .as-movie-title {
        font-size: 20px;
        line-height: 1.35;
        text-align: center;
        margin-bottom: 6px;
    }

    .as-movie-orig-title {
        font-size: 13px;
        text-align: center;
        display: block;
        margin-bottom: 12px;
    }

    .as-meta-badges-row {
        justify-content: center;
        gap: 6px;
        margin-bottom: 16px;
    }

    .as-meta-pill {
        padding: 4px 10px;
        font-size: 11.5px;
    }

    .as-movie-specs {
        padding: 12px;
        margin-bottom: 18px;
        text-align: right;
        border-radius: var(--as-radius-md);
        box-sizing: border-box;
        width: 100%;
    }

    .as-spec-row {
        flex-direction: column;
        gap: 3px;
        padding: 6px 0;
    }

    .as-spec-label {
        width: 100%;
        font-size: 12px;
        font-weight: 800;
        color: var(--as-accent-gold);
    }

    .as-spec-val {
        font-size: 13px;
        line-height: 1.5;
        word-break: break-word;
    }

    .as-spec-tag {
        font-size: 11px;
        padding: 2px 8px;
        margin: 2px 2px 2px 0;
        display: inline-block;
    }

    .as-movie-storyline {
        text-align: right;
        margin-bottom: 18px;
        width: 100%;
    }

    .as-movie-storyline h3 {
        font-size: 15px;
        color: var(--as-accent-gold);
        margin-bottom: 6px;
    }

    .as-story-text {
        font-size: 13.5px;
        line-height: 1.7;
        color: #cbd5e1;
    }

    .as-movie-action-buttons {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .as-movie-action-buttons .as-btn {
        width: 100%;
        justify-content: center;
        font-size: 13.5px;
        padding: 10px 14px;
        box-sizing: border-box;
    }

    /* Media Body & Tabs */
    .as-media-body {
        padding-top: 20px;
        padding-bottom: 40px;
        width: 100%;
    }

    .as-seasons-wrapper,
    .as-player-section,
    .as-download-section {
        padding: 14px 12px;
        margin-bottom: 20px;
        border-radius: var(--as-radius-md);
        width: 100%;
        box-sizing: border-box;
    }

    /* Mobile Multi-Player Architecture: Servers Explicitly Above Player Screen */
    .as-player-section {
        display: flex !important;
        flex-direction: column !important;
    }

    .as-servers-bar {
        order: 1 !important; /* Top */
        margin-bottom: 12px !important;
        padding: 12px 10px !important;
    }

    .as-active-server-status {
        order: 2 !important; /* Middle */
        margin-bottom: 12px !important;
        padding: 8px 12px !important;
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }

    .as-status-info {
        justify-content: center !important;
    }

    .as-status-nav-buttons {
        width: 100% !important;
        justify-content: center !important;
    }

    .as-player-container {
        order: 3 !important; /* Underneath Servers */
    }

    .as-section-title {
        font-size: 16px;
    }

    .as-header-title-wrap {
        width: 100%;
    }

    .as-header-meta-badges {
        width: 100%;
        justify-content: space-between;
    }

    .as-servers-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
        width: 100% !important;
    }

    .as-server-tab {
        width: 100% !important;
    }

    .as-server-btn {
        padding: 8px 8px !important;
        font-size: 12px !important;
        gap: 4px !important;
    }

    .as-server-num {
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
    }

    .as-server-name {
        font-size: 11px !important;
    }

    .as-server-badge {
        font-size: 9px !important;
        padding: 2px 4px !important;
    }

    .as-player-toolbar {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
        text-align: center !important;
        padding: 10px !important;
    }

    .as-toolbar-left {
        justify-content: center !important;
        width: 100% !important;
    }

    .as-tool-btn {
        flex: 1 1 calc(50% - 6px) !important;
        justify-content: center !important;
        padding: 8px 6px !important;
        font-size: 12px !important;
    }

    .as-tip-text {
        justify-content: center !important;
        font-size: 11px !important;
    }


    /* Single Episode */
    .as-episode-header-inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 14px;
    }

    .as-episode-heading {
        font-size: 18px;
        text-align: center;
    }

    .as-episode-parent-series {
        justify-content: center;
        font-size: 13.5px;
    }

    .as-episode-nav-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .as-btn-series {
        grid-column: span 2;
        justify-content: center;
    }

    .as-btn-nav {
        justify-content: center;
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* Click-to-Play Overlay (Core Web Vitals LCP/TBT optimization) */
.as-click-to-play {
    position: absolute;
    inset: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0b0d13;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.as-play-trigger-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 20px;
    text-align: center;
}

.as-play-circle {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    background: var(--as-primary, #e50914);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 10px rgba(229, 9, 20, 0.25), 0 12px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.as-click-to-play:hover .as-play-circle {
    transform: scale(1.08);
    background: #ff1a26;
}

.as-play-label {
    font-size: 1.15rem;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.as-play-server-hint {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.55);
    padding: 4px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* =========================================================
   Cast & Crew Section (فريق العمل)
   ========================================================= */
.as-cast-section {
    margin: 34px 0 38px;
}

.as-cast-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-bottom: 22px;
    position: relative;
}

.as-cast-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.as-cast-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.as-cast-accent-line {
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 56px;
    height: 3px;
    border-radius: 3px;
    background: var(--as-primary, #e50914);
}

.as-cast-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.as-cast-card {
    background: #10131c;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    overflow: hidden;
}

.as-cast-card:hover {
    transform: translateY(-3px);
    border-color: rgba(229, 9, 20, 0.45);
    background: #151926;
}

.as-cast-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.as-cast-avatar {
    width: 56px;
    height: 66px;
    border-radius: 9px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1e2b;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-cast-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.as-cast-avatar-fallback {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
}

.as-cast-meta {
    min-width: 0;
    flex: 1;
}

.as-cast-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #f3f4f6;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.as-cast-role {
    display: block;
    font-size: 0.78rem;
    color: #9ca3af;
    font-weight: 500;
}

@media (max-width: 1200px) {
    .as-cast-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .as-cast-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .as-cast-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .as-cast-avatar {
        width: 48px;
        height: 58px;
    }
    .as-cast-name {
        font-size: 0.85rem;
    }
}

/* Ad-Block / Popup Shield Active Button */
#btn-adblock-toggle.active {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
}
#btn-adblock-toggle.active:hover {
    background: rgba(16, 185, 129, 0.24);
}

/* =========================================================
   Unified Work Details Card (Duration, Year, Categories)
   ========================================================= */
.as-work-details-card {
    background: rgba(16, 20, 30, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 16px 0 18px;
    backdrop-filter: blur(8px);
}

.as-work-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 12px;
}

.as-detail-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 9px 12px;
}

.as-detail-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(229, 9, 20, 0.14);
    color: var(--as-primary, #e50914);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.as-detail-imdb .as-detail-icon {
    background: rgba(245, 197, 24, 0.16);
    color: #f5c518;
}

.as-detail-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.as-detail-label {
    font-size: 0.74rem;
    color: #9ca3af;
    font-weight: 600;
}

.as-detail-value {
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.as-detail-value a {
    color: #ffffff;
    text-decoration: none;
}

.as-detail-value a:hover {
    color: var(--as-primary, #e50914);
}

.as-work-genres-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.as-work-genres-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.as-work-genre-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f3f4f6;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.as-work-genre-pill:hover {
    background: var(--as-primary, #e50914);
    border-color: var(--as-primary, #e50914);
    color: #ffffff;
}

.as-genres-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: 16px;
}

.as-work-genre-pill.is-primary-cat {
    background: rgba(229, 9, 20, 0.16);
    border-color: rgba(229, 9, 20, 0.45);
    color: #fca5a5;
}

/* Smart Sandbox Compatibility Mode Button */
.as-servers-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.as-compat-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #d1d5db;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.as-compat-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 14px;
}

.as-compat-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.as-compat-btn.active {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.55);
    color: #fbbf24;
}
