/* Màn chờ lần đầu vào trang (SplashScreen.tsx): nền xanh thương hiệu, logo, thanh tiến độ vàng */

/* Nằm trên mọi lớp khác, kể cả loading chuyển trang (1000) */
.app-splash {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(ellipse at 50% 22%, #0e9330 0%, #087c24 42%, #04581a 100%);
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.app-splash.is-leaving {
    opacity: 0;
    visibility: hidden;
}

.app-splash-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(340px, 100%);
}

.app-splash-logo {
    width: min(230px, 68%);
    margin-bottom: 30px;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.35));
    animation: app-splash-breathe 1.8s ease-in-out infinite;
}

.app-splash-bar {
    width: 100%;
    height: 16px;
    padding: 3px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.35);
    background: rgba(0, 35, 8, 0.55);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Sọc chéo trắng chạy trên nền vàng; ô 16px lặp lại nên dịch đúng 16px là liền mạch */
.app-splash-fill {
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.32) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.32) 50%, rgba(255, 255, 255, 0.32) 75%, transparent 75%, transparent) 0 0 / 16px 16px,
        linear-gradient(180deg, #fff7b0 0%, #f8d63c 55%, #e2a91a 100%);
    box-shadow: 0 0 10px rgba(248, 230, 79, 0.65);
    animation: app-splash-stripes 0.7s linear infinite;
}

.app-splash-text {
    margin: 14px 0 0;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

/* Số có độ rộng cố định để chữ không rung khi phần trăm thay đổi */
.app-splash-text strong {
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

@keyframes app-splash-stripes {
    to {
        background-position: 16px 0, 0 0;
    }
}

@keyframes app-splash-breathe {
    50% {
        transform: scale(1.03);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-splash-logo,
    .app-splash-fill {
        animation: none;
    }
}
