html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 135, 48, 0.20), transparent 34%),
        radial-gradient(circle at bottom right, rgba(20, 184, 128, 0.16), transparent 28%),
        linear-gradient(135deg, #f6efe6 0%, #f7f3ec 50%, #eef4ff 100%);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body,
canvas {
    touch-action: none;
    overscroll-behavior: none;
}

body.app-ready {
    background: transparent;
}

#root {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 220ms ease;
}

body.app-ready #root {
    opacity: 1;
}

#boot-splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(255, 135, 48, 0.20), transparent 34%),
        radial-gradient(circle at bottom right, rgba(20, 184, 128, 0.16), transparent 28%),
        linear-gradient(135deg, #f6efe6 0%, #f7f3ec 50%, #eef4ff 100%);
    transition: opacity 320ms ease, visibility 320ms ease;
}

body.app-ready #boot-splash {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.boot-card {
    position: relative;
    overflow: hidden;
    width: min(360px, calc(100vw - 48px));
    padding: 28px 26px 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        0 24px 60px rgba(71, 56, 33, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    text-align: center;
    animation: boot-card-breathe 3.6s cubic-bezier(0.37, 0.0, 0.22, 1) infinite;
}

.boot-card-sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 0%,
        transparent 30%,
        rgba(255, 255, 255, 0.38) 48%,
        transparent 62%,
        transparent 100%
    );
    transform: translateX(-145%);
    animation: boot-sheen 3.8s cubic-bezier(0.22, 1, 0.36, 1) infinite;
    pointer-events: none;
}

.boot-logo-wrap {
    position: relative;
    width: 108px;
    height: 108px;
    margin: 0 auto 18px;
    display: grid;
    place-items: center;
}

.boot-logo-ring {
    position: absolute;
    inset: 6px;
    border-radius: 50%;
    border: 1.5px solid rgba(30, 36, 50, 0.10);
    border-top-color: rgba(255, 135, 48, 0.55);
    border-right-color: rgba(20, 184, 128, 0.42);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18);
    animation: boot-ring-spin 5.4s linear infinite;
}

.boot-logo-glow {
    position: absolute;
    inset: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 135, 48, 0.20), rgba(20, 184, 128, 0.20));
    filter: blur(12px);
    animation: boot-glow-pulse 2.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.boot-logo {
    position: relative;
    width: 94px;
    height: 94px;
    object-fit: contain;
    transform-origin: center center;
    animation: boot-logo-drift 3.2s cubic-bezier(0.37, 0.0, 0.22, 1) infinite;
}

.boot-brand {
    font-size: 26px;
    font-weight: 800;
    color: #1e2432;
    letter-spacing: 0.01em;
    animation: boot-text-fade 2.8s ease-in-out infinite;
}

.boot-copy {
    margin-top: 8px;
    color: #6f7688;
    font-size: 14px;
    font-weight: 500;
    animation: boot-text-fade 2.8s ease-in-out infinite;
}

.boot-progress {
    margin: 20px auto 0;
    width: 94px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.boot-progress span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff8730, #14b880);
    box-shadow: 0 6px 16px rgba(255, 135, 48, 0.20);
    animation: boot-dot-wave 1.35s cubic-bezier(0.37, 0.0, 0.22, 1) infinite;
}

.boot-progress span:nth-child(2) {
    animation-delay: 0.14s;
}

.boot-progress span:nth-child(3) {
    animation-delay: 0.28s;
}

@keyframes boot-card-breathe {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow:
            0 24px 60px rgba(71, 56, 33, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }
    50% {
        transform: translateY(-3px) scale(1.004);
        box-shadow:
            0 28px 68px rgba(71, 56, 33, 0.14),
            inset 0 1px 0 rgba(255, 255, 255, 0.86);
    }
}

@keyframes boot-sheen {
    0%, 100% {
        transform: translateX(-145%);
        opacity: 0;
    }
    18% {
        opacity: 0;
    }
    42% {
        opacity: 1;
    }
    64% {
        transform: translateX(145%);
        opacity: 0;
    }
}

@keyframes boot-ring-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes boot-glow-pulse {
    0%, 100% {
        transform: scale(0.94);
        opacity: 0.72;
    }
    50% {
        transform: scale(1.04);
        opacity: 1;
    }
}

@keyframes boot-logo-drift {
    0%, 100% {
        transform: translateY(0) rotate(0deg) scale(1);
    }
    25% {
        transform: translateY(-2px) rotate(-1.2deg) scale(1.012);
    }
    50% {
        transform: translateY(-5px) rotate(0deg) scale(1.02);
    }
    75% {
        transform: translateY(-2px) rotate(1.2deg) scale(1.012);
    }
}

@keyframes boot-dot-wave {
    0%, 100% {
        transform: translateY(0) scale(0.80);
        opacity: 0.35;
    }
    30% {
        transform: translateY(-2px) scale(0.92);
        opacity: 0.72;
    }
    55% {
        transform: translateY(-6px) scale(1);
        opacity: 1;
    }
    75% {
        transform: translateY(-1px) scale(0.92);
        opacity: 0.72;
    }
}

@keyframes boot-text-fade {
    0%, 100% {
        opacity: 0.84;
    }
    50% {
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .boot-card {
        width: min(320px, calc(100vw - 32px));
        padding: 24px 20px 20px;
        border-radius: 24px;
    }

    .boot-logo-wrap {
        width: 94px;
        height: 94px;
        margin-bottom: 16px;
    }

    .boot-logo-ring {
        inset: 5px;
    }

    .boot-logo {
        width: 82px;
        height: 82px;
    }

    .boot-brand {
        font-size: 22px;
    }
}
