/* ===== 学習進捗トラッカー専用スタイル ===== */

/* 進捗ダッシュボード */
.learning-dashboard {
    background: linear-gradient(135deg, #FFB6D9 0%, #89CFF0 100%);
    padding: var(--spacing-lg);
    border-radius: 25px;
    margin-bottom: var(--spacing-xl);
    color: var(--white);
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.dashboard-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.dashboard-header h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--white);
}

.dashboard-header p {
    opacity: 0.9;
}

/* 全体進捗バー */
.overall-progress {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-lg);
    border-radius: 20px;
    margin-bottom: var(--spacing-lg);
    backdrop-filter: blur(10px);
}

.overall-progress h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-container {
    background: rgba(255, 255, 255, 0.3);
    height: 40px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin-bottom: var(--spacing-sm);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.progress-bar::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: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}

/* カテゴリ別進捗 */
.category-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.category-progress-item {
    background: rgba(255, 255, 255, 0.2);
    padding: var(--spacing-md);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.category-progress-item h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-progress-bar {
    background: rgba(255, 255, 255, 0.3);
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.category-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FFD700, #FFA500);
    transition: width 0.6s ease;
}

.category-progress-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 完了チェックボックス */
.complete-checkbox-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
}

.complete-checkbox {
    width: 30px;
    height: 30px;
    cursor: pointer;
    accent-color: #4CAF50;
}

/* 完了済みアイテムのスタイル */
.completed-item {
    opacity: 0.7;
    position: relative;
}

.completed-item::after {
    content: '✓ 完了';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(76, 175, 80, 0.95);
    color: var(--white);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* 完了アニメーション */
.complete-animation {
    animation: completeEffect 0.6s ease;
}

@keyframes completeEffect {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(76, 175, 80, 0.8);
    }
    100% {
        transform: scale(1);
    }
}

/* ハイライトパルス */
.highlight-pulse {
    animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 0.8);
        transform: scale(1.02);
    }
}

/* 次のおすすめ */
.next-recommendation {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    padding: var(--spacing-md);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: var(--spacing-md);
    color: var(--dark-bg);
    font-weight: 600;
}

.next-recommendation:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.next-recommendation i {
    font-size: 1.5rem;
}

/* 学習証明書モーダル */
.certificate-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.certificate-container {
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: 25px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: certificateAppear 0.6s ease;
}

@keyframes certificateAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.certificate-container i {
    font-size: 5rem;
    color: #FFD700;
    margin-bottom: var(--spacing-md);
}

.certificate-container h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-accent);
}

.certificate-container p {
    font-size: 1.2rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.certificate-date {
    font-weight: 700;
    color: var(--primary-pink);
}

.btn-close-certificate {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, var(--primary-pink), var(--secondary-purple));
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-close-certificate:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.4);
}

/* リセットボタン */
.reset-progress-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: var(--spacing-md);
}

.reset-progress-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .learning-dashboard {
        padding: var(--spacing-md);
    }

    .dashboard-header h2 {
        font-size: 1.5rem;
    }

    .category-progress-grid {
        grid-template-columns: 1fr;
    }

    .certificate-container h2 {
        font-size: 1.8rem;
    }

    .certificate-container i {
        font-size: 3rem;
    }
}
