/* =====================================================================
   loading_xemphim.css
   Nginx 502 / 503 / 504 fallback page for the movie proxy network
   ===================================================================== */

:root {
    color-scheme: dark;
    --xemphim-bg: #070b14;
    --xemphim-panel: #101827;
    --xemphim-panel-deep: #0b1220;
    --xemphim-text: #f8fafc;
    --xemphim-muted: #9ca3af;
    --xemphim-line: rgba(148, 163, 184, .2);
    --xemphim-primary: #38bdf8;
    --xemphim-primary-deep: #2563eb;
    --xemphim-gold: #fbbf24;
    --xemphim-shadow: 0 22px 65px rgba(0, 0, 0, .5);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.xemphim-loading-page {
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--xemphim-text);
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 0 0, rgba(37, 99, 235, .22), transparent 34%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, .13), transparent 34%),
        var(--xemphim-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.xemphim-loading-card {
    width: min(100%, 640px);
    overflow: hidden;
    text-align: center;
    border: 1px solid var(--xemphim-line);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(21, 31, 49, .98), rgba(10, 15, 27, .98));
    box-shadow: var(--xemphim-shadow);
}

.xemphim-loading-accent {
    height: 3px;
    background: linear-gradient(90deg, var(--xemphim-primary-deep), var(--xemphim-primary), var(--xemphim-gold));
}

.xemphim-loading-content {
    padding: 34px 28px 30px;
}

.xemphim-loading-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(56, 189, 248, .32);
    border-radius: 20px;
    background: rgba(56, 189, 248, .09);
    box-shadow: inset 0 0 24px rgba(56, 189, 248, .08);
    font-size: 30px;
    line-height: 1;
}

.xemphim-loading-card h1 {
    margin: 0;
    color: var(--xemphim-text);
    font-size: clamp(22px, 4vw, 30px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.35px;
}

.xemphim-loading-desc {
    max-width: 520px;
    margin: 13px auto 0;
    color: var(--xemphim-muted);
    font-size: 15px;
    line-height: 1.7;
}

.xemphim-loading-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    margin: 19px auto 0;
    padding: 8px 12px;
    color: #cbd5e1;
    border: 1px solid rgba(56, 189, 248, .2);
    border-radius: 999px;
    background: rgba(15, 23, 42, .7);
    font-size: 13px;
    line-height: 1.45;
}

.xemphim-loading-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--xemphim-gold);
    box-shadow: 0 0 0 5px rgba(251, 191, 36, .11);
    animation: xemphim-loading-pulse 1.6s ease-in-out infinite;
}

.xemphim-loading-status.is-finished .xemphim-loading-dot {
    background: var(--xemphim-primary);
    box-shadow: 0 0 0 5px rgba(56, 189, 248, .1);
    animation: none;
}

.xemphim-loading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 26px;
}

.xemphim-loading-button {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 15px 16px;
    color: #fff;
    text-align: left;
    text-decoration: none;
    border: 1px solid var(--xemphim-line);
    border-radius: 14px;
    background: rgba(15, 23, 42, .72);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.xemphim-loading-button:hover,
.xemphim-loading-button:focus-visible {
    color: #fff;
    border-color: rgba(56, 189, 248, .68);
    background: rgba(30, 41, 59, .95);
    outline: none;
    transform: translateY(-2px);
}

.xemphim-loading-button:focus-visible,
.xemphim-loading-reload:focus-visible {
    outline: 2px solid var(--xemphim-primary);
    outline-offset: 3px;
}

.xemphim-loading-button strong {
    font-size: 15px;
    line-height: 1.4;
}

.xemphim-loading-button span {
    color: #a5b4c7;
    font-size: 12px;
    line-height: 1.5;
}

.xemphim-loading-button-primary {
    border-color: rgba(56, 189, 248, .46);
    background: linear-gradient(135deg, rgba(37, 99, 235, .6), rgba(14, 165, 233, .25));
}

.xemphim-loading-button-primary:hover,
.xemphim-loading-button-primary:focus-visible {
    border-color: rgba(125, 211, 252, .9);
    background: linear-gradient(135deg, rgba(37, 99, 235, .8), rgba(14, 165, 233, .38));
}

.xemphim-loading-reload {
    min-height: 42px;
    margin-top: 18px;
    padding: 10px 18px;
    color: #dbeafe;
    border: 1px solid rgba(148, 163, 184, .27);
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-size: 13px;
    line-height: 1.3;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.xemphim-loading-reload:hover {
    color: #fff;
    border-color: rgba(56, 189, 248, .68);
    background: rgba(56, 189, 248, .09);
}

.xemphim-loading-footer {
    padding: 15px 20px;
    color: #7f8ea3;
    border-top: 1px solid var(--xemphim-line);
    background: rgba(2, 6, 23, .3);
    font-size: 12px;
    line-height: 1.6;
}

@keyframes xemphim-loading-pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .58;
        transform: scale(.82);
    }
}

@media (max-width: 560px) {
    body.xemphim-loading-page {
        padding: 12px;
    }

    .xemphim-loading-content {
        padding: 28px 18px 24px;
    }

    .xemphim-loading-actions {
        grid-template-columns: 1fr;
    }

    .xemphim-loading-button {
        min-height: 78px;
        align-items: center;
        text-align: center;
    }

    .xemphim-loading-status {
        align-items: flex-start;
        border-radius: 14px;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
