/* =============================================
   ONLINE VIDEO PLAYER PAGE STYLES
   ============================================= */

/* Theme Variables */
:root {
    --black: #000000;
    --noir: #0a0608;
    --charcoal: #14101a;
    --slate: #1c1624;
    --steel: #2d2438;
    --silver: #9a8fa8;
    --pearl: #f0eaf5;
    --white: #ffffff;
    --ruby: #e31b54;
    --crimson: #c41040;
    --gold: #f5a623;
    --amber: #ffb347;
    --burgundy: #6b1c3a;
    --royal-purple: #4a1259;
    --deep-violet: #2d1b4e;
    --text: var(--pearl);
    --text-muted: rgba(255, 255, 255, 0.6);
    --border: rgba(255, 255, 255, 0.06);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Theme Colors */
[data-theme="ocean"] {
    --ruby: #0ea5e9;
    --crimson: #0284c7;
    --gold: #38bdf8;
    --amber: #7dd3fc;
    --burgundy: #0c4a6e;
    --royal-purple: #075985;
    --deep-violet: #0c4a6e;
}

[data-theme="emerald"] {
    --ruby: #10b981;
    --crimson: #059669;
    --gold: #34d399;
    --amber: #6ee7b7;
    --burgundy: #064e3b;
    --royal-purple: #047857;
    --deep-violet: #064e3b;
}

[data-theme="purple"] {
    --ruby: #a855f7;
    --crimson: #9333ea;
    --gold: #c084fc;
    --amber: #d8b4fe;
    --burgundy: #4c1d95;
    --royal-purple: #6b21a8;
    --deep-violet: #4c1d95;
}

[data-theme="sunset"] {
    --ruby: #f97316;
    --crimson: #ea580c;
    --gold: #fb923c;
    --amber: #fdba74;
    --burgundy: #7c2d12;
    --royal-purple: #9a3412;
    --deep-violet: #7c2d12;
}

[data-theme="rose"] {
    --ruby: #ec4899;
    --crimson: #db2777;
    --gold: #f472b6;
    --amber: #f9a8d4;
    --burgundy: #831843;
    --royal-purple: #9d174d;
    --deep-violet: #831843;
}

[data-theme="red"] {
    --ruby: #ef4444;
    --crimson: #dc2626;
    --gold: #f87171;
    --amber: #fca5a5;
    --burgundy: #7f1d1d;
    --royal-purple: #991b1b;
    --deep-violet: #7f1d1d;
}

[data-theme="darkred"] {
    --ruby: #b91c1c;
    --crimson: #991b1b;
    --gold: #dc2626;
    --amber: #ef4444;
    --burgundy: #450a0a;
    --royal-purple: #7f1d1d;
    --deep-violet: #450a0a;
}

[data-theme="yellow"] {
    --ruby: #eab308;
    --crimson: #ca8a04;
    --gold: #facc15;
    --amber: #fde047;
    --burgundy: #713f12;
    --royal-purple: #854d0e;
    --deep-violet: #713f12;
}

[data-theme="darkyellow"] {
    --ruby: #a16207;
    --crimson: #854d0e;
    --gold: #ca8a04;
    --amber: #eab308;
    --burgundy: #422006;
    --royal-purple: #713f12;
    --deep-violet: #422006;
}

/* Override main padding for this page */
.main {
    padding-top: 0 !important;
}

/* Page Hero - Full Cover Under Menu (same as znjirafilm) */
.page-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-start;
    padding: 120px 80px 350px;
    margin-top: 0;
    overflow: hidden;
}

.page-hero__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.page-hero__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, var(--noir) 0%, rgba(10, 6, 8, 0.4) 50%, rgba(10, 6, 8, 0.6) 100%),
        linear-gradient(270deg, var(--noir) 0%, transparent 70%);
    z-index: 1;
}

.page-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: right;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.page-hero__title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--pearl);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
    margin: 0;
}

@media (max-width: 1024px) {
    .page-hero {
        padding: 100px 40px 300px;
        min-height: 65vh;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 90px 20px 40px;
        min-height: auto;
        height: 350px;
    }

    .page-hero__title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .page-hero {
        padding: 80px 15px 30px;
        min-height: auto;
        height: 300px;
    }

    .page-hero__title {
        font-size: 1.3rem;
    }
}

/* Top Bar inside Cover */
.video-top-bar__inner {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
    gap: 20px;
    width: 100%;
}

.video-top-bar__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pearl);
    margin: 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
    text-align: left;
}

@media (max-width: 1024px) {
    .video-top-bar__title {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .video-top-bar__title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .video-top-bar__title {
        font-size: 1rem;
    }
}

@media screen and (max-width: 600px) {
    .video-top-bar__inner {
        flex-direction: column;
        gap: 12px;
    }
}

/* Video Theater Section */
.video-theater {
    background: transparent;
    padding: 0 0 50px;
    position: relative;
    margin-top: -350px;
    z-index: 10;
}

@media (max-width: 1024px) {
    .video-theater {
        margin-top: -300px;
    }
}

@media (max-width: 768px) {
    .video-theater {
        margin-top: 0;
        padding-top: 20px;
        background: var(--noir);
    }
}

@media (max-width: 480px) {
    .video-theater {
        margin-top: 0;
        padding-top: 15px;
        background: var(--noir);
    }
}

.video-theater::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, transparent 0%, var(--noir) 100%);
    pointer-events: none;
}

.video-theater .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Video Title */
.video-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--pearl);
    margin: 0 0 24px;
    text-align: center;
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* Server Selector */
.quality-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
}

.quality-label {
    font-size: 0.95rem;
    color: var(--silver);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.quality-label i {
    color: var(--gold);
    font-size: 1.1rem;
}

.quality-select {
    flex: 1;
    max-width: 300px;
    min-width: 200px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    color: var(--pearl);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.quality-select:hover {
    background: rgba(255, 255, 255, 0.08);
}

.quality-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

.quality-select option {
    background: var(--charcoal);
    color: var(--pearl);
}

/* Video Wrapper */
.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 0 80px rgba(227, 27, 84, 0.15);
    max-width: 1300px;
    margin: 0 auto;
}

.video-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.video-wrapper .video-js {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
}

.video-wrapper iframe {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    border: none;
    display: block;
}

.video-wrapper video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    display: block;
}

.video-wrapper embed,
.video-wrapper object {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16/9;
    display: block;
}

/* Movie Info Panel */
.movie-info-panel {
    max-width: 1300px;
    margin: 0 auto 40px;
    padding: 0 40px;
}

.movie-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
    backdrop-filter: blur(10px);
}

.movie-info-synopsis-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pearl);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.movie-info-synopsis-title i {
    color: var(--gold);
}

.movie-info-synopsis-text {
    color: var(--silver);
    font-size: 0.95rem;
    line-height: 1.8;
    text-align: justify;
}

/* Content Container */
.content-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Report Section */
.report-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 40px;
}

.report-title {
    font-size: 1rem;
    color: var(--pearl);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-title i {
    color: var(--ruby);
}

.report-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--pearl);
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.report-select:focus {
    border-color: var(--ruby);
    box-shadow: 0 0 0 3px rgba(227, 27, 84, 0.2);
}

.report-select option {
    background: var(--charcoal);
    color: var(--pearl);
}

.report-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--ruby), var(--crimson));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(227, 27, 84, 0.4);
}

.report-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Section Title */
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pearl);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--ruby), var(--gold));
    border-radius: 2px;
}

/* Related Movies Grid */
.related-section {
    margin-bottom: 50px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

/* Movie Card */
.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-color: var(--ruby);
}

.card__poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.card:hover .card__image {
    transform: scale(1.1);
}

.card__hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .card__hover {
    opacity: 1;
}

.card__play {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--ruby), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 10px 30px rgba(227, 27, 84, 0.5);
}

.card__badge {
    position: absolute;
    top: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card__badge--rating {
    left: 12px;
    background: linear-gradient(135deg, var(--gold), var(--amber));
    color: var(--noir);
    display: flex;
    align-items: center;
    gap: 4px;
}

.card__badge--rating i {
    font-size: 0.7rem;
}

.card__info {
    padding: 16px;
}

.card__title {
    font-size: 0.95rem;
    color: var(--pearl);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.3s ease;
}

.card:hover .card__title {
    color: var(--gold);
}

/* Most Viewed Section */
.most-viewed-section {
    margin-top: 50px;
}

.most-viewed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.most-viewed-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pearl);
    display: flex;
    align-items: center;
    gap: 12px;
}

.most-viewed-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--ruby), var(--gold));
    border-radius: 2px;
}

.most-viewed-title i {
    color: var(--gold);
    font-size: 1.3rem;
}

/* Horizontal Tabs */
.tabs-horizontal {
    display: flex;
    gap: 10px;
}

.tabs-horizontal .tab-btn {
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: var(--silver);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tabs-horizontal .tab-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--pearl);
}

.tabs-horizontal .tab-btn.active {
    background: linear-gradient(135deg, var(--ruby), var(--gold));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(227, 27, 84, 0.3);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Horizontal Movie Grid */
.movie-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

/* Horizontal Movie Card */
.movie-card-h {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.movie-card-h:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-color: var(--ruby);
}

.movie-card-h__poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.movie-card-h__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.movie-card-h:hover .movie-card-h__image {
    transform: scale(1.1);
}

.movie-card-h__hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card-h:hover .movie-card-h__hover {
    opacity: 1;
}

.movie-card-h__play {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--ruby), var(--gold));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: 0 10px 30px rgba(227, 27, 84, 0.5);
}

.movie-card-h__views {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--pearl);
    display: flex;
    align-items: center;
    gap: 5px;
}

.movie-card-h__views i {
    color: var(--gold);
    font-size: 0.7rem;
}

.movie-card-h__info {
    padding: 16px;
}

.movie-card-h__title {
    font-size: 0.95rem;
    color: var(--pearl);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
    transition: color 0.3s ease;
}

.movie-card-h:hover .movie-card-h__title {
    color: var(--gold);
}

/* Hidden Fields */
.hidden {
    display: none;
}

/* =============================================
   SERVER FALLBACK - Loading & Status Styles
   ============================================= */

/* Video Loading Overlay */
.video-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 16px;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Spinner Animation */
.video-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: videoSpinner 1s linear infinite;
}

@keyframes videoSpinner {
    to {
        transform: rotate(360deg);
    }
}

.video-loading-text {
    color: var(--pearl);
    font-size: 1rem;
    text-align: center;
}

.video-loading-status {
    color: var(--gold);
    font-size: 0.9rem;
    text-align: center;
    font-weight: 500;
}

/* Try Next Server Button */
.try-next-server {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
}

.try-next-server button {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--ruby), var(--crimson));
    border: none;
    border-radius: 50px;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.try-next-server button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(227, 27, 84, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {

    .video-theater .container,
    .movie-info-panel,
    .content-container,
    .page-hero__content {
        padding: 0 24px;
    }

    .quality-section {
        flex-direction: column;
        align-items: stretch;
    }

    .quality-select {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .video-theater {
        padding: 16px 0 40px;
        margin-top: 0;
    }

    .video-title {
        font-size: 1.4rem;
        margin-bottom: 16px;
    }

    .video-theater .container,
    .movie-info-panel,
    .content-container,
    .page-hero__content {
        padding: 0 16px;
    }

    .movie-info-card {
        padding: 20px;
    }

    .related-grid,
    .movie-grid-horizontal {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .most-viewed-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .tabs-horizontal {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .tabs-horizontal .tab-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .video-title {
        font-size: 1.2rem;
    }

    .section-title,
    .most-viewed-title {
        font-size: 1.2rem;
    }

    .related-grid,
    .movie-grid-horizontal {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .card__info,
    .movie-card-h__info {
        padding: 12px;
    }

    .card__title,
    .movie-card-h__title {
        font-size: 0.85rem;
    }
}