#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F5F5F5;
    display: none !important; /* !importantを追加して確実に非表示にする */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    text-align: center;
    opacity: 0; /* 初期状態で透明にする */
    visibility: hidden; /* 初期状態で非表示にする */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* スムーズな表示/非表示のためのトランジション */
}

/* ローディング画面が表示される時のスタイル */
#loading-overlay.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.loading-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #3A3A3A;
}

.loading-content picture {
    display: contents;
}

.loading-content > p {
    font-size: 24px;
    color: #3A3A3A;
    margin-top: 20px;
    font-weight: bold;
}

#progress-percentage {
    font-size: 1.2rem;
    color: #3A3A3A;
    margin-top: 45px;
    display: inline-block;
    font-weight: bold;
}

.loading-content .doodle {
    position: absolute;
}

.doodle-top-right-1 {
    top: -10%;
    right: 25%;
    width: 300px;
    transform: rotate(15deg);
    animation: rotate-doodle-1 2s steps(4) infinite;
}

.doodle-top-right-2 {
    top: 20%;
    right: -30px;
    width: 300px;
    animation: rotate-doodle-2 1.8s steps(4) infinite;
}

.doodle-bottom-left {
    bottom: -10%;
    left: 5%;
    width: 300px;
    animation: rotate-doodle-3 2.2s steps(4) infinite;
}

.doodle-top-left {
    top: -5%;
    width: 300px;
    left: -2%;
    animation: rotate-doodle-3 2.2s steps(4) infinite;
}

.doodle-bottom-right {
    bottom: -5%;
    width: 180px;
    right: 5%;
    animation: rotate-doodle-2 1.8s steps(4) infinite;
}

.bottom-logo {
    position: absolute;
    bottom: 5%;
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    width: 100px;
    filter: invert(1);
}

@keyframes rotate-doodle-1 {
    from {
        transform: rotate(15deg);
    }
    to {
        transform: rotate(375deg);
    }
}

@keyframes rotate-doodle-2 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

@keyframes rotate-doodle-3 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    #loading-overlay .break {
        display: block;
    }

    .loading-content>p {
        width: 60%;
        font-size: 14px;
        font-weight: bold;
        margin-top: 16px;
        line-height: 180%;
        white-space: nowrap;
    }
    .doodle-top-right-1 {
        top: 50%;
        left: -10%;
        width: 150px;
    }
    
    .doodle-top-right-2 {
        top: 10%;
        right: -50px;
        width: 150px;
    }
    
    .doodle-bottom-left {
        bottom: 10%;
        left: 75%;
        width: 150px;
    }
    
    .doodle-top-left {
        top: -5%;
        width: 150px;
        left: -7%;
        animation: rotate-doodle-3 2.2s steps(4) infinite;
    }
    
    .doodle-bottom-right {
        bottom: -5%;
        width: 120px;
        right: 0;
        left: -5%;
        animation: rotate-doodle-2 1.8s steps(4) infinite;
    }

}