/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    /* Updated to 99999 to match HTML override */
    transition: opacity 1s ease, visibility 1s ease;
    flex-direction: column;
    /* 가로 정렬 -> 세로 정렬로 변경 */
    gap: 20px;
    /* 로고와 숫자 사이 간격 */
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    width: 250px;
    /* Adjusted size for icon */
    height: 250px;
}

.logo-path {
    fill: transparent;
    stroke: #ffffff;
    stroke-width: 0.5px;
    /* Thicker for icon */
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 3000;
    /* Approximate path length */
    stroke-dashoffset: 3000;
    animation: drawLogo 2.5s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* [RESTORED] JS Triggered Fill State */
.preloader-logo.filled .logo-path {
    fill: #ffffff !important;
    stroke-dashoffset: 0 !important;
    transition: fill 0.5s ease;
}

@keyframes drawLogo {
    0% {
        stroke-dashoffset: 3000;
        /* fill: transparent; Removed to let JS control */
    }

    60% {
        stroke-dashoffset: 0;
        /* fill: transparent; Removed to let JS control */
    }

    100% {
        stroke-dashoffset: 0;
        /* fill: #ffffff; Removed to let JS control */
        /* Keep transparent or fill if it's a closed shape.
                              For open lines (like this H), fill should usually remain transparent
                              or be handled carefully. Let's keep transparent for line art feel. */
    }
}

/* 퍼센트 숫자 디자인 */
#percent-text {
    font-family: 'Inter', sans-serif;
    /* 폰트는 원하시는 걸로 */
    color: #ffffff;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0.8;
}

#loading-text {
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    font-size: 14px;
    font-weight: 300;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-top: 10px;
    animation: blink 1.5s infinite ease-in-out;
}

@keyframes blink {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.3;
    }
}