/* ========================================
   スクロール進行バー - 冒険の進捗
   ======================================== */

/* 進行バーコンテナ */
.scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(26, 26, 46, 0.8);
    z-index: 999;
    backdrop-filter: blur(10px);
}

/* 進行バー */
.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    width: 0%;
    transition: width 0.1s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.8), 0 0 20px rgba(255, 215, 0, 0.4);
}

/* グローエフェクト */
.scroll-progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: progressGlow 2s infinite;
}

@keyframes progressGlow {
    0% {
        left: -100%;
    }
    100% {
        left: 200%;
    }
}

/* 進行バーの先端（プレイヤーアイコン） */
.scroll-progress-icon {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    animation: iconPulse 1.5s ease-in-out infinite;
}

.scroll-progress-icon i {
    font-size: 0.7rem;
    color: var(--color-dark);
}

@keyframes iconPulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
        box-shadow: 0 0 25px rgba(255, 215, 0, 1);
    }
}

/* 進捗テキスト（オプション） */
.scroll-progress-text {
    position: fixed;
    top: 8px;
    right: 20px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    color: var(--color-primary);
    z-index: 1000;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-progress-text.visible {
    opacity: 1;
}

/* スクロール時にヘッダーと重ならないように */
.header {
    margin-top: 4px;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .scroll-progress-container {
        height: 3px;
    }
    
    .scroll-progress-icon {
        width: 20px;
        height: 20px;
        right: -10px;
    }
    
    .scroll-progress-icon i {
        font-size: 0.6rem;
    }
    
    .scroll-progress-text {
        font-size: 0.6rem;
        top: 6px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .scroll-progress-text {
        display: none;
    }
}
