/* ローディング画面のスタイル */

/* ローディングオーバーレイ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff0fa 0%, #ffe4f7 50%, #ffd6f0 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ローディングコンテナ */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* ロゴアニメーション */
.loading-logo {
    width: 150px;
    height: 150px;
    position: relative;
    animation: floatLogo 2s ease-in-out infinite;
}

.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(255, 105, 180, 0.3));
}

@keyframes floatLogo {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

/* スピナーコンテナ */
.loading-spinner {
    position: relative;
    width: 120px;
    height: 120px;
}

/* ハートスピナー */
.heart-spinner {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: rotate 2s linear infinite;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    transform: rotate(45deg);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 5px 15px rgba(255, 105, 180, 0.4);
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    border-radius: 50%;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    top: 0;
    left: -10px;
}

.heart:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%) rotate(45deg); animation-delay: 0s; }
.heart:nth-child(2) { top: 50%; right: 0; transform: translateY(-50%) rotate(45deg); animation-delay: 0.2s; }
.heart:nth-child(3) { bottom: 0; left: 50%; transform: translateX(-50%) rotate(45deg); animation-delay: 0.4s; }
.heart:nth-child(4) { top: 50%; left: 0; transform: translateY(-50%) rotate(45deg); animation-delay: 0.6s; }

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1) rotate(45deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.3) rotate(45deg);
        opacity: 0.7;
    }
}

/* 中央の円 */
.center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ffb3d6, #ff69b4);
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3);
    animation: centerPulse 2s ease-in-out infinite;
}

@keyframes centerPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 12px 35px rgba(255, 105, 180, 0.5);
    }
}

/* キラキラエフェクト */
.sparkles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #fff, #ff69b4);
    border-radius: 50%;
    animation: sparkleAnimation 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.sparkle:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 20%; right: 15%; animation-delay: 0.3s; }
.sparkle:nth-child(3) { top: 70%; left: 10%; animation-delay: 0.6s; }
.sparkle:nth-child(4) { bottom: 15%; right: 25%; animation-delay: 0.9s; }
.sparkle:nth-child(5) { top: 50%; left: 5%; animation-delay: 1.2s; }
.sparkle:nth-child(6) { top: 30%; left: 85%; animation-delay: 1.5s; }
.sparkle:nth-child(7) { bottom: 25%; left: 30%; animation-delay: 1.8s; }
.sparkle:nth-child(8) { top: 15%; left: 50%; animation-delay: 2.1s; }

@keyframes sparkleAnimation {
    0%, 100% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.5) rotate(180deg);
        opacity: 1;
    }
}

/* ローディングテキスト */
.loading-text {
    font-family: 'Zen Maru Gothic', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff69b4;
    text-shadow: 2px 2px 8px rgba(255, 105, 180, 0.3);
    letter-spacing: 0.1em;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* ドット点滅アニメーション */
.loading-dots {
    display: inline-block;
    margin-left: 0.5rem;
}

.loading-dots span {
    animation: dotBlink 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotBlink {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .loading-logo {
        width: 120px;
        height: 120px;
    }
    
    .loading-spinner {
        width: 100px;
        height: 100px;
    }
    
    .heart {
        width: 16px;
        height: 16px;
    }
    
    .heart::before,
    .heart::after {
        width: 16px;
        height: 16px;
    }
    
    .heart::before {
        top: -8px;
    }
    
    .heart::after {
        left: -8px;
    }
    
    .center-circle {
        width: 50px;
        height: 50px;
    }
    
    .loading-text {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .loading-logo {
        width: 100px;
        height: 100px;
    }
    
    .loading-spinner {
        width: 80px;
        height: 80px;
    }
    
    .heart {
        width: 14px;
        height: 14px;
    }
    
    .heart::before,
    .heart::after {
        width: 14px;
        height: 14px;
    }
    
    .heart::before {
        top: -7px;
    }
    
    .heart::after {
        left: -7px;
    }
    
    .center-circle {
        width: 40px;
        height: 40px;
    }
    
    .loading-text {
        font-size: 1.1rem;
    }
    
    .sparkle {
        width: 6px;
        height: 6px;
    }
}


