:root {
    --op-auth-bg: url('/assets/op/Assets/Medias/Img/background.png');
}

body.op-app-theme {
    background: #0a0a0a;
}

#appMain,
.content-wrap {
    min-height: calc(100vh - 160px);
}

.page-login #appMain,
.page-register #appMain,
.page-forgot #appMain {
    min-height: 100vh;
}

.op-nav-link.active,
.op-mobile-nav-link.active,
.op-icon-btn.active {
    color: var(--op-accent) !important;
}

.op-logout-btn,
.op-mobile-logout {
    border: 0;
    background: transparent;
}

.op-mobile-logout {
    width: 100%;
    color: var(--op-text-muted);
    text-align: left;
    padding: 0;
}

.op-home-page .op-main {
    padding-top: 0;
}

.op-home-page .op-section:first-child {
    padding-top: 36px;
}

.op-home-hero-shell,
.op-hero--loading {
    min-height: min(82vh, 820px);
}

.op-hero-placeholder,
.op-detail-bg--placeholder {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(247, 148, 29, 0.24), transparent 30%),
        linear-gradient(135deg, rgba(21, 21, 21, 0.92), rgba(54, 54, 54, 0.82));
}

.op-skeleton-pill,
.op-skeleton-title,
.op-skeleton-meta,
.op-skeleton-copy,
.op-skeleton-actions,
.op-skeleton-line,
.op-card--skeleton,
.op-live-card--skeleton,
.op-detail-content-card--loading,
.op-detail-side-panel--loading,
.op-profile-card--loading {
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.06) 15%, rgba(255, 255, 255, 0.14) 35%, rgba(255, 255, 255, 0.06) 55%);
    background-size: 200% 100%;
    animation: op-shimmer 1.2s linear infinite;
}

.op-skeleton-pill {
    width: 124px;
    height: 28px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.op-skeleton-title {
    width: min(420px, 86%);
    height: 56px;
    border-radius: 18px;
    margin-bottom: 16px;
}

.op-skeleton-meta {
    width: min(280px, 72%);
    height: 16px;
    border-radius: 999px;
    margin-bottom: 18px;
}

.op-skeleton-copy {
    width: min(540px, 90%);
    height: 72px;
    border-radius: 20px;
    margin-bottom: 22px;
}

.op-skeleton-actions {
    width: 240px;
    height: 52px;
    border-radius: 16px;
}

.op-skeleton-line {
    height: 18px;
    border-radius: 999px;
}

.op-skeleton-line--title {
    width: 210px;
}

.op-skeleton-line--link {
    width: 120px;
}

.op-card--skeleton,
.op-live-card--skeleton {
    border-radius: var(--op-radius-lg);
}

.op-card--skeleton {
    min-width: 196px;
    width: 196px;
    aspect-ratio: 0.7;
}

.op-live-card--skeleton {
    min-height: 190px;
}

.op-detail-content-card--loading,
.op-detail-side-panel--loading,
.op-profile-card--loading {
    min-height: 260px;
    border-radius: var(--op-radius-lg);
}

.op-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    margin: -18px 0 34px;
    padding: 20px;
    background: rgba(18, 18, 18, 0.9);
    border: 1px solid var(--op-border);
    border-radius: var(--op-radius-lg);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(14px);
}

.op-toolbar-input,
.op-filter-select {
    min-height: 48px;
    flex: 1 1 220px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: 0 16px;
}

.op-toolbar-input::placeholder {
    color: var(--op-text-dim);
}

.op-toolbar-input:focus,
.op-filter-select:focus {
    outline: none;
    border-color: rgba(247, 148, 29, 0.8);
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.15);
}

.op-toolbar-form .op-btn {
    justify-content: center;
    white-space: nowrap;
}

.op-filter-search {
    min-width: 220px;
    flex: 1 1 240px;
}

.op-movies-grid.is-loading-more {
    opacity: 0.96;
}

.op-series-grid.is-loading-more {
    opacity: 0.96;
}

.op-empty-state {
    border: 1px solid var(--op-border);
    border-radius: var(--op-radius-lg);
    background: rgba(255, 255, 255, 0.03);
    padding: 36px 28px;
    text-align: center;
    color: var(--op-text-muted);
}

.op-empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: rgba(247, 148, 29, 0.12);
    color: var(--op-accent);
    font-size: 24px;
}

.op-list-status {
    min-height: 24px;
    margin-top: 24px;
    color: var(--op-text-muted);
    font-size: 13px;
    text-align: center;
}

.op-list-status strong {
    color: #fff;
    font-weight: 700;
}

.op-infinite-sentinel {
    width: 100%;
    height: 1px;
    margin-top: 1px;
}

.op-search-empty-shell {
    padding-bottom: 48px;
}

.op-card .op-card-subtitle,
.op-live-card .op-card-subtitle {
    font-size: 12px;
    color: var(--op-text-muted);
    margin-top: 4px;
}

.op-live-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.op-live-grid--rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.op-live-grid--rail::-webkit-scrollbar {
    display: none;
}

.op-live-grid--rail .op-live-card {
    scroll-snap-align: start;
}

.op-live-grid.is-loading-more {
    opacity: 0.92;
}


.op-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.op-history-grid .op-card--landscape-lg,
.op-grid .op-card {
    width: 100%;
    min-width: 0;
}

.op-grid .op-card--portrait {
    aspect-ratio: 0.71;
}

.op-detail-main {
    padding-top: 32px;
}

.op-detail-content-card,
.op-detail-side-panel {
    border: 1px solid var(--op-border);
    border-radius: var(--op-radius-lg);
    background: var(--op-bg-card);
    padding: 24px;
}

.op-detail-content-card h2,
.op-detail-side-panel h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 18px;
}

.op-detail-richtext {
    color: var(--op-text-muted);
    line-height: 1.8;
}

.op-detail-meta-stack {
    display: grid;
    gap: 16px;
}

.op-detail-meta-item-row p:first-child {
    color: var(--op-text-dim);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.op-detail-meta-item-row p:last-child {
    margin: 0;
    color: #fff;
    font-size: 14px;
}

.op-detail-hero .op-btn {
    white-space: nowrap;
}

.op-episodes-list--dynamic {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.op-episode-item.is-disabled {
    opacity: 0.64;
    cursor: default;
}

.op-episode-item .op-episode-status {
    color: var(--op-accent);
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.op-account-shell {
    max-width: 860px;
    padding-top: 32px;
}

.op-account-shell .op-profile-card {
    margin-bottom: 28px;
}

.op-account-state-card {
    min-height: 176px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 28px 24px;
    text-align: center;
}

.op-account-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    background: rgba(247, 148, 29, 0.14);
    color: var(--op-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.op-account-state-text {
    margin: 0;
    color: var(--op-text-muted);
    font-size: 15px;
    line-height: 1.7;
}

.op-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 22px;
}

.op-stat-card {
    padding: 14px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    text-align: center;
}

.op-stat-card strong {
    display: block;
    font-size: 20px;
    color: var(--op-accent);
}

.op-stat-card span {
    font-size: 12px;
    color: var(--op-text-muted);
}

.op-btn-secondary-danger {
    border-color: rgba(255, 127, 127, 0.25);
    color: #ff9d9d;
}

.op-btn-secondary-danger:hover {
    border-color: rgba(255, 127, 127, 0.45);
    color: #fff;
    background: rgba(180, 35, 35, 0.18);
}

.op-settings-list {
    display: block;
}

.op-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 24px;
    border-bottom: 1px solid var(--op-border);
    transition: background var(--op-transition);
}

.op-settings-row:last-child {
    border-bottom: 0;
}

.op-settings-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.op-settings-row--state {
    justify-content: flex-start;
    min-height: 96px;
}

.op-settings-row--state .op-settings-label {
    font-weight: 500;
    color: var(--op-text-muted);
}

.op-settings-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.op-settings-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 13px;
    color: var(--op-text-muted);
}

.op-settings-icon {
    width: 22px;
    text-align: center;
    font-size: 18px;
    color: var(--op-text-dim);
    flex-shrink: 0;
}

.op-settings-label {
    margin: 0;
    color: var(--op-text);
    font-size: 14px;
    font-weight: 500;
}

.op-settings-sub {
    margin: 2px 0 0;
    color: var(--op-text-muted);
    font-size: 12px;
    line-height: 1.4;
}

.op-settings-inline-btn {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.op-settings-inline-btn:hover {
    border-color: rgba(247, 148, 29, 0.5);
    color: var(--op-accent);
    background: rgba(247, 148, 29, 0.08);
}

.op-settings-inline-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.op-settings-inline-btn.is-danger {
    border-color: rgba(255, 127, 127, 0.25);
    color: #ff9d9d;
}

.op-settings-inline-btn.is-danger:hover {
    border-color: rgba(255, 127, 127, 0.45);
    color: #fff;
    background: rgba(180, 35, 35, 0.18);
}

.op-settings-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(247, 148, 29, 0.14);
    color: var(--op-accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.op-settings-badge.is-current {
    background: rgba(122, 227, 139, 0.14);
    color: #7ae38b;
}

.op-account-modal {
    background: rgba(13, 13, 13, 0.98);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65);
}

.op-account-modal .modal-header,
.op-account-modal .modal-footer {
    border-color: rgba(255, 255, 255, 0.08);
}

.op-account-modal .modal-title {
    font-size: 18px;
    font-weight: 800;
}

.op-account-modal .form-check-label {
    color: #e8e8e8;
    font-size: 13px;
}

.op-account-modal .form-check-input:checked {
    background-color: var(--op-accent);
    border-color: var(--op-accent);
}

.op-account-modal-copy {
    color: var(--op-text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.op-account-modal-danger {
    border-color: rgba(255, 127, 127, 0.2);
}

.op-account-delete-list {
    margin: 0 0 18px;
    padding-left: 18px;
    color: #f2d6d6;
    font-size: 13px;
    line-height: 1.8;
}

.op-account-switches {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.op-plan-picker {
    display: grid;
    gap: 14px;
}

.op-plan-picker-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.op-plan-picker-card.is-active {
    border-color: rgba(247, 148, 29, 0.45);
    background: rgba(247, 148, 29, 0.08);
}

.op-plan-picker-card strong {
    display: block;
    font-size: 16px;
    color: #fff;
}

.op-plan-picker-card p {
    margin: 6px 0 0;
    color: var(--op-text-muted);
    font-size: 12px;
    line-height: 1.6;
}

.op-plan-picker-price {
    color: var(--op-accent);
    font-size: 20px;
    font-weight: 800;
}

@media (max-width: 768px) {
    .op-settings-row {
        padding: 15px 20px;
    }

    .op-plan-picker-card {
        flex-direction: column;
    }

    .op-plan-picker-card .text-end {
        width: 100%;
        text-align: left !important;
    }
}

.op-settings-entry {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid var(--op-border);
}

.op-settings-entry:last-child {
    border-bottom: 0;
}

.op-settings-entry__title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.op-settings-entry__meta {
    color: var(--op-text-muted);
    font-size: 12px;
    margin: 0;
}

.op-settings-entry__tag {
    color: var(--op-accent);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.op-auth-page-fixed {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
    background-image: var(--op-auth-bg);
    background-size: cover;
    background-position: center;
}

.op-auth-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to bottom,
            rgba(10, 10, 10, 0.78) 0%,
            rgba(10, 10, 10, 0.52) 40%,
            rgba(10, 10, 10, 0.86) 85%,
            rgba(10, 10, 10, 1) 100%
        );
}

.op-auth-card-fixed {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 460px;
    background: rgba(16, 16, 16, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 48px 40px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.75);
    margin: 24px;
}

.op-auth-card-fixed--wide {
    max-width: 560px;
}

.op-auth-logo img {
    height: 40px;
    margin: 0 auto;
    display: block;
}

.op-auth-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
}

.op-form-feedback {
    min-height: 20px;
    margin-top: 16px;
    text-align: center;
    color: var(--op-accent);
    font-size: 13px;
}

.op-form-feedback.is-error {
    color: #ff7f7f;
}

.op-form-feedback.is-success {
    color: #7ae38b;
}

.op-section-link:not(a) {
    cursor: default;
}

@keyframes op-shimmer {
    from {
        background-position: 200% 0;
    }
    to {
        background-position: -200% 0;
    }
}

@media (max-width: 991.98px) {
    .op-toolbar-form {
        margin-top: 12px;
    }

    .op-history-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .op-auth-card-fixed {
        padding: 34px 22px;
        margin: 16px;
    }

    .op-live-grid--rail {
        grid-auto-columns: minmax(240px, 82vw);
    }

    .op-stat-grid {
        grid-template-columns: 1fr;
    }

    .op-toolbar-form {
        padding: 16px;
    }
}
