html,
body {
    width: 100%;
    height: 100%;
}

body {
    background:
        radial-gradient(circle at top, rgba(255, 191, 0, 0.22), transparent 30%),
        radial-gradient(circle at 20% 85%, rgba(255, 120, 0, 0.18), transparent 24%),
        linear-gradient(180deg, #151512 0%, #26231d 55%, #171614 100%);
    margin: 0;
    overflow: hidden;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
}

#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    overflow: hidden;
    transition: opacity 240ms ease, visibility 240ms ease;
    background:
        linear-gradient(180deg, rgba(6, 6, 8, 0.72) 0%, rgba(10, 10, 12, 0.88) 55%, rgba(6, 6, 8, 0.96) 100%),
        url(../assets/background/bg_mergegunfire2.png) center center / cover no-repeat;
}

#loading-screen.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 12%, rgba(255, 202, 92, 0.26), transparent 28%),
        radial-gradient(circle at 15% 80%, rgba(255, 119, 45, 0.18), transparent 22%),
        linear-gradient(145deg, rgba(5, 5, 6, 0.52), rgba(18, 14, 12, 0.72));
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.loading-backdrop::before,
.loading-backdrop::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 195, 87, 0.35), rgba(255, 195, 87, 0));
    filter: blur(8px);
    animation: drift 8s ease-in-out infinite;
}

.loading-backdrop::before {
    width: 24vmin;
    height: 24vmin;
    top: 10%;
    left: 8%;
}

.loading-backdrop::after {
    width: 30vmin;
    height: 30vmin;
    right: 6%;
    bottom: 8%;
    animation-delay: -3s;
}

.loading-card {
    position: relative;
    width: min(90vw, 460px);
    padding: clamp(24px, 5vw, 40px);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(24, 18, 16, 0.78), rgba(12, 10, 9, 0.9));
    border: 1px solid rgba(255, 222, 155, 0.16);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: #fff6d7;
    text-align: center;
}

.loading-card::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 220, 150, 0.12);
    pointer-events: none;
}

.loading-badge {
    display: inline-grid;
    grid-auto-flow: column;
    gap: 10px;
    align-items: end;
    margin-bottom: 18px;
}

.loading-badge span {
    width: 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd56a 0%, #ff8e3d 100%);
    box-shadow: 0 0 18px rgba(255, 181, 77, 0.45);
    animation: pulseStick 1.1s ease-in-out infinite;
}

.loading-badge span:nth-child(1) {
    height: 42px;
    transform: rotate(-8deg);
}

.loading-badge span:nth-child(2) {
    height: 62px;
    animation-delay: 0.12s;
}

.loading-badge span:nth-child(3) {
    height: 48px;
    transform: rotate(8deg);
    animation-delay: 0.24s;
}

.loading-kicker {
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.72rem;
    color: rgba(255, 226, 162, 0.75);
}

.loading-title {
    margin: 0;
    font-size: clamp(2rem, 8vw, 3.7rem);
    line-height: 0.92;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff9e9;
    text-shadow:
        0 4px 0 rgba(0, 0, 0, 0.24),
        0 0 28px rgba(255, 198, 92, 0.24),
        0 0 42px rgba(255, 124, 46, 0.14);
}

.loading-subtitle {
    margin: 12px 0 26px;
    font-size: clamp(0.95rem, 2.8vw, 1.05rem);
    color: rgba(255, 242, 207, 0.78);
}

.loading-bar {
    position: relative;
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.loading-bar-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ffd96f 0%, #ffb347 48%, #ff7d2d 100%);
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
    transition: width 180ms ease;
}

.loading-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    font-size: 0.9rem;
    color: rgba(255, 243, 215, 0.82);
}

#game-container {
    position: relative;
    z-index: 1;
}

#orientation {
    margin: 0 auto;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../assets/orientation.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-color: rgb(0, 0, 0);
    z-index: 999;
    display: none;
}

/* #banner {
    margin: 0 auto;
    position: absolute;
    bottom: 0;
    display: block;
    left: 50%;
    transform: translateX(-50%);
} */

#banner {
    margin: 0 auto;
    position: fixed;
    top: 0;
    display: block;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes pulseStick {
    0%, 100% {
        transform: translateY(0) scaleY(1);
    }

    50% {
        transform: translateY(-6px) scaleY(1.06);
    }
}

@keyframes drift {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(20px, -16px, 0) scale(1.08);
    }
}

@media (max-width: 640px) {
    .loading-card {
        width: min(92vw, 420px);
        padding: 22px 18px 20px;
        border-radius: 22px;
    }

    .loading-meta {
        font-size: 0.82rem;
    }
}
