/* Video Player Premium UI */
.vp-wrap {
    color: #fff;
    background: #000;
    min-height: 100vh;
    padding: 20px 10px;
    font-family: inherit;
}

.vp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.vp-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 5px;
}

.vp-back-btn:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #000;
    transform: scale(1.05);
}

.vp-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.vp-header-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}

.vp-main-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    max-width: 100%;
}

.vp-player-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vp-video-container {
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.vp-video {
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
}

/* Loading Spinner */
.vp-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    z-index: 100;
}

.vp-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: vpSpin 0.8s linear infinite;
}

@keyframes vpSpin {
    to { transform: rotate(360deg); }
}

/* Premium Controls */
.vp-controls {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    padding: 20px;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.vp-controls.hide {
    opacity: 0;
    transform: translateY(15px) scale(0.98);
    pointer-events: none;
}

.vp-video-container.fs-hide-cursor {
    cursor: none;
}

/* Progress Bar */
.vp-progress-wrap {
    width: 100%;
    padding: 0 4px;
}

.vp-progress-bar {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: height 0.2s;
}

.vp-progress-bar:hover {
    height: 8px;
}

.vp-progress-buffer {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    z-index: 1;
}

.vp-progress-current {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #ffffff;
    border-radius: 10px;
    z-index: 2;
}

.vp-progress {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
    margin: 0;
}

/* Control Rows */
.vp-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vp-controls-left, .vp-controls-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vp-ctl-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.vp-ctl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}

.vp-ctl-btn svg {
    width: 22px;
    height: 22px;
}

.vp-time {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.vp-spacer {
    flex: 1;
}

/* Volume Wrap and Slider */
.vp-volume-wrap {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 50;
    transition: all 0.3s ease;
}

.vp-volume-pop {
    display: flex;
    align-items: center;
    width: 0;
    overflow: hidden;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    opacity: 0;
    pointer-events: none;
    margin-right: 0;
}

.vp-volume-wrap:hover .vp-volume-pop,
.vp-volume-pop.open {
    width: 100px;
    opacity: 1;
    pointer-events: auto;
    margin-right: 10px;
}

.vp-volume-slider-wrap {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
}

.vp-volume-current {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #ffffff;
    border-radius: 10px;
    transition: width 0.1s ease;
}

.vp-volume {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    cursor: pointer;
    z-index: 10;
    margin: 0;
}

.vp-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.vp-volume::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Quality Popup */
.vp-quality-wrap {
    position: relative;
}

.vp-quality-pop {
    position: absolute;
    bottom: calc(100% + 15px);
    right: 0;
    padding: 10px;
    border-radius: 18px;
    background: rgba(15, 15, 15, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: none;
    min-width: 140px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    z-index: 100;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(10px);
}

.vp-quality-pop.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 1;
    transform: translateY(0);
}

.vp-quality-item {
    width: 100%;
    padding: 10px 15px;
    border-radius: 12px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.vp-quality-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.vp-quality-item.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.vp-quality-item.active::after {
    content: "";
    width: 6px;
    height: 6px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px #ffffff;
}

/* Info Bar */
.vp-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
}

.vp-info-left h2 {
    font-size: 1.5rem;
    margin: 0 0 4px 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.vp-info-left p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-weight: 600;
}

.vp-actions {
    display: flex;
    gap: 12px;
}

.vp-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 20px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.vp-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.vp-action-btn svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

/* Episode List */
.vp-side-section {
    background: rgba(15, 15, 15, 0.5);
    border-radius: 24px;
    padding: 24px;
    height: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.vp-side-section {
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    border-radius: 4px;
    padding: 0;
    overflow: hidden;
}

.vp-side-title {
    font-size: 0.75rem;
    font-weight: 900;
    padding: 18px 20px;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #444;
    border-bottom: 1px solid #1a1a1a;
}

.vp-ep-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 600px;
    overflow-y: auto;
}

.vp-ep-list::-webkit-scrollbar {
    width: 6px;
}

.vp-ep-list::-webkit-scrollbar-thumb {
    background: #222;
}

.vp-ep-card {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: #eee;
    transition: all 0.15s ease;
    background: transparent;
    border-bottom: 1px solid #1a1a1a;
}

.vp-ep-card:hover {
    background: #111;
}

.vp-ep-card.active {
    background: #ffffff;
    color: #000;
}

.vp-ep-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Modals */
.vp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vp-modal-overlay.open {
    display: flex;
    opacity: 1;
}

.vp-modal {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .vp-modal {
        width: 100%;
        height: 100%;
        max-width: none;
        border-radius: 0;
        border: none;
    }
    
    .vp-comment-modal {
        height: 100% !important;
    }
}

.vp-modal-overlay.open .vp-modal {
    transform: scale(1);
}

.vp-modal-header {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.vp-modal-title {
    font-weight: 800;
    font-size: 1.2rem;
}

.vp-modal-close {
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.vp-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.vp-modal-body {
    padding: 24px;
}

.vp-label {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.vp-select, .vp-textarea, .vp-comment-input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    color: #fff;
    padding: 14px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.vp-select option {
    background: #1a1a1a;
    color: #fff;
}

.vp-select:focus, .vp-textarea:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    outline: none;
}

.vp-modal-footer {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vp-modal-btn {
    padding: 12px 24px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.vp-modal-btn-cancel {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
}

.vp-modal-btn-submit {
    background: #ffffff;
    color: #000;
}

/* Comments Modal Specifics */
.vp-comment-modal {
    max-width: 800px !important;
    height: 85vh !important;
    display: flex;
    flex-direction: column;
}

.vp-comment-body-wrapper {
    flex: 1;
    overflow: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.vp-comments {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 10px;
}

.vp-comment-row {
    display: flex;
    gap: 16px;
    animation: vpSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes vpSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.vp-comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #333, #111);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vp-comment-bubble {
    flex: 1;
}

.vp-comment-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.vp-comment-user {
    font-weight: 800;
    font-size: 1rem;
}

.vp-comment-badge {
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
}

.vp-comment-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.vp-comment-delete {
    margin-left: auto;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp-comment-delete:hover {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
}

.vp-comment-text {
    font-size: 1.05rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.vp-comment-inputbar {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 15px;
}

.vp-comment-send {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: #ffffff;
    color: #000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.vp-comment-send:hover {
    transform: scale(1.05) rotate(5deg);
}

/* Responsive */
@media (max-width: 1100px) {
    .vp-main-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .vp-side-section {
        border-radius: 20px;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    .vp-wrap {
        padding: 10px 10px;
    }

    .vp-header {
        margin-bottom: 15px;
        padding: 0;
    }

    .vp-header-title {
        font-size: 1rem;
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .vp-video-container {
        border-radius: 12px;
        margin: 0 -5px;
    }

    .vp-controls {
        left: 10px;
        right: 10px;
        bottom: 10px;
        padding: 12px;
        border-radius: 18px;
        gap: 10px;
    }

    .vp-ctl-btn {
        width: 36px;
        height: 36px;
    }

    .vp-ctl-btn svg {
        width: 20px;
        height: 20px;
    }

    .vp-info-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px 0;
    }

    .vp-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        width: 100%;
    }

    .vp-action-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
        font-size: 0.8rem;
        border-radius: 10px;
        gap: 8px;
    }

    .vp-side-section {
        border-radius: 15px;
        background: #080808;
    }

    .vp-side-title {
        padding: 15px;
        font-size: 0.7rem;
    }

    .vp-ep-card {
        padding: 14px 20px;
    }

    .vp-ep-title {
        font-size: 0.8rem;
    }

    .vp-time {
        display: none;
    }
}

@media (max-width: 480px) {
    .vp-header-title {
        max-width: 180px;
    }

    .vp-controls-left, .vp-controls-right {
        gap: 8px;
    }
}
