/**
 * anime-single.css
 * Consolidated styles for the anime single page.
 * Extracted from inline <style> blocks; duplicates removed, broken nesting fixed.
 */

/* =========================================================
   1. ADMIN BUTTONS
   ========================================================= */
.section-watch .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-quick-edit-btn {
    font-size: 1.3em;
    color: #f39c12;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    display: inline-block;
    line-height: 1;
}

.admin-quick-edit-btn:hover {
    transform: rotate(45deg);
    background-color: rgba(243, 156, 18, 0.1);
    color: #e67e22;
}

.admin-edit-btn {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.8em;
    color: #f39c12;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.admin-edit-btn:hover {
    transform: scale(1.1);
    color: #e67e22;
}

.player-source-btn .quality-badge {
    background-color: #e74c3c;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 8px;
    font-weight: 700;
}

/* =========================================================
   2. RECOMMENDATIONS CAROUSEL
   ========================================================= */
.recommendations-carousel .anime-item {
    background: transparent;
    border: none;
    box-shadow: none;
}

.recommendations-carousel .anime-item .poster {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.recommendations-carousel .title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9em;
    line-height: 1.3;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 40%, rgba(0, 0, 0, 0.95) 100%);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recommendations-carousel .info-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

.recommendations-carousel .rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(30, 190, 125, 0.9);
    color: #fff;
    font-weight: 700;
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.recommendations-carousel .swiper-slide {
    width: 160px;
}

.recommendations-carousel {
    border-radius: 12px;
    background: var(--card-background);
}

@media (max-width: 768px) {
    .recommendations-carousel .swiper-slide {
        width: 140px;
    }
}

@media (max-width: 480px) {
    .recommendations-carousel .swiper-slide {
        width: 120px;
    }
}

/* =========================================================
   3. HERO SECTION
   ========================================================= */
.anime-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
    background: #1a1a2e;
    box-shadow: var(--shadow-lg);
}

.hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 40px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.hero-poster {
    flex-shrink: 0;
    width: 280px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.hero-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-info {
    flex-grow: 1;
    color: #fff;
}

.hero-title {
    font-size: 2.5em;
    font-weight: 800;
    margin: 0 0 10px;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-original-title {
    font-size: 1.1em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.hero-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.hero-tag {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-tag i {
    color: var(--accent);
}

.hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.hero-rating .score {
    font-size: 1.5em;
    font-weight: 800;
    color: #2ecc71;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

/* Mobile hero */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }

    .anime-hero {
        margin-left: -20px;
        margin-right: -20px;
        border-radius: 0;
        width: auto;
    }
}

@media (max-width: 768px) {
    .hero-poster {
        width: 200px;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 1.8em;
        text-align: center;
    }

    .hero-original-title {
        text-align: center;
    }

    .hero-meta-tags {
        justify-content: center;
    }

    .hero-rating {
        margin: 0 auto 20px;
        display: flex;
        width: fit-content;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-actions .btn {
        flex: 1;
        min-width: 140px;
    }
}

/* =========================================================
   4. CONTENT GRID
   ========================================================= */
.anime-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 15px;
    align-items: start;
}

@media (max-width: 992px) {
    .anime-content-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   5. MODERN TABS
   ========================================================= */
.modern-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 25px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.modern-tab-btn {
    background: none;
    border: none;
    padding: 10px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s;
}

.modern-tab-btn.active {
    color: var(--accent);
}

/* Underline is now animated in section 25 below */

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =========================================================
   6. SIDEBAR
   ========================================================= */
.anime-sidebar-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 15px;
}

.sidebar-title {
    font-size: 1.1em;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.anime-sidebar-right {
    min-width: 0;
    overflow: hidden;
}

/* =========================================================
   7. PLAYER WRAPPER
   ========================================================= */
.modern-player-wrapper {
    scroll-margin-top: 80px;
}

@media (max-width: 768px) {
    .anime-page-container {
        padding: 0;
    }

    .modern-player-wrapper {
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
    }

    .player-container-wrapper {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* =========================================================
   8. DESCRIPTION (mobile collapse)
   ========================================================= */
@media (max-width: 768px) {
    .anime-description {
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        line-clamp: 4;
        -webkit-box-orient: vertical;
        max-height: 120px;
        transition: max-height 0.3s ease, -webkit-line-clamp 0.3s ease;
    }

    .anime-description.expanded {
        -webkit-line-clamp: unset;
        line-clamp: unset;
        max-height: none;
        overflow: visible;
    }

    .description-toggle {
        display: inline-block;
        margin-top: 10px;
        padding: 8px 16px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        border: none;
        border-radius: 20px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .description-toggle:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    }

    .description-toggle i {
        margin-right: 5px;
    }
}

/* =========================================================
   9. TOAST SYSTEM (single definition, no duplicates)
   ========================================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    padding: 16px 24px;
    margin-bottom: 12px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateX(calc(100% + 20px));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    max-width: 350px;
    word-wrap: break-word;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

@media (max-width: 768px) {
    .toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* =========================================================
   10. TELEGRAM MODAL
   ========================================================= */
.telegram-notify-container {
    padding: 10px;
    background-color: var(--card-light);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

.btn-tg-notify {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    border-radius: 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #0088cc, #00a0e9);
    color: #fff;
}

.btn-tg-notify:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.4);
}

.btn-tg-notify[data-subscribed="true"] {
    background: linear-gradient(135deg, #28a745, #218838);
}

.btn-tg-notify[data-subscribed="true"]:hover {
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-tg-notify i {
    font-size: 1.2em;
}

.tg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tg-modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.tg-modal-content {
    position: relative;
    background-color: var(--card-background);
    border: 1px solid var(--border);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 25px 30px;
    z-index: 1;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.tg-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8em;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.tg-modal-header h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.tg-modal-header p {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.tg-modal-view {
    display: none;
}

.tg-modal-view.active {
    display: block;
}

.tg-loader {
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.tg-qr-container {
    margin: 20px 0;
}

#tg-qrcode {
    width: 180px;
    height: 180px;
    margin: 0 auto 15px;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
}

.btn-tg-link {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.tg-status-text {
    margin-top: 15px;
    color: var(--text-muted);
    font-style: italic;
}

.tg-voiceover-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}

.tg-voiceover-item {
    display: block;
    padding: 12px;
    background-color: var(--card-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tg-voiceover-item:hover {
    border-color: var(--primary-color);
}

.tg-voiceover-item input {
    margin-right: 10px;
}

.tg-voiceover-item .name {
    font-weight: 500;
}

.tg-voiceover-item .ep-count {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-left: 5px;
}

.tg-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#tg-unsubscribe-btn {
    background: #e74c3c;
    border-color: #c0392b;
}

@media (max-width: 480px) {
    .tg-voiceover-list {
        grid-template-columns: 1fr;
    }
}

.tg-voiceover-item.tg-any-first {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.1), rgba(102, 126, 234, 0.1));
    border: 2px solid var(--primary-color);
}

.tg-voiceover-item.tg-any-first .name {
    color: var(--primary-color);
}

.tg-voiceover-item.tg-any-first .ep-count {
    display: block;
    margin-top: 5px;
    margin-left: 25px;
}

/* =========================================================
   11. POSTER STATS OVERLAY
   ========================================================= */
.poster-block {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.poster-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    padding: 12px;
    border-radius: 0 0 12px 12px;
}

.poster-stats {
    position: relative;
    display: flex;
    justify-content: center;
}

.stats-toggle {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    font-weight: 500;
    transition: all 0.2s ease;
    backdrop-filter: blur(2px);
}

.stats-toggle:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.4);
}

.stats-toggle i {
    font-size: 0.9em;
}

.stats-dropdown {
    display: none;
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #2a2b33;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
    padding: 12px;
    z-index: 10;
    min-width: 180px;
}

.stats-dropdown.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.8em;
    color: var(--text-primary);
}

.stats-item i {
    width: 14px;
    text-align: center;
    font-size: 0.9em;
}

@media (max-width: 480px) {
    .stats-toggle {
        font-size: 0.75em;
        padding: 6px 10px;
    }

    .stats-dropdown {
        min-width: 160px;
        padding: 10px;
    }
}

.poster-status-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #c00;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* =========================================================
   12. ONBOARDING OVERLAY
   ========================================================= */
.onboarding-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.onboarding-step {
    max-width: 400px;
}

.onboarding-step i {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--primary-color);
}

/* =========================================================
   13. PLAYER CONTAINER & SOURCE SWITCHER
   ========================================================= */
.player-container-wrapper {
    background-color: var(--card-background);
    overflow: hidden;
}

.player-source-switcher {
    display: flex;
    padding: 10px 15px;
    background-color: var(--card-light);
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.player-source-btn {
    padding: 8px 16px;
    font-weight: 600;
    border: none;
    background-color: var(--background);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-source-btn:hover {
    background-color: var(--border);
}

.player-source-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.player-instance {
    display: none;
}

.player-instance.active {
    display: block;
}

/* Player notice — single consolidated definition */
.player-notice {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
}

.player-notice.success {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(4, 180, 4, 0.1);
    color: #04b404;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-notice.fallback {
    background: rgba(255, 165, 0, 0.1);
    color: #ffa500;
}

/* Captcha */
.captcha-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1b26;
    z-index: 20;
    flex-direction: column;
    padding: 20px;
    text-align: center;
    border-radius: 12px;
}

#custom-iframe-holder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

#custom-iframe-holder iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.captcha-box {
    background: #24283b;
    padding: 25px 40px;
    border-radius: 15px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.captcha-title {
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #fff;
}

.captcha-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #1f2335;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: 0.2s;
}

.captcha-checkbox-wrap:hover {
    background: #292e42;
}

.captcha-checkbox-wrap input {
    width: 22px;
    height: 22px;
    cursor: pointer;
}

.captcha-label {
    font-weight: 600;
    color: #cfc;
}

.player-instance.custom-player-active .captcha-container {
    display: none;
}

/* =========================================================
   14. PLAYER CONTROLS (Kodik-style UI)
   ========================================================= */
.player-top-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 15px;
    background-color: var(--card-light);
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.player-selector {
    flex-grow: 1;
    position: relative;
}

.player-selector .selector-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.player-selector .selector-control:hover {
    border-color: var(--primary-color);
}

.player-selector .selector-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.episode-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(128, 128, 128, 0.2);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
}

.selector-arrow {
    transition: transform 0.2s ease;
}

.player-selector.open .selector-arrow {
    transform: rotate(180deg);
}

.selector-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: #2a2b33;
    border: 1px solid var(--border);
    border-radius: 8px;
    z-index: 10;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.player-selector.open .selector-dropdown {
    display: block;
}

.dropdown-header {
    padding: 8px 12px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item.selected {
    background-color: rgba(102, 126, 234, 0.1);
}

.item-info {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-weight: 500;
}

.item-popularity {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 4px;
}

.popularity-bar {
    width: 80px;
    height: 4px;
    background-color: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.popularity-bar-inner {
    height: 100%;
    background: linear-gradient(90deg, #8e44ad, #c0392b);
    border-radius: 2px;
}

.episode-list-container {
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.episode-button {
    background-color: var(--background);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.episode-button:hover {
    background-color: var(--border);
    border-color: var(--text-muted);
}

.episode-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
}

.player-iframe-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.player-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .section-watch {
        padding-left: 0;
        padding-right: 0;
    }
}

/* =========================================================
   15. NO-PLAYER PLACEHOLDER
   ========================================================= */
.no-player-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f39c12;
    font-weight: 600;
    font-size: 0.9em;
    padding: 5px 0;
}

.player-placeholder-box {
    background: var(--card-light);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    border: 1px dashed var(--border);
    margin: 15px;
}

.placeholder-content h4 {
    margin: 15px 0 10px;
    color: #fff;
}

.placeholder-content p {
    color: var(--text-muted);
    font-size: 0.95em;
    max-width: 400px;
    margin: 0 auto 20px;
}

.placeholder-img {
    width: 120px;
    opacity: 0.5;
    filter: grayscale(1);
    margin-bottom: 10px;
}

/* =========================================================
   16. GUEST TOOLTIP
   ========================================================= */
.guest-tooltip {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid var(--primary-color);
    border-radius: 6px;
    font-size: 0.8em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 768px) {
    .guest-tooltip {
        display: none;
    }
}

/* =========================================================
   17. VIBE RATING CONTROLS
   ========================================================= */
.vibe-rating-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    gap: 7px;
}

.vibe-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--card-light);
    color: var(--text-muted);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9em;
    font-weight: 500;
    min-width: 80px;
    justify-content: center;
}

.vibe-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.vibe-btn.liked {
    background: linear-gradient(135deg, #4c5350 0%, #059669 100%);
    color: #fff;
    border-color: transparent;
}

.vibe-btn.disliked {
    background: linear-gradient(135deg, #060606 0%, #dc2626 100%);
    color: #fff;
    border-color: transparent;
}

.vibe-btn i {
    font-size: 1.1em;
}

.vibe-count {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.vibe-score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 15px;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

.vibe-score-number {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
}

.vibe-score-label {
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vibe-subtitle {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 5px;
}

@media (max-width: 768px) {
    .section-vibe-rating {
        bottom: 0;
        z-index: 100;
        margin-bottom: 0;
        box-shadow: 0 -4px 12px rgba(111, 0, 0, 0.2);
    }

    .vibe-rating-controls {
        gap: 7px;
    }

    .vibe-btn {
        padding: 6px 12px;
        min-width: 60px;
    }

    .vibe-score-display {
        padding: 0 10px;
    }
}

/* =========================================================
   18. SHARE BUTTONS
   ========================================================= */
.share-buttons-container {
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.share-title {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
}

.share-buttons-list {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.share-btn.vk:hover {
    background: #45668e;
    color: #fff;
    border-color: #45668e;
}

.share-btn.tg:hover {
    background: #0088cc;
    color: #fff;
    border-color: #0088cc;
}

.share-btn.ok:hover {
    background: #ed812b;
    color: #fff;
    border-color: #ed812b;
}

.share-btn.wa:hover {
    background: #25D366;
    color: #fff;
    border-color: #25D366;
}

@media (max-width: 768px) {
    .share-btn span {
        display: none;
    }

    .share-btn {
        padding: 8px;
    }
}

/* =========================================================
   19. COLLECTIONS
   ========================================================= */
.collections-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.collection-tag {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.collection-tag i {
    flex-shrink: 0;
    color: var(--primary-color);
    opacity: 0.8;
    width: 16px;
    text-align: center;
}

.collection-tag span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.collection-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

/* =========================================================
   20. COMMENTS & REPLIES
   ========================================================= */
.comment-collapsed .comment-thread {
    display: none;
}

.comments-section .comment.collapsed {
    display: none;
}

.comment-reply-btn {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.comment-reply-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

.show-more-comments {
    display: block;
    text-align: center;
    margin: 10px 0;
}

.show-more-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.section-comments .section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#comments-sort {
    padding: 8px 12px;
    background: var(--card-light);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
}

.comment[data-collapsed="true"] {
    opacity: 0.6;
    background: rgba(231, 76, 60, 0.05);
    border-left: 3px solid #e74c3c;
}

.comment-content-collapsed .collapsed-notice {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    color: #e74c3c;
    font-size: 0.9em;
}

.comment-content-collapsed .collapsed-notice i {
    font-size: 1.2em;
}

.show-collapsed-btn {
    margin-left: auto;
    padding: 4px 12px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85em;
}

.comment-content-collapsed.revealed .comment-content-inner {
    display: block !important;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.comment-thread .comment-thread {
    margin-left: 25px;
}

.comment-thread>.comment-thread:nth-child(odd) {
    border-left-color: rgba(102, 126, 234, 0.3);
}

.comment-thread>.comment-thread:nth-child(even) {
    border-left-color: rgba(118, 75, 162, 0.3);
}

.comment-thread .comment-avatar {
    width: 32px;
    height: 32px;
}

.comment-form-container {
    position: relative;
    z-index: 1;
}

/* Mention dropdown */
.mention-dropdown {
    position: absolute;
    background: var(--card-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 250px;
}

.mention-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.mention-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.mention-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 8px;
}

/* Mention button — fixed (was broken by nesting inside .toast-container) */
.mention-btn {
    margin-left: 10px;
    font-size: 0.85em;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.mention-btn:hover {
    text-decoration: underline;
}

.comment-footer .mention-btn {
    margin-left: 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1em;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.comment-footer .mention-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* Comment replies */
.replies-wrapper {
    margin-top: 10px;
    margin-bottom: 15px;
}

.toggle-replies-btn {
    background: var(--card-light);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.toggle-replies-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.toggle-replies-btn i {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.comment-replies {
    margin-left: 30px;
    padding-left: 20px;
    border-left: 2px solid var(--border);
    margin-top: 15px;
    position: relative;
}

@media (max-width: 768px) {
    .comment-replies {
        margin-left: 15px;
        padding-left: 10px;
    }
}

.comment-voting {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--card-light);
    padding: 4px 8px;
    border-radius: 20px;
    margin-left: auto;
}

.comment-vote-btn {
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    padding: 2px;
}

.comment-vote-btn:hover {
    color: var(--text-primary);
}

.comment-vote-btn.active.up {
    color: #2ecc71;
}

.comment-vote-btn.active.down {
    color: #e74c3c;
}

.comment-votes-sum {
    font-weight: 700;
    font-size: 0.9em;
    min-width: 20px;
    text-align: center;
}

/* =========================================================
   21. REVIEWS
   ========================================================= */
.section-reviews .section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.review-card {
    background: var(--card-background);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.review-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.review-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.review-author-details {
    display: flex;
    flex-direction: column;
}

.review-author-name {
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: 2px;
}

.review-author-name:hover {
    color: var(--primary-color);
}

.review-date {
    font-size: 0.85em;
    color: var(--text-muted);
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

.review-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.review-title a {
    color: inherit;
    text-decoration: none;
}

.review-title a:hover {
    color: var(--primary-color);
}

.review-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.review-footer {
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.review-stats {
    display: flex;
    gap: 15px;
    font-size: 0.9em;
    color: var(--text-muted);
}

.review-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.spoiler-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}

.no-reviews {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-reviews i {
    font-size: 3em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.reviews-pagination {
    text-align: center;
    margin-top: 20px;
}

/* =========================================================
   22. PLAYER CONTROLS GRID & THEATER MODE
   ========================================================= */
.modern-player .player-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    font-size: 1.2em;
    color: var(--text-muted);
}

.modern-player .player-loader i {
    margin-right: 10px;
}

.player-controls-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px;
    background-color: var(--card-light);
    border-radius: 0 0 var(--radius) var(--radius);
    border-top: 1px solid var(--border);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9em;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background-color: var(--background);
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
}

.player-controls-grid select.form-control option {
    color: #000000;
    font-weight: 500;
    background-color: #ffffff;
}

/* Theater mode */
.watch-experience.theater-mode .watch-grid {
    grid-template-columns: 1fr;
}

.watch-experience.theater-mode .player-col {
    width: 100%;
}

.watch-experience.theater-mode .chat-col,
.watch-experience.theater-mode .resizer {
    display: none;
}

@media (max-width: 1024px) {
    .js-theater-toggle {
        display: none !important;
    }
}

.js-theater-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.player-wrapper {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================================
   23. FAQ SECTION
   ========================================================= */
.section-faq {
    margin: 40px 0;
    padding: 30px;
    background: var(--card-background);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.section-faq .section-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
    color: var(--text-primary);
}

.faq-accordion {
    margin-top: 10px;
}

.faq-item {
    border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    padding: 18px 0;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
    transition: color 0.2s;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95em;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 20px;
}

.faq-question i {
    transition: transform 0.3s;
    font-size: 0.8em;
    color: var(--text-muted);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .section-faq {
        padding: 20px;
        margin: 30px 0;
    }
}

/* =========================================================
   24. TIMECODES
   ========================================================= */
.timecode {
    color: var(--accent-color, #8e44ad);
    font-weight: 600;
    text-decoration: none;
    padding: 2px 6px;
    background: rgba(142, 68, 173, 0.1);
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    border-bottom: 1px dashed var(--accent-color, #8e44ad);
}

.timecode:hover {
    background: var(--accent-color, #8e44ad);
    color: #fff;
    border-bottom-style: solid;
}

/* =========================================================
   25. VISUAL ANIMATIONS & MICRO-INTERACTIONS
   ========================================================= */

/* Hero decoration CSS-only entrance (replaces inline JS setTimeout) */
.anime-decoration-container {
    opacity: 0;
    animation: fadeInDecorations 1.5s ease-in-out 1s forwards;
}

@keyframes fadeInDecorations {
    to {
        opacity: 1;
    }
}

/* Hero poster hover zoom */
.hero-poster img {
    transition: transform 0.4s ease;
}

.hero-poster:hover img {
    transform: scale(1.03);
}

/* Episode button micro-interaction */
.episode-button:hover {
    transform: scale(1.05);
}

/* Vote pulse animation */
.vibe-btn.voted {
    animation: votePulse 0.35s ease;
}

@keyframes votePulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

/* Tab underline animated transition */
.modern-tab-btn::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.modern-tab-btn.active::after {
    transform: scaleX(1);
}

/* Recommendations poster hover overlay */
.recommendations-carousel .poster {
    position: relative;
    overflow: hidden;
}

.recommendations-carousel .poster::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    border-radius: 12px;
}

.recommendations-carousel .poster:hover::after {
    background: rgba(0, 0, 0, 0.25);
}

.recommendations-carousel .poster img {
    transition: transform 0.4s ease;
}

.recommendations-carousel .poster:hover img {
    transform: scale(1.05);
}

/* Skeleton loader for reviews/comments */
.skeleton-line {
    height: 14px;
    background: linear-gradient(90deg, var(--card-light) 25%, var(--border) 50%, var(--card-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-line.w60 {
    width: 60%;
}

.skeleton-line.w80 {
    width: 80%;
}

.skeleton-line.w40 {
    width: 40%;
}

.skeleton-line.h24 {
    height: 24px;
}

.skeleton-card {
    padding: 20px;
    background: var(--card-background);
    border-radius: 12px;
    margin-bottom: 15px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Share button default state */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    background: var(--card-light);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 1.1em;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent, #667eea);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 140px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
}

/* ═══════════════════════════════════════════════════════
   VIDOZA PLAYER MODAL — AniVibe 1080p Player
   ═══════════════════════════════════════════════════════ */

/* Button highlight in source switcher */
.vidoza-player-btn {
    background: linear-gradient(135deg, #00c853 0%, #00e676 100%) !important;
    color: #fff !important;
    font-weight: 600;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.vidoza-player-btn:hover {
    background: linear-gradient(135deg, #00e676 0%, #69f0ae 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

.vidoza-player-btn .quality-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.vidoza-player-btn i {
    margin-right: 5px;
}

/* Episode count badge inside vidoza button */
.vidoza-ep-count-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.75em;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    letter-spacing: 0.02em;
    line-height: 1.3;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pending upload badge (pulsing amber) */
.vidoza-pending-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 193, 7, 0.3);
    color: #ffd54f;
    font-size: 0.72em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 3px;
    white-space: nowrap;
    animation: vidozaPendingPulse 2s ease-in-out infinite;
}

@keyframes vidozaPendingPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Mobile: badges shrink */
@media (max-width: 640px) {
    .vidoza-ep-count-badge {
        font-size: 0.65em;
        padding: 1px 5px;
        margin-left: 2px;
    }

    .vidoza-pending-badge {
        font-size: 0.62em;
        padding: 1px 4px;
        margin-left: 2px;
    }
}

/* Very small screens: hide text, keep compact */
@media (max-width: 380px) {
    .vidoza-player-btn {
        font-size: 0.82em !important;
        padding: 6px 8px !important;
    }

    .vidoza-ep-count-badge,
    .vidoza-pending-badge {
        font-size: 0.6em;
        padding: 1px 4px;
    }
}

/* Modal overlay */
.vidoza-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
    animation: vidozaFadeIn 0.25s ease;
}

@keyframes vidozaFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal container */
.vidoza-modal {
    width: 100%;
    max-width: 1200px;
    max-height: 85vh;
    background: #0d0d0f;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    animation: vidozaSlideUp 0.3s ease;
}

@keyframes vidozaSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header */
.vidoza-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.vidoza-modal-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.vidoza-anime-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vidoza-episode-info {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.vidoza-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.vidoza-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* Player area */
.vidoza-player-area {
    flex: 1;
    min-height: 0;
}

.vidoza-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 */
    background: #000;
    border-radius: 0;
    overflow: hidden;
}

.vidoza-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

/* Controls (prev / counter / next) */
.vidoza-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.vidoza-nav-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vidoza-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.vidoza-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Fullscreen button */
.vidoza-fullscreen-btn {
    margin-left: auto;
    background: rgba(0, 200, 83, 0.15) !important;
    border-color: rgba(0, 200, 83, 0.3) !important;
    color: #00e676 !important;
}

.vidoza-fullscreen-btn:hover {
    background: rgba(0, 200, 83, 0.3) !important;
}

/* When video-wrap is fullscreen */
.vidoza-video-wrap:fullscreen {
    padding-bottom: 0;
    background: #000;
}

.vidoza-video-wrap:fullscreen iframe {
    position: static;
    width: 100vw;
    height: 100vh;
}

.vidoza-ep-counter {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    min-width: 60px;
    text-align: center;
}

/* Voiceover label */
.vidoza-voiceover-label {
    padding: 10px 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.vidoza-voiceover-label i {
    margin-right: 5px;
    color: rgba(255, 255, 255, 0.3);
}

.vidoza-voiceover-label strong {
    color: #fff;
    font-weight: 600;
}

/* Episode grid */
.vidoza-episode-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 15px 20px;
    overflow-y: auto;
    flex: 0 0 auto;
    align-content: flex-start;
    max-height: 50vh;
}

.vidoza-ep-btn {
    min-width: 42px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vidoza-ep-btn:hover {
    background: rgba(0, 200, 83, 0.15);
    border-color: rgba(0, 200, 83, 0.3);
    color: #00e676;
}

.vidoza-ep-btn.active {
    background: #00c853;
    border-color: #00c853;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.3);
}

/* Scrollbar in episode grid */
.vidoza-episode-grid::-webkit-scrollbar {
    width: 4px;
}

.vidoza-episode-grid::-webkit-scrollbar-track {
    background: transparent;
}

.vidoza-episode-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

/* ─── Mobile responsive (portrait) ─── */
@media (max-width: 900px) {
    .vidoza-modal-overlay {
        padding: 0;
        align-items: stretch;
    }

    .vidoza-modal {
        flex-direction: column !important;
        max-width: 100%;
        max-height: none;
        height: 100%;
        height: 100vh;
        border-radius: 0;
        animation: vidozaSlideUpMobile 0.3s ease;
    }

    @keyframes vidozaSlideUpMobile {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .vidoza-modal-main {
        flex: none !important;
    }

    .vidoza-modal-sidebar {
        width: 100% !important;
        border-left: none !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        flex: 1;
        overflow: hidden;
    }

    .vidoza-modal-header {
        padding: 10px 14px;
    }

    .vidoza-anime-title {
        font-size: 13px;
    }

    .vidoza-episode-info {
        font-size: 12px;
    }

    .vidoza-modal-close {
        width: 32px;
        height: 32px;
    }

    .vidoza-episode-grid {
        padding: 10px 14px;
        gap: 5px;
    }

    .vidoza-ep-btn {
        min-width: 36px;
        height: 32px;
        font-size: 12px;
        padding: 0 8px;
    }

    .vidoza-sidebar-footer {
        display: none;
    }
}

/* ─── Landscape mobile (short viewport) ─── */
@media (max-height: 500px) and (min-width: 641px) {
    .vidoza-modal-overlay {
        padding: 0;
        align-items: stretch;
    }

    .vidoza-modal {
        max-width: 100%;
        max-height: none;
        height: 100%;
        border-radius: 0;
    }

    .vidoza-modal-header {
        padding: 4px 14px;
    }

    .vidoza-anime-title {
        font-size: 12px;
    }

    .vidoza-episode-info {
        font-size: 11px;
    }

    .vidoza-modal-close {
        width: 28px;
        height: 28px;
    }

    .vidoza-player-area {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
    }

    .vidoza-video-wrap {
        flex: 1;
        padding-bottom: 0;
        min-height: 0;
    }

    .vidoza-video-wrap iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .vidoza-controls {
        padding: 4px 10px;
        gap: 8px;
    }

    .vidoza-nav-btn {
        padding: 3px 8px;
        font-size: 11px;
    }

    .vidoza-ep-counter {
        font-size: 12px;
    }

    .vidoza-episode-grid {
        padding: 4px 10px 6px;
        max-height: 50px;
        gap: 3px;
    }

    .vidoza-ep-btn {
        min-width: 28px;
        height: 24px;
        font-size: 10px;
        padding: 0 5px;
    }
}