:root {
    --lang-hi: #ff5e00;
    --lang-dub: #00f0ff;
    --lang-sub: #39ff14;
    --ad-bg: rgba(255,255,255,0.015);
    --ad-border: rgba(255,255,255,0.04);
}

.watch-container { max-width: 1440px; margin: 0 auto; }

/* ===== PRE-ROLL INTERSTITIAL ===== */
#preroll-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.92);
    display: none; align-items: center; justify-content: center;
    flex-direction: column; gap: 1.5rem;
    backdrop-filter: blur(10px);
}
#preroll-overlay.show { display: flex; }
.preroll-box {
    background: #0d1117; border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; padding: 2rem; max-width: 700px; width: 90%;
    text-align: center; position: relative;
}
.preroll-ad-zone {
    width: 100%; min-height: 265px;
    background: linear-gradient(135deg, rgba(255,77,0,0.05), rgba(168,85,247,0.05));
    border: 1px dashed rgba(255,255,255,0.08); border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem;
    color: rgba(255,255,255,0.25); font-size: 0.78rem; letter-spacing: 2px;
}
.preroll-ad-zone .ad-label { font-size: 0.65rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 3px; }
.preroll-skip-row { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.preroll-timer {
    width: 56px; height: 56px; border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--primary);
    border-left-color: var(--accent-pink);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 900; position: relative;
    animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 0 15px rgba(255, 94, 0, 0.2), inset 0 0 10px rgba(255, 0, 127, 0.15);
}
@keyframes spin { to { transform: rotate(360deg); } }
.preroll-timer-num {
    position: absolute; font-size: 1.1rem; font-weight: 900;
    animation: none !important;
}
#preroll-count-display {
    position: absolute; font-size: 1.15rem; font-weight: 900; color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    font-family: monospace;
}
.preroll-skip-btn {
    padding: 0.7rem 2rem; border-radius: 50px;
    background: var(--primary); border: none; color: white;
    font-weight: 800; font-size: 0.9rem; cursor: not-allowed;
    font-family: inherit; transition: 0.3s; opacity: 0.5;
}
.preroll-skip-btn.ready { cursor: pointer; opacity: 1; }
.preroll-skip-btn.ready:hover { transform: scale(1.05); }
.preroll-ep-info { color: rgba(255,255,255,0.5); font-size: 0.82rem; margin-bottom: 1rem; }
.preroll-ep-title { color: white; font-size: 1.1rem; font-weight: 700; margin-bottom: 0.3rem; }

/* ===== HERO ===== */
.watch-hero { text-align: center; padding: 2.2rem 0 1.8rem; }
.watch-hero h1 { font-size: 2.8rem; font-weight: 900; margin-bottom: 0.4rem; line-height: 1.1; }
.watch-hero h1 span { background: var(--anime-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { color: var(--text-secondary); font-size: 1rem; margin-bottom: 1.5rem; }
.lang-badges { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.lang-badge { padding: 0.3rem 0.9rem; border-radius: 50px; font-size: 0.75rem; font-weight: 800; border: 1px solid; }
.lb-hi { background: rgba(249,115,22,0.12); color: var(--lang-hi); border-color: rgba(249,115,22,0.3); }
.lb-dub { background: rgba(59,130,246,0.12); color: var(--lang-dub); border-color: rgba(59,130,246,0.3); }
.lb-sub { background: rgba(16,185,129,0.12); color: var(--lang-sub); border-color: rgba(16,185,129,0.3); }
.watch-search-wrap {
    display: flex; gap: 0.6rem; max-width: 640px; margin: 0 auto;
    background: rgba(255,255,255,0.04); padding: 0.5rem 0.5rem 0.5rem 1.4rem;
    border-radius: 50px; border: 1px solid var(--glass-border);
    position: relative;
}
.watch-search-wrap input { flex: 1; background: transparent; border: none; color: white; font-size: 0.95rem; outline: none; }
.watch-search-wrap input::placeholder { color: rgba(255,255,255,0.3); }
.watch-search-wrap button { padding: 0.65rem 1.8rem; border-radius: 50px; font-size: 0.9rem; flex-shrink: 0; }

/* ===== CONTINUE WATCHING ===== */
.cw-section { margin-bottom: 2rem; }
.cw-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.cw-title { font-size: 1.1rem; font-weight: 800; }
.cw-title span { background: var(--anime-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.cw-clear { font-size: 0.75rem; color: var(--text-secondary); cursor: pointer; background: none; border: none; font-family: inherit; transition: 0.2s; }
.cw-clear:hover { color: #ef4444; }
.cw-scroll { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }
.cw-scroll::-webkit-scrollbar { height: 3px; }
.cw-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.cw-card {
    flex-shrink: 0; width: 150px; background: var(--bg-card);
    border-radius: 12px; overflow: hidden; border: 1px solid var(--glass-border);
    cursor: pointer; transition: all 0.3s;
}
.cw-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.cw-img-wrap { position: relative; }
.cw-card img { width: 100%; height: 100px; object-fit: cover; display: block; }
.cw-progress { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.1); }
.cw-progress-fill { height: 100%; background: var(--primary); border-radius: 0 2px 2px 0; }
.cw-ep-badge { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,0.85); color: white; font-size: 0.6rem; padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 800; }
.cw-info { padding: 0.5rem 0.6rem; }
.cw-name { font-size: 0.72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.2rem; }
.cw-ep-txt { font-size: 0.65rem; color: var(--text-secondary); }

/* ===== MY WATCHLIST SECTION ===== */
.wl-section { margin-bottom: 2rem; }
.wl-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.wl-title { font-size: 1.1rem; font-weight: 800; }
.wl-title span { background: linear-gradient(135deg, #ec4899, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.wl-clear { font-size: 0.75rem; color: var(--text-secondary); cursor: pointer; background: none; border: none; font-family: inherit; transition: 0.2s; }
.wl-clear:hover { color: #ef4444; }
.wl-scroll { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }
.wl-scroll::-webkit-scrollbar { height: 3px; }
.wl-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.wl-card {
    flex-shrink: 0; width: 140px; background: var(--bg-card);
    border-radius: 12px; overflow: hidden; border: 1px solid rgba(168,85,247,0.25);
    cursor: pointer; transition: all 0.3s; position: relative;
}
.wl-card:hover { transform: translateY(-4px); border-color: #a855f7; box-shadow: 0 8px 25px rgba(168,85,247,0.2); }
.wl-card img { width: 100%; height: 95px; object-fit: cover; display: block; }
.wl-card-info { padding: 0.45rem 0.55rem; }
.wl-card-name { font-size: 0.7rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wl-card-remove { position: absolute; top: 4px; left: 4px; background: rgba(0,0,0,0.8); border: none; border-radius: 4px; color: #ef4444; font-size: 0.7rem; cursor: pointer; padding: 0.1rem 0.35rem; line-height: 1.4; z-index: 2; }
.wl-card-remove:hover { background: #ef4444; color: white; }

/* ===== WATCHLIST HEART BUTTON ON CARDS ===== */
.wl-heart-btn {
    position: absolute; top: 0.5rem; left: 0.5rem; z-index: 3;
    background: rgba(0,0,0,0.75); border: none; border-radius: 50%;
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 0.85rem; transition: all 0.25s; color: #888;
    backdrop-filter: blur(4px);
}
.wl-heart-btn.saved { color: #ec4899; text-shadow: 0 0 8px rgba(236,72,153,0.6); }
.wl-heart-btn:hover { background: rgba(236,72,153,0.2); transform: scale(1.15); }

/* ===== WATCHLIST META-BAR BUTTON ===== */
.wl-meta-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1.2rem; border-radius: 50px;
    background: rgba(236,72,153,0.1); border: 1px solid rgba(236,72,153,0.3);
    color: #ec4899; font-size: 0.8rem; font-weight: 700; cursor: pointer;
    transition: all 0.25s; font-family: inherit; margin-top: 0.6rem;
}
.wl-meta-btn.saved { background: rgba(236,72,153,0.2); border-color: #ec4899; color: #ec4899; }
.wl-meta-btn:hover { background: rgba(236,72,153,0.25); transform: translateY(-1px); }

/* ===== THUMB PROGRESS BAR ===== */
.thumb-progress-bar { height: 3px; background: rgba(255,255,255,0.08); width: 100%; border-radius: 2px; margin-top: 0.3rem; overflow: hidden; }
.thumb-progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width 0.3s; }

/* ===== CATEGORY TABS ===== */
.cat-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; justify-content: center; }
.cat-btn {
    padding: 0.45rem 1.2rem; border-radius: 50px; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.7);
    cursor: pointer; font-size: 0.82rem; font-weight: 700; transition: 0.3s;
    font-family: inherit;
}
.cat-btn.active, .cat-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }

/* ===== BROWSE GRID ===== */
.section-label { font-size: 1.4rem; font-weight: 800; margin-bottom: 1.1rem; }
.section-label span { background: var(--anime-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.anime-browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1.1rem;
}
.anime-thumb {
    background: var(--bg-card); border-radius: 14px; overflow: hidden;
    border: 1px solid var(--glass-border); cursor: pointer;
    transition: all 0.3s ease; position: relative;
}
.anime-thumb:hover { transform: translateY(-5px) scale(1.02); border-color: var(--primary); box-shadow: 0 12px 35px rgba(255,77,0,0.2); }
.anime-thumb img { width: 100%; height: 230px; object-fit: cover; display: block; }
.anime-thumb-eps {
    position: absolute; top: 0.5rem; right: 0.5rem;
    background: rgba(0,0,0,0.85); color: white; font-size: 0.65rem;
    padding: 0.2rem 0.5rem; border-radius: 5px; font-weight: 800;
}
.play-hover {
    position: absolute; inset: 0; background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s; flex-direction: column; gap: 0.5rem;
}
.anime-thumb:hover .play-hover { opacity: 1; }
.play-circle {
    width: 50px; height: 50px; background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; box-shadow: 0 0 25px rgba(255,77,0,0.6);
}
.play-hover-lang { display: flex; gap: 0.3rem; }
.phl { font-size: 0.58rem; padding: 0.15rem 0.4rem; border-radius: 4px; font-weight: 800; }
.phl-hi { background: var(--lang-hi); color: white; }
.phl-dub { background: var(--lang-dub); color: white; }
.phl-sub { background: var(--lang-sub); color: white; }
.thumb-info { padding: 0.7rem 0.85rem; }
.thumb-title { font-weight: 700; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.2rem; }
.thumb-meta { color: var(--text-secondary); font-size: 0.7rem; }
.thumb-meta .score { color: #fbbf24; }

/* ===== SKELETON ===== */
.skeleton-card { background: rgba(255,255,255,0.04); border-radius: 14px; overflow: hidden; animation: skShimmer 1.4s ease-in-out infinite; }
.sk-img { height: 230px; background: rgba(255,255,255,0.07); }
.sk-body { padding: 0.8rem; }
.sk-line { height: 9px; background: rgba(255,255,255,0.07); border-radius: 5px; margin-bottom: 0.5rem; }
.sk-line.short { width: 55%; }
@keyframes skShimmer { 0%,100%{opacity:1} 50%{opacity:0.55} }

/* ===== AD SPACES ===== */
.ad-leaderboard {
    width: 100%; min-height: 90px;
    background: var(--ad-bg); border: 1px dashed var(--ad-border);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.1); font-size: 0.65rem; letter-spacing: 2px;
    margin: 1rem 0; text-transform: uppercase;
}
.ad-rect {
    min-height: 250px; width: 100%;
    background: var(--ad-bg); border: 1px dashed var(--ad-border);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.1); font-size: 0.65rem; letter-spacing: 2px;
    margin: 1rem 0; text-align: center;
}

/* ===== WATCH VIEW ===== */
#watch-view { display: none; }
.back-btn {
    background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border);
    color: rgba(255,255,255,0.7); padding: 0.45rem 1.2rem; border-radius: 50px;
    cursor: pointer; font-family: inherit; font-size: 0.82rem; transition: 0.3s;
    margin-bottom: 1.4rem; display: inline-flex; align-items: center; gap: 0.4rem;
}
.back-btn:hover { border-color: var(--primary); color: white; }

/* Watch layout */
.watch-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.6rem;
    align-items: start;
}

/* Player */
.player-box {
    background: #000; border-radius: 16px; overflow: hidden;
    border: 1px solid var(--glass-border);
    aspect-ratio: 16/9; position: relative;
}
.player-box iframe { width: 100%; height: 100%; border: none; display: block; }

/* Custom Fullscreen Button — REMOVED (using iframe native controls) */
.player-placeholder {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 1rem; color: var(--text-secondary); background: #080c14;
}
.player-placeholder .ph-icon { font-size: 3.5rem; }

/* Language Switcher */
.lang-switcher {
    display: flex; align-items: center; gap: 0.6rem;
    margin: 1.2rem 0 0.8rem; flex-wrap: wrap;
}
.lang-label { font-size: 0.75rem; font-weight: 900; color: var(--text-secondary); letter-spacing: 1.5px; margin-right: 0.4rem; text-transform: uppercase; }
.lang-btn {
    padding: 0.5rem 1.4rem; border-radius: 50px; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.5);
    cursor: pointer; font-size: 0.8rem; font-weight: 800; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit; position: relative; display: inline-flex; align-items: center; gap: 0.4rem;
}
.lang-btn:hover:not(.active) {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.25);
    color: white;
    transform: translateY(-2px);
}
.lang-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.lang-btn.hi.active {
    background: rgba(255, 94, 0, 0.15) !important;
    border-color: var(--lang-hi) !important;
    color: var(--lang-hi) !important;
    box-shadow: 0 8px 20px rgba(255, 94, 0, 0.25), 0 0 10px rgba(255, 94, 0, 0.15);
}
.lang-btn.dub.active {
    background: rgba(0, 240, 255, 0.15) !important;
    border-color: var(--lang-dub) !important;
    color: var(--lang-dub) !important;
    box-shadow: 0 8px 20px rgba(0, 240, 255, 0.25), 0 0 10px rgba(0, 240, 255, 0.15);
}
.lang-btn.sub.active {
    background: rgba(57, 255, 20, 0.15) !important;
    border-color: var(--lang-sub) !important;
    color: var(--lang-sub) !important;
    box-shadow: 0 8px 20px rgba(57, 255, 20, 0.25), 0 0 10px rgba(57, 255, 20, 0.15);
}

/* Server tabs */
.server-row {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1.2rem; flex-wrap: wrap;
}
.server-label { font-size: 0.75rem; font-weight: 900; color: var(--text-secondary); letter-spacing: 1.5px; margin-right: 0.4rem; text-transform: uppercase; }
.srv-btn {
    padding: 0.45rem 1.2rem; border-radius: 50px; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.02); color: rgba(255,255,255,0.5);
    cursor: pointer; font-size: 0.78rem; font-weight: 800; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}
.srv-btn:hover:not(.active) {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 94, 0, 0.05);
    transform: translateY(-2px);
}
.srv-btn.active {
    background: var(--anime-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

/* Auto-next bar */
#auto-next-bar {
    display: none; background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border); border-radius: 12px;
    padding: 0.8rem 1.2rem; margin-bottom: 0.8rem;
    align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
#auto-next-bar.show { display: flex; }
.an-text { font-size: 0.82rem; color: var(--text-secondary); }
.an-text strong { color: white; }
.an-btns { display: flex; gap: 0.5rem; }
.an-btn {
    padding: 0.35rem 1rem; border-radius: 8px; font-size: 0.78rem; font-weight: 700;
    cursor: pointer; font-family: inherit; border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.06); color: white; transition: 0.2s;
}
.an-btn.play { background: var(--primary); border-color: var(--primary); }
.an-progress { width: 100%; height: 2px; background: rgba(255,255,255,0.08); border-radius: 2px; margin-top: 0.5rem; }
.an-progress-fill { height: 100%; background: var(--primary); border-radius: 2px; transition: width 1s linear; }

/* Anime meta bar */
.anime-meta-bar {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.2rem; background: rgba(255,255,255,0.03);
    border-radius: 12px; border: 1px solid var(--glass-border);
    margin-bottom: 0.8rem;
}
.meta-poster { width: 60px; height: 88px; object-fit: cover; border-radius: 8px; border: 1px solid var(--glass-border); flex-shrink: 0; }
.meta-info h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.25rem; }
.meta-info p { color: var(--text-secondary); font-size: 0.78rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.genre-chips-row { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.5rem; }
.g-chip { background: rgba(255,77,0,0.1); color: var(--primary); padding: 0.12rem 0.55rem; border-radius: 20px; font-size: 0.68rem; font-weight: 700; border: 1px solid rgba(255,77,0,0.2); }

/* Episode sidebar */
.ep-sidebar {
    background: rgba(255,255,255,0.02); border: 1px solid var(--glass-border);
    border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column; max-height: 640px;
}
.ep-sidebar-head {
    padding: 0.9rem 1.1rem; background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--glass-border);
    font-weight: 800; font-size: 0.85rem;
    display: flex; justify-content: space-between; align-items: center;
}
.ep-count-badge { background: rgba(255,77,0,0.12); color: var(--primary); padding: 0.15rem 0.55rem; border-radius: 20px; font-size: 0.68rem; font-weight: 800; }
.ep-range-tabs { display: flex; gap: 0.3rem; padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--glass-border); flex-wrap: wrap; }
.ep-range-btn { padding: 0.2rem 0.6rem; border-radius: 6px; font-size: 0.68rem; font-weight: 700; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); color: rgba(255,255,255,0.5); cursor: pointer; font-family: inherit; transition: 0.2s; }
.ep-range-btn.active { background: rgba(255,77,0,0.15); border-color: rgba(255,77,0,0.3); color: var(--primary); }
.ep-scroll { overflow-y: auto; flex: 1; padding: 0.35rem; }
.ep-scroll::-webkit-scrollbar { width: 3px; }
.ep-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
.ep-row {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.6rem 0.75rem; border-radius: 9px;
    cursor: pointer; transition: 0.2s; margin-bottom: 0.12rem;
}
.ep-row:hover { background: rgba(255,255,255,0.05); }
.ep-row.active { background: rgba(255,77,0,0.12); border: 1px solid rgba(255,77,0,0.2); }
.ep-num-badge {
    width: 32px; height: 32px; border-radius: 7px;
    background: rgba(255,255,255,0.07);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 800; color: var(--text-secondary); flex-shrink: 0;
}
.ep-row.active .ep-num-badge { background: var(--primary); color: white; }
.ep-text { font-size: 0.78rem; font-weight: 600; }
.ep-watched { width: 6px; height: 6px; border-radius: 50%; background: #10b981; margin-left: auto; flex-shrink: 0; }

/* Sidebar Ad */
.sidebar-ad {
    padding: 0.8rem;
    border-top: 1px solid var(--glass-border);
}
.sidebar-ad-box {
    min-height: 160px; background: var(--ad-bg);
    border: 1px dashed var(--ad-border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.1); font-size: 0.62rem; letter-spacing: 2px;
}

/* ===== TRENDING TICKER ===== */
.trending-bar {
    background: rgba(255,77,0,0.06); border: 1px solid rgba(255,77,0,0.15);
    border-radius: 50px; padding: 0.45rem 1rem; display: flex;
    align-items: center; gap: 0.8rem; margin-bottom: 1.5rem; overflow: hidden;
}
.trend-label { font-size: 0.7rem; font-weight: 900; color: var(--primary); letter-spacing: 1px; white-space: nowrap; }
.trend-scroll { display: flex; gap: 1.5rem; overflow: hidden; flex: 1; }
.trend-item { font-size: 0.75rem; color: rgba(255,255,255,0.6); white-space: nowrap; cursor: pointer; transition: 0.2s; }
.trend-item:hover { color: white; }
.trend-sep { color: rgba(255,255,255,0.15); }

/* Responsive */
@media (max-width: 1000px) {
    .watch-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    /* Hide sidebar banner on mobile — cleaner watch experience */
    .sidebar-column #container-dfceefd1ed321b8b431bef7d49c4d986 { display: none !important; }
    /* Strip the wrapper columns to flatten layout on mobile */
    .watch-layout > div:not(.sidebar-column),
    .watch-layout > .sidebar-column {
        display: contents !important;
    }
    /* Order of items on mobile */
    #player-box { order: 1; }
    #lang-switcher { order: 2; }
    #lang-notice { order: 3; }
    #server-row { order: 4; }
    #auto-next-bar { order: 5; }
    #ep-sidebar { order: 6; }
    #anime-meta-bar { order: 7; }
    /* Put ads at the bottom */
    .watch-layout .ad-space,
    #container-dfceefd1ed321b8b431bef7d49c4d986 { order: 8; }

    .ep-sidebar { max-height: 340px; }
}
@media (max-width: 640px) {
    .anime-browse-grid { grid-template-columns: repeat(2, 1fr); gap: 0.7rem; }
    .anime-thumb img { height: 190px; }
    .watch-hero h1 { font-size: 2rem; }
}

/* Page bottom padding for sticky ad */
.page-content { padding-bottom: 80px; }

/* ===== PLAYER LOADING OVERLAY ===== */
.player-loading {
    position: absolute; inset: 0; z-index: 5;
    background: #080c14; display: none;
    align-items: center; justify-content: center;
    flex-direction: column; gap: 1rem;
}
.pl-spinner {
    width: 52px; height: 52px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.08);
    border-top-color: var(--primary);
    animation: spin 0.75s linear infinite;
}
.pl-label { color: rgba(255,255,255,0.4); font-size: 0.78rem; letter-spacing: 1px; }

/* ===== PLAYER ERROR OVERLAY ===== */
.player-error {
    position: absolute; inset: 0; z-index: 6;
    background: rgba(6,10,18,0.97); display: none;
    align-items: center; justify-content: center;
    flex-direction: column; gap: 1rem; padding: 2rem;
    text-align: center;
}
.pe-icon { font-size: 3.5rem; }
.pe-title { color: white; font-size: 1.05rem; font-weight: 800; }
.pe-sub { color: rgba(255,255,255,0.42); font-size: 0.8rem; line-height: 1.65; max-width: 300px; }
.pe-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin-top: 0.3rem; }
.pe-btn {
    padding: 0.55rem 1.5rem; border-radius: 50px;
    font-size: 0.82rem; font-weight: 800; cursor: pointer;
    font-family: inherit; border: none; transition: all 0.2s;
}
.pe-btn-primary { background: var(--primary); color: white; }
.pe-btn-primary:hover { transform: scale(1.05); box-shadow: 0 0 20px rgba(255,77,0,0.4); }
.pe-btn-secondary { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.65); border: 1px solid rgba(255,255,255,0.12) !important; }
.pe-btn-secondary:hover { background: rgba(255,255,255,0.13); color: white; }
.pe-server-list { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.pe-srv-chip {
    padding: 0.3rem 0.85rem; border-radius: 50px; font-size: 0.72rem; font-weight: 700;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.55); cursor: pointer; transition: 0.2s; font-family: inherit;
}
.pe-srv-chip:hover { background: rgba(255,77,0,0.15); border-color: rgba(255,77,0,0.4); color: var(--primary); }
.srv-btn.active { background: var(--primary); border-color: var(--primary); color: white; box-shadow: 0 0 12px rgba(255,77,0,0.35); }

/* ===== MOBILE PLAYER OVERLAY ===== */
.mobile-player-overlay {
    position: absolute; inset: 0; z-index: 8;
    background: linear-gradient(135deg, #0d0d1a 0%, #1a0a2e 50%, #0d1a2e 100%);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 1rem; padding: 1.5rem; text-align: center;
}
.mob-anime-title {
    color: rgba(255,255,255,0.9); font-size: 0.95rem; font-weight: 700;
    text-shadow: 0 0 20px rgba(255,77,0,0.4); max-width: 280px;
    line-height: 1.4;
}
.mob-ep-label {
    color: rgba(255,255,255,0.45); font-size: 0.78rem; letter-spacing: 1px;
    text-transform: uppercase; margin-top: -0.5rem;
}
.mob-play-btn {
    background: linear-gradient(135deg, #ff4d00, #ff7043);
    color: white; border: none; border-radius: 50px;
    padding: 1rem 2.5rem; font-size: 1.1rem; font-weight: 900;
    cursor: pointer; width: 100%; max-width: 290px;
    box-shadow: 0 6px 30px rgba(255,77,0,0.55);
    transition: transform 0.15s, box-shadow 0.15s;
    font-family: inherit; letter-spacing: 0.5px;
}
.mob-play-btn:active { transform: scale(0.96); box-shadow: 0 2px 12px rgba(255,77,0,0.4); }
.mob-info {
    color: rgba(255,255,255,0.35); font-size: 0.72rem;
    line-height: 1.6; max-width: 260px; margin-top: -0.2rem;
}
.mob-srv-label {
    color: rgba(255,255,255,0.45); font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 1px; margin-top: 0.4rem;
}
.mob-srv-grid {
    display: flex; flex-wrap: wrap; gap: 0.45rem;
    justify-content: center; max-width: 320px;
}
.mob-srv-btn {
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.13);
    color: rgba(255,255,255,0.6); border-radius: 20px;
    padding: 0.35rem 0.9rem; font-size: 0.72rem; font-weight: 700;
    cursor: pointer; transition: 0.18s; font-family: inherit;
}
.mob-srv-btn.active {
    background: rgba(255,77,0,0.25); border-color: #ff4d00;
    color: #ff7043; box-shadow: 0 0 10px rgba(255,77,0,0.25);
}
.mob-srv-btn:active { transform: scale(0.94); }
