/* ==========================================================================
   LUCKHAND GAMING - CINEMATIC MOTION-GRAPHICS PRELOADER & FLIP FLIGHT
   Top-to-Bottom Cascading Entrance Choreography after Logo Docking
   ========================================================================== */

/* 1. Global Critical Background */
html, body {
    background-color: #070c14 !important;
}

html.age-already-verified #initial-loader {
    display: none !important;
}

/* 2. Fullscreen Preloader Container */
#initial-loader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #070c14;
    z-index: 2147483647;
    overflow: hidden;
    pointer-events: auto;
}

/* 3. Luxury Radial Backdrop Curtain */
.loader-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: radial-gradient(circle at 50% 45%, #0f1c2d 0%, #070c14 70%, #03060a 100%);
    z-index: 100;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.85s ease;
}

.loader-backdrop.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 4. Ambient Center Lighting */
.loader-ambient-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.14) 0%, rgba(20, 35, 55, 0.05) 50%, transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: 110;
    transition: opacity 0.6s ease;
}

/* 5. Motion Graphics Flight Logo (Always on top with smooth physics) */
.loader-flight-logo-fixed {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 220px;
    max-width: 65vw;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    will-change: transform;
    pointer-events: none;
    user-select: none;
    transform-origin: center center;
}

.loader-flight-logo-fixed img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.85));
}

/* 6. Fixed Meta Controls (Percentage & Progress Bar & Enter CTA) */
.loader-meta-fixed {
    position: fixed;
    top: calc(50% + 45px);
    left: 50%;
    transform: translate(-50%, 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 360px;
    max-width: 90vw;
    z-index: 150;
    pointer-events: auto;
    transition: opacity 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.loader-meta-fixed.fade-out {
    opacity: 0;
    transform: translate(-50%, 12px) scale(0.96);
    pointer-events: none;
}

.loader-progress-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.loader-progress-group.fade-out-progress {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    position: absolute;
}

/* Digital Monospace Percentage Counter */
.loader-percent-counter {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 1.65rem;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 14px;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
    font-variant-numeric: tabular-nums;
}

/* Sleek Golden Progress Line */
.loader-progress-track {
    width: 220px;
    height: 3.5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.loader-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #d97706 0%, #fbbf24 85%, #fef08a 100%);
    border-radius: 999px;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.9);
    transition: width 0.08s linear;
}

.loader-status-text {
    margin: 14px 0 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(240, 246, 252, 0.75);
    text-align: center;
    transition: opacity 0.2s ease;
    min-height: 1.2em;
}

/* Interactive Enter Button & Age Verification (Reveals at 100% to confirm +18 & trigger Flight) */
.loader-verification-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.96);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
    margin-top: 4px;
}

.loader-verification-group.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.loader-age-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    padding: 9px 20px;
    border-radius: 999px;
    background: rgba(15, 28, 45, 0.7);
    border: 1px solid rgba(251, 191, 36, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.loader-age-checkbox-label:hover {
    border-color: rgba(251, 191, 36, 0.7);
    background: rgba(20, 38, 60, 0.85);
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.25);
}

.loader-age-checkbox-label.is-checked {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.12);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.25);
}

.loader-age-native-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.loader-age-custom-check {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 1.5px solid rgba(251, 191, 36, 0.6);
    background: rgba(7, 12, 20, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.loader-age-native-check:checked + .loader-age-custom-check {
    background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
    border-color: #fbbf24;
    color: #070c14;
    box-shadow: 0 0 14px rgba(251, 191, 36, 0.8);
}

.loader-age-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.6px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.loader-enter-btn {
    position: relative;
    display: inline-flex;
    background: linear-gradient(135deg, #fde68a 0%, #fbbf24 35%, #d97706 100%);
    color: #070c14;
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 14px 42px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.55), 0 8px 24px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.3s ease, filter 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.loader-enter-btn[disabled] {
    opacity: 0.35;
    filter: grayscale(0.8);
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: scale(0.96);
    animation: none;
}

.loader-enter-btn:not([disabled]) {
    opacity: 1;
    filter: none;
    cursor: pointer;
    pointer-events: auto;
    transform: scale(1);
    animation: enterBtnPulse 2.2s infinite ease-in-out;
}

.loader-enter-btn:not([disabled]):hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 0 38px rgba(251, 191, 36, 0.75), 0 12px 28px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    filter: brightness(1.06);
}

.loader-enter-btn:not([disabled]):active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 0 18px rgba(251, 191, 36, 0.4), 0 4px 12px rgba(0, 0, 0, 0.7);
    filter: brightness(0.95);
}

.loader-enter-btn-text {
    position: relative;
    z-index: 2;
    display: inline-block;
}

.loader-enter-btn-icon {
    position: relative;
    z-index: 2;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.loader-enter-btn:hover .loader-enter-btn-icon {
    transform: translateX(4px);
}

.loader-enter-btn-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.5) 0%, transparent 65%);
    pointer-events: none;
    z-index: 1;
}

@keyframes enterBtnPulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(251, 191, 36, 0.45), 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 40px rgba(251, 191, 36, 0.8), 0 10px 28px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.95);
        transform: scale(1.035);
    }
}

/* 7. Hero Target Logo */
.hero-logo-center {
    opacity: 1;
    visibility: visible;
}

/* Preloader Backdrop Fade-Out */
.loader-backdrop.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.65s ease;
}

/* 9. Mobile Responsiveness */
@media (max-width: 768px) {
    .loader-flight-logo-fixed {
        width: 165px;
        transform: translate(-50%, -65%);
    }

    .loader-meta-fixed {
        top: calc(50% + 35px);
        width: 300px;
    }

    .loader-percent-counter {
        font-size: 1.35rem;
        margin-bottom: 10px;
    }

    .loader-progress-track {
        width: 160px;
        height: 3px;
    }

    .loader-status-text {
        font-size: 0.68rem;
        letter-spacing: 2px;
        margin-top: 10px;
    }

    .loader-enter-btn {
        padding: 12px 30px;
        font-size: 0.82rem;
        letter-spacing: 2px;
    }
}
