/**
 * ダッシュボードページ専用スタイル
 * 学習進捗とバッジ表示に特化したデザイン
 */

/* ダッシュボード全体コンテナ */
.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    margin-top: 2rem; /* 通常のマージンに変更 */
}

/* パンくずリスト */
.breadcrumb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem 0;
    margin-top: 1rem; /* 通常のマージンに変更 */
    font-size: 0.9rem;
    color: #666;
}

/* PC版（768px以上）でのスタイル調整 */
@media (min-width: 768px) {
    /* PC版ナビゲーションを強制表示 */
    .dashboard-container .main-nav {
        display: flex !important;
    }

    /* モバイルメニューボタンを非表示 */
    .dashboard-container .hamburger-menu {
        display: none !important;
    }

    /* モバイルメニューを非表示 */
    .dashboard-container .mobile-menu,
    .dashboard-container .mobile-menu-overlay {
        display: none !important;
    }
}

.breadcrumb a {
    color: #007acc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #005a9c;
    text-decoration: underline;
}

/* 学習サマリーセクション */
.learning-summary {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.summary-header {
    text-align: center;
    margin-bottom: 2rem;
}

.summary-header h1 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 2.5rem;
    font-weight: 700;
}

.summary-subtitle {
    color: #666;
    font-size: 1.1rem;
    margin: 0;
}

/* サマリーカード */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.summary-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.summary-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.summary-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* 各カードの色分け */
.summary-card:nth-child(1) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.summary-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.summary-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.summary-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* 全体進捗バー */
.overall-progress-section {
    text-align: center;
}

.progress-bar-container {
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e7ff;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    width: 0%;
    transition: width 0.8s ease;
}

.progress-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

/* カテゴリ別進捗セクション */
.category-progress {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
}

section.category-progress h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.8rem;
    text-align: center;
}

#categoryGrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-items: stretch;
}

/* デスクトップでは3列表示を推奨 */
@media (min-width: 1200px) {
    #categoryGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* タブレットでは3列表示 */
@media (min-width: 768px) and (max-width: 1199px) {
    #categoryGrid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* モバイルでは1列表示 */
@media (max-width: 767px) {
    #categoryGrid {
        grid-template-columns: 1fr;
    }
}

#categoryGrid .category-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-height: 120px;
}

#categoryGrid .category-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* ダッシュボード専用のカテゴリヘッダー（共通CSSの競合回避済み） */
#categoryGrid .category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

#categoryGrid .category-icon {
    font-size: 2rem;
    margin-right: 1rem;
    min-width: 2.5rem;
}

#categoryGrid .category-info {
    flex: 1;
}

#categoryGrid .category-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #333;
    font-size: 1.1rem;
}

/* ダッシュボード専用のカテゴリ統計（共通CSSの競合回避済み） */
#categoryGrid .category-stats {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

#categoryGrid .category-progress-section {
    margin-top: auto;
}

#categoryGrid .category-progress-bar {
    width: 100%;
    height: 10px;
    background: #dee2e6;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

#categoryGrid .category-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}

#categoryGrid .category-percentage {
    font-weight: 600;
    text-align: center;
    color: #333;
    font-size: 1.1rem;
}

/* カテゴリ別の色分け */
.category-item[data-category="basic"] .category-progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.category-item[data-category="file"] .category-progress-fill {
    background: linear-gradient(90deg, #f093fb 0%, #f5576c 100%);
}

.category-item[data-category="permission"] .category-progress-fill {
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}

.category-item[data-category="process"] .category-progress-fill {
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
}

.category-item[data-category="system"] .category-progress-fill {
    background: linear-gradient(90deg, #fa709a 0%, #fee140 100%);
}

.category-item[data-category="application"] .category-progress-fill {
    background: linear-gradient(90deg, #a8edea 0%, #fed6e3 100%);
}

/* バッジセクション */
.badge-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.badge-section h2 {
    margin: 0 0 2rem 0;
    color: #333;
    font-size: 1.8rem;
    text-align: center;
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    max-width: 100%;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.2;
    justify-content: space-between;
    box-sizing: border-box;
}

.badge-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
    background: #e9ecef;
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    position: relative;
}

/* 六角形バッジアイコン */
.badge-icon-hexagon {
    width: 80px;
    height: 80px;
    background: #ddd;
    margin: 0 auto 0.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.badge-item.earned .badge-icon-hexagon {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.badge-item.locked .badge-icon-hexagon {
    background: #e9ecef;
    color: #adb5bd;
    filter: grayscale(100%);
    opacity: 0.7;
}

.badge-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.badge-item.locked .badge-name {
    color: #adb5bd;
}

.badge-status {
    font-size: 0.8rem;
    color: #666;
}

.badge-item.earned .badge-status {
    color: #28a745;
    font-weight: 600;
}

.badge-item.locked .badge-status {
    color: #adb5bd;
}

/* バッジロックアイコン */
.badge-lock-icon {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.badge-item.earned .badge-lock-icon {
    background: #28a745;
}

/* バッジ個別シェアボタン */
.badge-share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.badge-share-btn {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    padding: 0;
}

.badge-share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.badge-share-web:hover {
    background: #007acc;
    color: white;
    border-color: #007acc;
}

.badge-share-twitter:hover {
    background: #1da1f2;
    color: white;
    border-color: #1da1f2;
}

.badge-share-facebook:hover {
    background: #1877f2;
    color: white;
    border-color: #1877f2;
}

.badge-item.locked .badge-share-buttons {
    display: none;
}

/* バッジ詳細モーダル */
.badge-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.badge-modal.active {
    display: flex;
}

.badge-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.badge-modal-content {
    position: relative;
    background: white;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.badge-modal-close:hover {
    color: #333;
}

.badge-modal-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.badge-modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.badge-modal-title {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.badge-modal-body {
    padding: 0 2rem 2rem;
}

.badge-modal-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.badge-modal-condition {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid #007acc;
}

.badge-modal-status {
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.badge-modal-status.earned {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.badge-modal-status.locked {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 共有セクション */
.share-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    text-align: center;
}

.share-section h2 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.8rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.share-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: white;
    min-width: 130px;
    justify-content: center;
}

.share-web {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.share-twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #0d8bd9 100%);
}

.share-facebook {
    background: linear-gradient(135deg, #4267b2 0%, #365899 100%);
}

.share-copy {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.share-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-description {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* 学習継続セクション */
.continue-learning {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.continue-learning h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.8rem;
}

.continue-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.continue-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    min-width: 200px;
    justify-content: center;
}

.continue-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.continue-button.secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #dee2e6;
}

.continue-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.continue-button.secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .dashboard-main {
        padding: 1rem 0.5rem;
    }

    .learning-summary,
    .category-progress,
    .badge-section,
    .share-section,
    .continue-learning {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .summary-header h1 {
        font-size: 2rem;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

    /* カテゴリグリッドをタブレットで1列に */
    .category-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-item {
        min-height: 100px;
        padding: 1rem;
    }

    /* バッジグリッドをタブレットで3列に調整 */
    .badge-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    .badge-item {
        min-height: 140px;
    }

    /* バッジシェアボタンをタブレットで小さく */
    .badge-share-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .badge-icon-hexagon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* 共有ボタンをモバイルでのみ縦並び */
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .share-button {
        width: 200px;
    }

    /* 学習継続ボタンをモバイルでのみ縦並び */
    .continue-actions {
        flex-direction: column;
        align-items: center;
    }

    .continue-button {
        width: 250px;
    }

    .category-item {
        flex-direction: column;
        gap: 0.5rem;
    }

    .category-progress-bar {
        width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .breadcrumb {
        padding: 0.5rem;
    }

    .dashboard-main {
        padding: 1rem 0.25rem;
    }

    .summary-header h1 {
        font-size: 1.8rem;
    }

    /* カテゴリグリッドをモバイルで1列に */
    .category-grid {
        grid-template-columns: 1fr;
    }

    /* バッジグリッドをモバイルで2列に */
    .badge-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .badge-item {
        min-height: 120px;
        padding: 0.8rem;
    }

    /* バッジシェアボタンをモバイルでさらに小さく */
    .badge-share-btn {
        width: 24px;
        height: 24px;
        font-size: 0.7rem;
    }

    .badge-share-buttons {
        gap: 0.3rem;
    }

    .badge-modal-content {
        width: 95%;
    }
}

/* ====================
   学習データ管理セクション
   ==================== */
.data-management {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.data-management h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-management-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.data-management-description {
    color: #666;
    line-height: 1.6;
}

.data-management-description p {
    margin-bottom: 0.8rem;
}

.data-management-description strong {
    color: #e74c3c;
    font-weight: 600;
}

.data-management-actions {
    display: flex;
    justify-content: center;
}

.reset-progress-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reset-progress-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.reset-progress-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

/* 理解度チェック進捗セクション */
.quiz-progress {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.quiz-progress h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.8rem;
    text-align: center;
}

.quiz-progress-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 理解度チェック統計カード */
.quiz-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quiz-stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.quiz-stat-card:hover {
    transform: translateY(-3px);
}

.quiz-stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.quiz-stat-card .stat-content {
    flex: 1;
}

.quiz-stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.quiz-stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

/* レベル別成績セクション */
.level-stats-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.level-stats-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.4rem;
}

.level-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.level-stat-card {
    background: white;
    border-radius: 8px;
    padding: 1.2rem;
    border-left: 4px solid #ddd;
    transition: all 0.3s ease;
}

.level-stat-card.attempted {
    border-left: 4px solid #28a745;
    background: linear-gradient(135deg, #ffffff 0%, #f8fff9 100%);
}

.level-stat-card.not-attempted {
    border-left: 4px solid #ccc;
    background: #f9f9f9;
}

.level-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.level-header {
    margin-bottom: 1rem;
}

.level-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.level-description {
    font-size: 0.85rem;
    color: #666;
}

.level-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.level-score, .level-average, .level-attempts {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.score-label {
    font-size: 0.9rem;
    color: #666;
}

.score-value {
    font-weight: 600;
    font-size: 1rem;
}

.level-not-attempted {
    text-align: center;
    padding: 1rem 0;
}

.not-attempted-text {
    display: block;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.challenge-button, .start-quiz-button {
    background: linear-gradient(135deg, #007acc, #005a9d);
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.challenge-button:hover, .start-quiz-button:hover {
    background: linear-gradient(135deg, #005a9d, #004577);
    transform: translateY(-1px);
}

/* 最近の成績セクション */
.recent-results-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.recent-results-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.4rem;
}

.no-recent-results {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
}

.no-recent-results p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.recent-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.recent-result-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.recent-result-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-rank {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
}

.result-level {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.2rem;
}

.result-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 0.2rem;
}

.result-details {
    font-size: 0.85rem;
    color: #666;
}

.result-date {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
    flex-shrink: 0;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .data-management {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .data-management h2 {
        font-size: 1.3rem;
    }

    .reset-progress-button {
        width: 100%;
        justify-content: center;
        padding: 1.2rem 1.5rem;
    }

    .quiz-progress {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .quiz-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.8rem;
    }

    .quiz-stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .quiz-stat-card .stat-icon {
        font-size: 1.5rem;
    }

    .quiz-stat-card .stat-value {
        font-size: 1.5rem;
        font-weight: 800;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        color: #ffffff;
    }

    .level-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .level-stat-card {
        padding: 1rem;
    }

    .recent-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .result-rank {
        align-self: flex-start;
    }

    .result-date {
        text-align: left;
        align-self: flex-end;
    }
}

/* ====================
   読書進捗セクション
   ==================== */
.reading-progress {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.reading-progress h2 {
    margin: 0 0 1.5rem 0;
    color: #333;
    font-size: 1.8rem;
    text-align: center;
}

.reading-progress-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 読書統計カード */
.reading-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.reading-stat-card {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    border-radius: 10px;
    padding: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
    transition: transform 0.3s ease;
}

.reading-stat-card:hover {
    transform: translateY(-3px);
}

.reading-stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.9;
}

.reading-stat-card .stat-content {
    flex: 1;
}

.reading-stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.reading-stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}

/* カテゴリ別進捗セクション */
.reading-category-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.reading-category-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.4rem;
}

.reading-category-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.category-stat-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.category-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-name {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    flex-shrink: 0;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.category-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    flex: 1;
    overflow: hidden;
}

.category-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.category-fill.guides {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.category-fill.tutorials {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.category-fill.faq {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.category-count {
    font-weight: 600;
    font-size: 0.9rem;
    color: #666;
    flex-shrink: 0;
}

/* 最近の読了記事セクション */
.reading-recent-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.reading-recent-section h3 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.4rem;
}

.no-recent-reads {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    font-style: italic;
}

.recent-reads-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.recent-read-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.recent-read-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.read-info {
    flex: 1;
}

.read-title {
    font-weight: 600;
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.3rem;
}

.read-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.read-category {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.read-time {
    color: #999;
}

/* 読書関連アクションボタン */
.reading-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-btn.guides {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.action-btn.guides:hover {
    background: linear-gradient(135deg, #27ae60, #229954);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.action-btn.tutorials {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.action-btn.tutorials:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.action-btn.faq {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.action-btn.faq:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* 読書進捗 - レスポンシブ対応 */
@media (max-width: 768px) {
    .reading-progress {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .reading-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.8rem;
    }

    .reading-stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .reading-stat-card .stat-icon {
        font-size: 1.5rem;
    }

    .reading-stat-card .stat-value {
        font-size: 1.5rem;
    }

    .category-stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
        padding: 1rem;
    }

    .category-progress {
        width: 100%;
    }

    .recent-read-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.8rem;
    }

    .read-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .reading-actions {
        gap: 0.5rem;
    }

    .action-btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
}