/* ============================================================
   PCCU Repair System PWA Splash Screen
   ============================================================ */

#pwa-splash {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    background:
        linear-gradient(148deg, rgba(16, 125, 213, 0.10) 0%, rgba(16, 125, 213, 0) 34%),
        linear-gradient(135deg, #1a2333 0%, #243044 54%, #1c2d3e 100%);
    transition: opacity 0.55s ease, visibility 0.55s ease;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
}

#pwa-splash.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#pwa-splash::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(26deg, transparent 0 47%, rgba(245, 215, 122, 0.15) 47% 48%, transparent 48% 100%),
        linear-gradient(153deg, transparent 0 59%, rgba(255, 255, 255, 0.11) 59% 60%, transparent 60% 100%);
    pointer-events: none;
}

#pwa-splash::after {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(50% - 72px);
    width: 238px;
    height: 238px;
    border: 1px solid rgba(245, 215, 122, 0.28);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#pwa-splash .splash-icon {
    position: relative;
    z-index: 1;
    width: 124px;
    height: 124px;
    border-radius: 28px;
    box-shadow: 0 18px 48px rgba(23, 6, 17, 0.42), 0 0 0 1px rgba(245, 215, 122, 0.35);
    margin-bottom: 28px;
    animation: splashIconIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

#pwa-splash .splash-title {
    position: relative;
    z-index: 1;
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    font-size: 1.625rem;
    font-weight: 700;
    letter-spacing: 0;
    color: #fffaf0;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
    margin: 0;
    animation: splashTextIn 0.6s ease 0.15s both;
}

#pwa-splash .splash-subtitle {
    position: relative;
    z-index: 1;
    font-family: 'Inter', 'Noto Sans TC', sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0;
    color: rgba(255, 250, 240, 0.78);
    margin: 7px 0 0;
    animation: splashTextIn 0.6s ease 0.25s both;
}

#pwa-splash .splash-loader {
    position: relative;
    z-index: 1;
    margin-top: 42px;
    width: 36px;
    height: 36px;
    animation: splashTextIn 0.5s ease 0.35s both;
}

#pwa-splash .splash-loader svg {
    width: 100%;
    height: 100%;
    animation: splashSpin 0.9s linear infinite;
    transform-origin: center;
}

#pwa-splash .splash-loader-track {
    fill: none;
    stroke: rgba(255, 250, 240, 0.22);
    stroke-width: 3;
}

#pwa-splash .splash-loader-fill {
    fill: none;
    stroke: #f5d77a;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 56;
    stroke-dashoffset: 42;
}

@keyframes splashIconIn {
    from { opacity: 0; transform: scale(0.64) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes splashTextIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes splashSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media not (display-mode: standalone) {
    #pwa-splash {
        display: none !important;
    }
}
