/* ローディングアニメーション - Mikan.inc Game Website */

/* メインローディング画面 */
.main-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(29, 38, 46, 0.4), rgba(29, 38, 46, 0.4)),
        url('../photo/War-of-the-Arcana-loading.jpg?v=1') center/cover no-repeat fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.main-loading-screen.loaded {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: #FDFDFD;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    padding: 2rem;
    background: rgba(29, 38, 46, 0.8);
    border-radius: 15px;
    border: 1px solid rgba(253, 253, 253, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.loading-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(253, 253, 253, 0.2);
    animation: logoGlow 2s ease-in-out infinite alternate;
}

.loading-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #FDFDFD, #8F9EA3, #FDFDFD);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShimmer 3s ease-in-out infinite;
}

.loading-subtitle {
    font-size: 1.1rem;
    color: #8F9EA3;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.loading-progress-container {
    width: 100%;
    max-width: 300px;
    margin-bottom: 1rem;
}

.loading-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(253, 253, 253, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loading-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FDFDFD, #8F9EA3);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.loading-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s linear infinite;
}

.loading-text {
    font-size: 0.9rem;
    color: #8F9EA3;
    margin-top: 1rem;
    animation: textPulse 2s ease-in-out infinite;
}

/* アニメーション */
@keyframes logoGlow {
    0% { box-shadow: 0 10px 30px rgba(253, 253, 253, 0.2); }
    100% { box-shadow: 0 10px 30px rgba(253, 253, 253, 0.4); }
}

@keyframes titleShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes textPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* 小さなローディングスピナー（部分的なローディング用） */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    display: none;
}

.loading-spinner.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(253, 253, 253, 0.3);
    border-top: 3px solid #FDFDFD;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ローディングオーバーレイ（既存システム用） */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1D262E 0%, #2A3A44 100%);
    z-index: 9998;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-overlay.inactive {
    opacity: 0;
    visibility: hidden;
}

/* ページフェードイン効果 */
body.loading {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .loading-content {
        max-width: 90%;
        padding: 1.5rem;
    }
    
    .loading-logo {
        width: 100px;
        height: 100px;
        margin-bottom: 1.5rem;
    }
    
    .loading-title {
        font-size: 1.5rem;
    }
    
    .loading-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .loading-content {
        padding: 1rem;
    }
    
    .loading-logo {
        width: 80px;
        height: 80px;
    }
    
    .loading-title {
        font-size: 1.3rem;
    }
    
    .loading-progress-container {
        max-width: 250px;
    }
}













