/* =========================================================
   Auth (login / verify) — cinematic VOD
   Scoped under .auth-vod-page
   ========================================================= */

.auth-vod-page {
    --av-primary: var(--hv-primary, #8B1874);
    --av-primary-hot: var(--hv-primary-hover, #E1198F);
    --av-bg: #07070a;
    --av-surface: rgba(18, 18, 22, 0.78);
    --av-border: rgba(255, 255, 255, 0.1);
    --av-text: #f4f4f6;
    --av-muted: #a0a0ae;
    --av-ease: 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    --av-radius: 14px;
    color: var(--av-text);
    background: var(--av-bg);
}

/* Hide site chrome noise on auth — keep navbar brand usable */
.auth-vod-page ~ footer,
body:has(.auth-vod-page) .footer-one {
    display: none;
}

/* ---------- Stage (full first viewport) ---------- */
.auth-vod-page .auth-stage {
    position: relative;
    isolation: isolate;
    min-height: calc(100vh - 72px);
    min-height: calc(100svh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 3rem;
    padding-top: max(2.5rem, calc(1rem + env(safe-area-inset-top, 0px)));
    overflow-x: clip;
    overflow-y: visible;
}

.auth-vod-page .auth-stage-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 70% 55% at 80% 15%, rgba(225, 25, 143, 0.28), transparent 58%),
        radial-gradient(ellipse 55% 50% at 8% 85%, rgba(139, 24, 116, 0.32), transparent 55%),
        radial-gradient(ellipse 40% 35% at 50% 50%, rgba(245, 184, 63, 0.06), transparent 70%),
        linear-gradient(165deg, #140c14 0%, #0a0a0e 42%, #07070a 100%);
    animation: authBgDrift 18s ease-in-out infinite alternate;
}

.auth-vod-page .auth-stage-bg::before {
    content: "";
    position: absolute;
    inset: -8%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000 20%, transparent 75%);
    opacity: 0.45;
    pointer-events: none;
}

.auth-vod-page .auth-stage-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
    opacity: 0.045;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.auth-vod-page .auth-stage-shade {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(7, 7, 10, 0.35) 0%, rgba(7, 7, 10, 0.55) 55%, rgba(7, 7, 10, 0.92) 100%),
        linear-gradient(90deg, rgba(7, 7, 10, 0.55) 0%, transparent 35%, transparent 65%, rgba(7, 7, 10, 0.55) 100%);
    pointer-events: none;
}

.auth-vod-page .auth-stage-inner {
    position: relative;
    z-index: 2;
    width: min(100%, 440px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.35rem;
    animation: authRise 0.85s var(--av-ease) both;
}

/* ---------- Brand ---------- */
.auth-vod-page .auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    animation: authRise 0.85s var(--av-ease) 0.08s both;
}

.auth-vod-page .auth-brand-mark {
    width: clamp(8.5rem, 24vw, 11rem);
    height: auto;
    filter: drop-shadow(0 10px 28px rgba(139, 24, 116, 0.35));
    animation: authBrandPulse 4.5s ease-in-out infinite;
}

.auth-vod-page .auth-brand-name {
    margin: 0;
    color: #fff;
    font-size: clamp(1.65rem, 4.2vw, 2.15rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.auth-vod-page .auth-brand-tag {
    margin: 0;
    max-width: 22rem;
    color: var(--av-muted);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.65;
}

/* ---------- Panel (interaction surface) ---------- */
.auth-vod-page .auth-panel {
    padding: 1.5rem 1.35rem 1.4rem;
    border-radius: calc(var(--av-radius) + 4px);
    background: var(--av-surface);
    border: 1px solid var(--av-border);
    backdrop-filter: blur(18px) saturate(1.2);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: authRise 0.85s var(--av-ease) 0.16s both;
}

.auth-vod-page .auth-panel-title {
    margin: 0 0 0.35rem;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.35;
}

.auth-vod-page .auth-panel-lead {
    margin: 0 0 1.25rem;
    color: var(--av-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.6;
}

.auth-vod-page .auth-phone-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 auto 1.15rem;
    padding: 0.35rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--av-border);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    direction: ltr;
}

.auth-vod-page .auth-phone-chip i {
    color: var(--av-primary-hot);
    font-size: 1rem;
}

.auth-vod-page .auth-phone-chip-wrap {
    display: flex;
    justify-content: center;
}

/* ---------- Form ---------- */
.auth-vod-page .auth-field {
    margin-bottom: 1rem;
    text-align: right;
}

.auth-vod-page .auth-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #d8d8e0;
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-vod-page .auth-input {
    width: 100%;
    min-height: 52px;
    padding: 0.85rem 1rem;
    border-radius: var(--av-radius);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    transition: border-color var(--av-ease), background var(--av-ease), box-shadow var(--av-ease);
    -moz-appearance: textfield;
}

.auth-vod-page .auth-input::-webkit-outer-spin-button,
.auth-vod-page .auth-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.auth-vod-page .auth-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
}

.auth-vod-page .auth-input:focus {
    border-color: rgba(225, 25, 143, 0.55);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(139, 24, 116, 0.22);
}

.auth-vod-page .auth-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-vod-page .auth-input--otp {
    text-align: center;
    letter-spacing: 0.35em;
    font-size: 1.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    direction: ltr;
}

.auth-vod-page .auth-error,
.auth-vod-page .error-message {
    display: block;
    margin-top: 0.45rem;
    color: #ff8a9b;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
}

.auth-vod-page .auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #ffb3bd;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: right;
    line-height: 1.5;
}

.auth-vod-page .auth-alert i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: #ff8a9b;
}

.auth-vod-page .auth-alert .close {
    margin-right: auto;
    margin-left: 0;
    color: #ffb3bd;
    opacity: 0.7;
    text-shadow: none;
}

/* ---------- Tabs ---------- */
.auth-vod-page .auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    margin: 0 0 1.15rem;
    padding: 0.3rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--av-border);
    list-style: none;
}

.auth-vod-page .auth-tabs .nav-item {
    margin: 0;
}

.auth-vod-page .auth-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--av-muted);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: color var(--av-ease), background var(--av-ease);
}

.auth-vod-page .auth-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.auth-vod-page .auth-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--av-primary), #a51d86);
    box-shadow: 0 8px 20px rgba(139, 24, 116, 0.3);
}

.auth-vod-page .auth-tab i {
    font-size: 1.05rem;
}

/* ---------- Actions ---------- */
.auth-vod-page .auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-vod-page .auth-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.15rem 0 0.25rem;
    color: var(--av-muted);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.auth-vod-page .auth-remember input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--av-primary-hot);
    cursor: pointer;
}

.auth-vod-page .auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    min-height: 52px;
    padding: 0.85rem 1.2rem;
    border: none;
    border-radius: var(--av-radius);
    background: linear-gradient(135deg, var(--av-primary), #b01d8a);
    color: #fff !important;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(139, 24, 116, 0.32);
    transition: transform var(--av-ease), box-shadow var(--av-ease), filter var(--av-ease), opacity var(--av-ease);
}

.auth-vod-page .auth-btn:hover:not(:disabled),
.auth-vod-page .auth-btn:focus:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(225, 25, 143, 0.38);
    filter: brightness(1.05);
    color: #fff !important;
    outline: none;
}

.auth-vod-page .auth-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.auth-vod-page .auth-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.auth-vod-page .auth-btn--ghost:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(225, 25, 143, 0.4);
    box-shadow: none;
}

.auth-vod-page .auth-foot {
    margin-top: 0.35rem;
    text-align: center;
    color: var(--av-muted);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.6;
}

.auth-vod-page .auth-foot a {
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 1px solid rgba(225, 25, 143, 0.45);
    transition: color var(--av-ease), border-color var(--av-ease);
}

.auth-vod-page .auth-foot a:hover {
    color: var(--av-primary-hot);
    border-color: var(--av-primary-hot);
}

.auth-vod-page .auth-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.25rem;
    color: var(--av-muted);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: color var(--av-ease);
}

.auth-vod-page .auth-back:hover {
    color: #fff;
}

/* ---------- Motion ---------- */
@keyframes authRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authBgDrift {
    from {
        transform: scale(1) translate3d(0, 0, 0);
    }
    to {
        transform: scale(1.06) translate3d(-1.5%, 1%, 0);
    }
}

@keyframes authBrandPulse {
    0%, 100% {
        filter: drop-shadow(0 10px 28px rgba(139, 24, 116, 0.35));
    }
    50% {
        filter: drop-shadow(0 14px 36px rgba(225, 25, 143, 0.48));
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-vod-page .auth-stage-bg,
    .auth-vod-page .auth-brand-mark,
    .auth-vod-page .auth-stage-inner,
    .auth-vod-page .auth-brand,
    .auth-vod-page .auth-panel {
        animation: none !important;
    }
}

/* ---------- Tablet / Mobile: clear fixed navbar so logo stays visible ---------- */
@media (max-width: 991.98px) {
    .auth-vod-page .auth-stage {
        align-items: flex-start;
        justify-content: flex-start;
        min-height: 100svh;
        padding: 5.5rem 1rem 2.75rem;
        padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
    }

    .auth-vod-page .auth-stage-inner {
        width: min(100%, 440px);
        margin-inline: auto;
        padding-top: 0.35rem;
    }

    .auth-vod-page .auth-brand {
        margin-top: 0.85rem;
    }

    .auth-vod-page .auth-brand-mark {
        width: clamp(6.75rem, 30vw, 8.75rem);
    }
}

@media (max-width: 575.98px) {
    .auth-vod-page .auth-stage {
        padding: 5.85rem 0.85rem 2.5rem;
        padding-top: calc(5.85rem + env(safe-area-inset-top, 0px));
    }

    .auth-vod-page .auth-brand {
        margin-top: 1.15rem;
        gap: 0.5rem;
    }

    .auth-vod-page .auth-brand-mark {
        width: clamp(6.25rem, 34vw, 8rem);
    }

    .auth-vod-page .auth-brand-name {
        font-size: 1.55rem;
    }

    .auth-vod-page .auth-brand-tag {
        font-size: 0.88rem;
        padding-inline: 0.35rem;
    }

    .auth-vod-page .auth-panel {
        padding: 1.25rem 1.05rem 1.2rem;
        margin-top: 0.15rem;
    }

    .auth-vod-page .auth-input--otp {
        letter-spacing: 0.28em;
        font-size: 1.2rem;
    }
}
