/* ================================================
   学習完了率プログレスバー CSS
   ================================================ */

/* プログレスバーコンテナ */
.learning-progress-container {
    background: linear-gradient(135deg, #FFB6D9 0%, #89CFF0 100%);
    padding: 25px 20px;
    margin: 0;
    box-shadow: 0 4px 20px rgba(255, 182, 217, 0.3);
    position: relative;
    overflow: hidden;
}

/* 背景装飾 */
.learning-progress-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.learning-progress-container::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.learning-progress-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* タイトルセクション */
.progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 15px;
}

.progress-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.progress-icon {
    font-size: 2rem;
    color: #FFD700;
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.progress-title h2 {
    font-size: 1.3rem;
    color: white;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

/* 統計情報 */
.progress-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.stat-value .unit {
    font-size: 1rem;
    margin-left: 2px;
    font-weight: 500;
}

/* プログレスバー本体 */
.progress-bar-wrapper {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    height: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 50%, #FF6347 100%);
    border-radius: 50px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(255, 215, 0, 0.5);
}

/* アニメーション効果 */
.progress-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* パーセンテージ表示 */
.progress-percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 2;
    mix-blend-mode: normal;
}

/* ランク表示 */
.progress-rank {
    margin-top: 15px;
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 30px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.rank-badge:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.rank-badge i {
    font-size: 1.2rem;
}

/* ランク別カラー */
.rank-beginner {
    background: linear-gradient(135deg, #90EE90, #32CD32);
}

.rank-intermediate {
    background: linear-gradient(135deg, #87CEEB, #4682B4);
}

.rank-advanced {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-master {
    background: linear-gradient(135deg, #FF6347, #DC143C);
}

.rank-legend {
    background: linear-gradient(135deg, #9370DB, #8A2BE2);
    animation: legendary-glow 2s ease-in-out infinite;
}

@keyframes legendary-glow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(147, 112, 219, 0.6);
    }
    50% {
        box-shadow: 0 4px 30px rgba(147, 112, 219, 0.9);
    }
}

/* モバイル最適化 */
@media (max-width: 768px) {
    .learning-progress-container {
        padding: 20px 15px;
    }
    
    .progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .progress-title {
        width: 100%;
    }
    
    .progress-title h2 {
        font-size: 1.1rem;
    }
    
    .progress-icon {
        font-size: 1.5rem;
    }
    
    .progress-stats {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    
    .stat-item {
        padding: 8px 15px;
        flex: 1;
        min-width: 100px;
        text-align: center;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .stat-value {
        font-size: 1.2rem;
    }
    
    .stat-value .unit {
        font-size: 0.85rem;
    }
    
    .progress-bar-wrapper {
        height: 35px;
    }
    
    .progress-percentage {
        font-size: 1rem;
    }
    
    .rank-badge {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    .rank-badge i {
        font-size: 1rem;
    }
}

/* タブレット */
@media (min-width: 769px) and (max-width: 1024px) {
    .learning-progress-container {
        padding: 25px 20px;
    }
    
    .progress-title h2 {
        font-size: 1.2rem;
    }
    
    .stat-item {
        padding: 10px 18px;
    }
}

/* アニメーション：初回表示時 */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.learning-progress-container.animate-in {
    animation: slideInDown 0.6s ease-out;
}

/* ローディング状態 */
.progress-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.progress-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* エラー状態 */
.progress-error {
    text-align: center;
    padding: 20px;
    color: white;
}

.progress-error i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #FFD700;
}

.progress-error p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}
