#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-dark-blue);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#loader-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.1s ease-out;
}

.loader-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-container {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--color-white);
    display: flex;
    align-items: center;
    white-space: nowrap;
}

@keyframes superNova {
    0% {
        position: fixed;
        left: var(--t-start-x);
        top: var(--t-start-y);
        transform: translate(0, 0) rotate(0deg) scale(1);
        color: var(--color-white);
        text-shadow: none;
        opacity: 1;
    }
    30% {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(360deg) scale(1.2);
        color: var(--color-white);
        text-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
    }
    45% {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(720deg) scale(1.0);
        text-shadow: 0 0 20px var(--color-primary);
        color: #e6f0ff;
    }
    48% {
        transform: translate(-51%, -49%) rotate(720deg) scale(1.05);
        text-shadow: 0 0 40px var(--color-primary), 0 0 80px #00ffff;
    }
    52% {
        transform: translate(-49%, -51%) rotate(720deg) scale(1.1);
        text-shadow: 0 0 60px var(--color-primary), 0 0 100px #00ffff;
    }
    58% {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(720deg) scale(1.15);
        text-shadow: 0 0 80px var(--color-primary), 0 0 150px #ffffff;
    }
    100% {
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(720deg) scale(350);
        opacity: 0;
        text-shadow: none;
    }
}

#text-target.animate-motion {
    animation: superNova 2.5s cubic-bezier(0.7, 0, 0.3, 1) forwards;
    will-change: transform, left, top, text-shadow;
}

#loader.flash-active #loader-flash {
    opacity: 1;
}

#loader.fade-out {
    transition: opacity 0.6s ease;
    opacity: 0;
    pointer-events: none;
}

.cursor, .cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}
.cursor {
    width: 8px;
    height: 8px;
    background-color: var(--color-primary);
}
.cursor.hover-effect {
    transform: translate(-50%, -50%) scale(0);
}
.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-primary);
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
                width 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                height 0.4s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.cursor-follower.hover-effect {
    width: 60px;
    height: 60px;
    background-color: rgba(0, 123, 255, 0.1);
}

.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--color-primary);
    width: 0%;
    z-index: 9998;
    transition: width 0.05s linear;
    box-shadow: 0 0 10px var(--color-primary);
}

.site-header {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.site-header.hide {
    transform: translateY(-100%);
}
.button-primary:hover, .button-secondary:hover {
    transform: translateY(-3px);
}
.back-to-top {
    transition: opacity 0.3s, transform 0.3s;
}
.back-to-top.show {
    transform: translateY(0);
}

@media (max-width: 48em) {
    .title-container {
        font-size: 2rem;
    }
}