/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --fn-blue: #1e3a5f;
    --fn-blue-dark: #0a1628;
    --fn-violet: #7b2ff7;
    --fn-violet-dark: #2d1b69;
    --fn-yellow: #f5c518;
    --fn-yellow-light: #ffe066;
    --fn-white: #ffffff;
    --fn-gray: #a0aec0;
    --ease-out-expo: cubic-bezier(0.05, 0.98, 0.15, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-smooth: cubic-bezier(0.04, 0.95, 0.1, 1);
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #050510;
    color: var(--fn-white);
    margin: 0;
    height: 100vh;
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
    transition: opacity 1s ease;
}

.loading-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay.hidden {
    display: none;
}

/* Background clouds — slow zoom */
.loading-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.loading-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.06);
    animation: loadingBgZoom 8s ease-out forwards;
}

@keyframes loadingBgZoom {
    0%   { transform: scale(1.06); }
    100% { transform: scale(1.22); }
}

/* Center group — asset + title */
.loading-center {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 2.5rem);
    transform: scale(0.85);
    opacity: 0;
    animation: loadingLogoZoom 7.3s ease-out forwards;
    margin-bottom: 60px;
}

.loading-asset {
    width: clamp(120px, 20vw, 250px);
    height: auto;
    filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.6));
}

/* ===== BOXPAD Text — single violet outline + subtle glow ===== */
.loading-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--fn-white);
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-shadow:
        /* Violet outline — 8 directions */
        -3px -3px 0 #7b2ff7,
         3px -3px 0 #7b2ff7,
        -3px  3px 0 #7b2ff7,
         3px  3px 0 #7b2ff7,
         0   -3px 0 #7b2ff7,
         0    3px 0 #7b2ff7,
        -3px  0   0 #7b2ff7,
         3px  0   0 #7b2ff7,
        /* Subtle glow */
        0 0 15px rgba(123, 47, 247, 0.2),
        0 0 35px rgba(123, 47, 247, 0.08);
}

/* Header title — same style, smaller */
.header-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2.4rem;
    color: var(--fn-white);
    letter-spacing: 0.05em;
    text-shadow:
        /* Violet outline — 8 directions */
        -2px -2px 0 #7b2ff7,
         2px -2px 0 #7b2ff7,
        -2px  2px 0 #7b2ff7,
         2px  2px 0 #7b2ff7,
         0   -2px 0 #7b2ff7,
         0    2px 0 #7b2ff7,
        -2px  0   0 #7b2ff7,
         2px  0   0 #7b2ff7,
        /* Subtle glow */
        0 0 12px rgba(123, 47, 247, 0.18),
        0 0 30px rgba(123, 47, 247, 0.06);
}

@keyframes loadingLogoZoom {
    0%   { transform: scale(0.85); opacity: 0; }
    12%  { opacity: 1; }
    100% { transform: scale(1.08); opacity: 1; }
}

/* Bottom bar + text */
.loading-bottom {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    z-index: 2;
    text-align: center;
}

.loading-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    backdrop-filter: blur(4px);
}

.loading-progress {
    height: 100%;
    background: var(--fn-yellow);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(245, 197, 24, 0.6);
}

#loading-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ===== LANDING PAGE ===== */
.landing {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.landing.hidden {
    display: none;
}

/* ===== Zoom-in arrival transition ===== */
.landing-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    /* Start far away and blurred */
    transform: scale(2.5) translateY(10%);
    opacity: 0;
    filter: blur(20px);
    transition: none;
}

.landing-content.arrived {
    transform: scale(1) translateY(0);
    opacity: 1;
    filter: blur(0);
    transition:
        transform 1.8s var(--ease-out-smooth),
        opacity 0.7s ease-out,
        filter 1.6s var(--ease-out-smooth);
}

/* Background — Fortnite image with dark overlay + parallax */
.landing-bg {
    position: fixed;
    top: -40px;
    left: -40px;
    width: calc(100% + 80px);
    height: calc(100% + 80px);
    z-index: 0;
    transition: transform 0.2s ease-out;
    will-change: transform;
    overflow: hidden;
}

.landing-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

/* Dark overlay on top of the Fortnite bg */
.landing-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(5, 5, 16, 0.55) 0%, rgba(5, 5, 16, 0.85) 70%),
        linear-gradient(to bottom, rgba(5, 5, 16, 0.3) 0%, rgba(5, 5, 16, 0.95) 100%);
}

/* Stars over the bg */
.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}

.star.large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.05; }
    50%      { opacity: 0.8; }
}

/* ===== Staggered entrance animations — smooth Apple-style ===== */
.anim-item {
    opacity: 0;
    transform: translateY(55px) scale(0.94);
    transition:
        opacity 1.1s var(--ease-out-smooth),
        transform 1.1s var(--ease-out-smooth);
}

.anim-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Header */
.landing-header {
    margin-bottom: 2rem;
    padding-top: 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-asset {
    width: 64px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

/* Main Section */
.landing-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    max-width: 560px;
    flex: 1;
    justify-content: center;
}

/* Info Cards (CA + Map ID) — with yellow glow */
.info-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s var(--ease-out-quart);
    position: relative;
    overflow: hidden;
    /* Subtle extended yellow glow */
    box-shadow:
        0 0 40px rgba(245, 197, 24, 0.06),
        0 0 80px rgba(245, 197, 24, 0.03);
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(245, 197, 24, 0.25);
    box-shadow:
        0 0 30px rgba(245, 197, 24, 0.12),
        0 0 60px rgba(245, 197, 24, 0.06),
        0 0 100px rgba(245, 197, 24, 0.03);
    transform: translateY(-2px);
}

.info-card:active {
    transform: translateY(0);
}

.info-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fn-yellow);
    margin-bottom: 0.5rem;
}

.info-value-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.info-value {
    font-family: 'Nunito', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fn-white);
    word-break: break-all;
    flex: 1;
}

.copy-icon {
    color: var(--fn-gray);
    flex-shrink: 0;
    transition: color 0.2s;
}

.info-card:hover .copy-icon {
    color: var(--fn-yellow);
}

.copy-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--fn-yellow);
    color: #000;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.copy-feedback.show {
    opacity: 1;
}

/* Buy Button */
.buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    max-width: 320px;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--fn-yellow) 0%, #e6a800 100%);
    color: #000;
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 14px;
    transition: all 0.3s var(--ease-out-quart);
    box-shadow:
        0 4px 15px rgba(245, 197, 24, 0.3),
        0 0 40px rgba(245, 197, 24, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    margin-top: 0.5rem;
}

.buy-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(245, 197, 24, 0.45),
        0 0 60px rgba(245, 197, 24, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.buy-btn:active {
    transform: translateY(0) scale(0.98);
}

.buy-btn-text {
    white-space: nowrap;
}

/* Socials */
.socials {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--fn-white);
    text-decoration: none;
    transition: all 0.3s var(--ease-out-quart);
}

.social-btn:hover {
    background: rgba(123, 47, 247, 0.25);
    border-color: rgba(123, 47, 247, 0.5);
    box-shadow: 0 0 25px rgba(123, 47, 247, 0.25);
    transform: translateY(-3px);
}

/* Footer */
.landing-footer {
    margin-top: auto;
    padding: 2rem 0 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.25);
}

/* ===== Floating Fortnite Assets ===== */
.floating-assets {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.float-asset {
    position: absolute;
    opacity: 0;
    transition: opacity 1.5s var(--ease-out-smooth);
    will-change: transform;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

/* --- Depth of Field opacity per layer --- */
.float-asset.visible.llama-bg-1,
.float-asset.visible.llama-bg-2,
.float-asset.visible.llama-bg-3 {
    opacity: 0.22;
}
.float-asset.visible.llama-mid-1,
.float-asset.visible.llama-mid-2,
.float-asset.visible.llama-mid-3 {
    opacity: 0.38;
}
.float-asset.visible.llama-fg-1,
.float-asset.visible.llama-fg-2 {
    opacity: 0.18;
}

/* ============================
   BACKGROUND LAYER — small, far, slightly blurred, slow
   ============================ */
.llama-bg-1 {
    left: 18%;
    top: 8%;
    width: 42px;
    filter: blur(2px) drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    animation: floatA 9s ease-in-out infinite;
}

.llama-bg-2 {
    right: 15%;
    bottom: 12%;
    width: 38px;
    transform: scaleX(-1) rotate(8deg);
    filter: blur(2.5px) drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    animation: floatC 10s ease-in-out infinite;
    animation-delay: 2s;
}

.llama-bg-3 {
    left: 28%;
    bottom: 18%;
    width: 35px;
    transform: rotate(-10deg);
    filter: blur(1.8px) drop-shadow(0 2px 8px rgba(0,0,0,0.3));
    animation: floatD 8.5s ease-in-out infinite;
    animation-delay: 3.5s;
}

/* ============================
   MID LAYER — medium, sharp, moderate speed
   ============================ */
.llama-mid-1 {
    left: 8%;
    top: 22%;
    width: 85px;
    transform: rotate(-7deg);
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
    animation: floatB 6s ease-in-out infinite;
    animation-delay: 0.5s;
}

.llama-mid-2 {
    right: 10%;
    top: 35%;
    width: 70px;
    transform: scaleX(-1) rotate(5deg);
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
    animation: floatD 6.8s ease-in-out infinite;
    animation-delay: 1.8s;
}

.llama-mid-3 {
    left: 12%;
    bottom: 8%;
    width: 75px;
    transform: scaleX(-1) rotate(12deg);
    filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5));
    animation: floatA 5.5s ease-in-out infinite;
    animation-delay: 3s;
}

/* ============================
   FOREGROUND LAYER — very large, very blurred, close to camera
   ============================ */
.llama-fg-1 {
    left: -3%;
    top: 30%;
    width: 220px;
    transform: rotate(15deg);
    filter: blur(8px) drop-shadow(0 6px 30px rgba(0,0,0,0.4));
    animation: floatC 7s ease-in-out infinite;
    animation-delay: 1s;
}

.llama-fg-2 {
    right: -4%;
    bottom: 5%;
    width: 250px;
    transform: scaleX(-1) rotate(-10deg);
    filter: blur(10px) drop-shadow(0 6px 30px rgba(0,0,0,0.4));
    animation: floatB 8s ease-in-out infinite;
    animation-delay: 2.5s;
}

@keyframes floatA {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-18px) rotate(3deg); }
}

@keyframes floatB {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-22px) rotate(-4deg); }
}

@keyframes floatC {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%      { transform: translateY(-15px) rotate(2deg); }
}

@keyframes floatD {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50%      { transform: translateY(-20px) rotate(-3deg); }
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .loading-center {
        flex-direction: column;
        gap: 0.5rem;
    }

    .loading-asset {
        width: 100px;
    }

    .loading-title {
        font-size: 2.5rem;
        text-shadow:
            -2px -2px 0 #7b2ff7,
             2px -2px 0 #7b2ff7,
            -2px  2px 0 #7b2ff7,
             2px  2px 0 #7b2ff7,
             0   -2px 0 #7b2ff7,
             0    2px 0 #7b2ff7,
            -2px  0   0 #7b2ff7,
             2px  0   0 #7b2ff7,
            0 0 12px rgba(123, 47, 247, 0.18);
    }

    .info-value {
        font-size: 0.72rem;
    }

    .buy-btn {
        font-size: 1.1rem;
        padding: 0.85rem 1.5rem;
    }

    .header-asset {
        width: 44px;
    }

    .header-title {
        font-size: 1.6rem;
    }

    .landing-content {
        transform: scale(2) translateY(8%);
    }

    .floating-assets {
        display: none;
    }
}
