* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #667eea;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --sidebar-bg: #f8f9fa;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gradient-primary);
    min-height: 100vh;
    color: var(--text-color);
}

/* コンテナ横幅制限 - terminal.htmlと統一 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

/* ヘッダー */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    border: none;
    display: flex;
    align-items: center;
}

.logo a:hover,
.logo a:visited,
.logo a:active,
.logo a:focus {
    color: white;
    text-decoration: none;
    border: none;
    outline: none;
}

.logo-image {
    height: 50px;
    width: auto;
    transition: transform 0.2s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

/* 進捗マスコット */
.progress-mascot {
    text-align: center;
    margin: 1rem 0;
}

.progress-penguin-image {
    max-width: 80px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: progressFloat 4s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.progress-penguin-image:hover {
    transform: scale(1.1);
}

@keyframes progressFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(1deg);
    }
    75% {
        transform: translateY(-2px) rotate(-1deg);
    }
}

/* コース学習画像 */
.course-mascot {
    text-align: center;
    padding: 1rem 0.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.course-learning-image {
    max-width: 70px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.course-learning-image:hover {
    transform: scale(1.1);
}

.basic-course-image {
    animation: basicFloat 4s ease-in-out infinite;
}

.advanced-course-image {
    animation: advancedFloat 3s ease-in-out infinite;
}

.course-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
    font-style: italic;
}

@keyframes basicFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes advancedFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(1deg);
    }
    75% {
        transform: translateY(-3px) rotate(-1deg);
    }
}

/* プログレスランニング画像 */
.progress-running-mascot {
    text-align: center;
    padding: 1.5rem 1rem;
    margin: 1rem 0;
    background: var(--gradient-primary);
    border-radius: 12px;
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.progress-running-image {
    max-width: 120px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 0.75rem;
    animation: runningMotion 2s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.progress-running-image:hover {
    transform: scale(1.05);
}

.running-description {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
    opacity: 0.95;
}

@keyframes runningMotion {
    0%, 100% {
        transform: translateX(0px) scale(1);
    }
    25% {
        transform: translateX(-2px) scale(1.02);
    }
    75% {
        transform: translateX(2px) scale(0.98);
    }
}

.progress-info {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.level-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.badges-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-count {
    font-size: 1.2rem;
}

/* メインコンテンツ */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* サイドバー */
.sidebar {
    width: 320px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    overflow: hidden;
    border-right: 1px solid #dee2e6;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

/* 固定課題説明パネル */
.lesson-info-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    min-height: 120px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.lesson-info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #1976d2, transparent);
    animation: shimmer 2s infinite;
}

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

.lesson-info-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    border-color: #1976d2;
}

.lesson-info-panel h3 {
    color: #1976d2;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.lesson-info-panel p {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0;
}

.lesson-info-panel .hint-content {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #856404;
}

/* フィルターボタンのGrid配置 */
.lesson-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lesson-filter-grid .filter-btn {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
}

/* スクロール可能な課題リストエリア */
.lesson-list-scrollable {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 400px);
}

.lesson-list-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* PC専用アコーディオンメニュー */
.course-accordion {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-accordion:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid transparent;
}

.course-header:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
}

.course-accordion.expanded .course-header {
    background: linear-gradient(135deg, #1976d2 0%, #7b1fa2 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.course-accordion.expanded .course-header .course-icon {
    transform: scale(1.1);
}

.course-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.course-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.course-title {
    font-weight: 600;
    font-size: 1rem;
    color: inherit;
}

.course-progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.course-progress-circle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-background {
    fill: none;
    stroke: #e9ecef;
    stroke-width: 2;
}

.progress-ring-progress {
    fill: none;
    stroke: #4caf50;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 50.27;
    stroke-dashoffset: 50.27;
    transition: stroke-dashoffset 0.5s ease;
}

.course-accordion.expanded .progress-ring-progress {
    stroke: rgba(255, 255, 255, 0.9);
}

.progress-percentage {
    font-size: 0.75rem;
    font-weight: 600;
    color: #4caf50;
    min-width: 32px;
    text-align: center;
}

.course-accordion.expanded .progress-percentage {
    color: rgba(255, 255, 255, 0.9);
}

.accordion-toggle {
    font-size: 0.875rem;
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.course-accordion.expanded .accordion-toggle {
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.8);
}

.course-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.course-accordion.expanded .course-content {
    max-height: 800px;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar h2 {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.2rem;
}

.course-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-button {
    padding: 0.75rem 1rem;
    border: none;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #dee2e6;
}

.tab-button:hover {
    background: #e9ecef;
    transform: translateX(5px);
    border-color: #667eea;
}

.tab-button.active {
    background: var(--gradient-primary);
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.lesson-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.lesson-item,
.lesson-card {
    padding: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    position: relative;
    margin: 0.5rem 1rem;
    font-size: 0.9rem;
    border-left: 4px solid #dee2e6;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.lesson-item:hover,
.lesson-card:hover {
    transform: translateX(4px) translateY(-2px);
    border-color: #667eea;
    border-left-color: #667eea;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.lesson-item.active,
.lesson-card.active {
    background: var(--gradient-primary);
    color: white;
    border-color: #667eea;
    border-left-color: #ffd54f;
    transform: translateX(8px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.lesson-item.completed,
.lesson-card.completed {
    background: #e6ffe6;
    border-left-color: #28a745;
}

/* 完了済み課題のみにチェックマークを表示 */
.lesson-item.completed::after,
.lesson-card.completed::after {
    content: '✅';
    position: absolute;
    right: 10px;
    top: 10px;
    font-size: 1.125rem;
    z-index: 10;
}

/* activeクラスのみの課題にはチェックマークを表示しない */
.lesson-item.active:not(.completed)::after,
.lesson-card.active:not(.completed)::after {
    content: '';
    display: none;
}

/* activeかつcompletedの場合は完了マークを維持 */
.lesson-item.active.completed::after,
.lesson-card.active.completed::after {
    content: '✅';
    display: block;
}

/* PC専用 - 強化された課題カード */
.lesson-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lesson-title {
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.lesson-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0.25rem 0;
}

.lesson-item.active .lesson-description,
.lesson-card.active .lesson-description {
    color: rgba(255, 255, 255, 0.85);
}

.lesson-item.active .lesson-title,
.lesson-card.active .lesson-title {
    color: white;
}

.lesson-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    width: 100%;
    margin-top: 0.25rem;
}

.lesson-item.active .lesson-meta,
.lesson-card.active .lesson-meta {
    color: rgba(255, 255, 255, 0.8);
}

.lesson-status-icon {
    font-size: 1.25rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.lesson-item:hover .lesson-status-icon,
.lesson-card:hover .lesson-status-icon {
    transform: scale(1.1);
}

.lesson-difficulty {
    background: rgba(108, 117, 125, 0.1);
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    white-space: nowrap;
}

.lesson-difficulty.beginner {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
}

.lesson-difficulty.intermediate {
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
}

.lesson-difficulty.application {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.lesson-difficulty.advanced {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.lesson-item.active .lesson-difficulty,
.lesson-card.active .lesson-difficulty {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* PC特化機能 - モーダルスタイル */
.lesson-search-modal,
.learning-dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.lesson-search-modal .modal-content,
.learning-dashboard-modal .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.search-header,
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.close-search,
.close-dashboard {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.close-search:hover,
.close-dashboard:hover {
    color: #dc3545;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-results {
    max-height: 300px;
    overflow-y: auto;
}

.search-result-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-result-item:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    transform: translateY(-1px);
}

.result-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.result-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.result-meta {
    display: flex;
    gap: 1rem;
}

.result-category,
.result-difficulty {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    background: #f8f9fa;
    color: var(--text-muted);
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.stat-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.dashboard-recommendations {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #bbdefb;
}

.recommendation-item {
    font-weight: 600;
    color: #1976d2;
    margin-top: 0.5rem;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.lesson-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.lesson-hierarchy-mark {
    color: var(--text-muted);
    margin-right: 0.5rem;
    font-size: 0.8rem;
}

.lesson-difficulty {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.progress-overview {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.progress-overview h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #495057;
}

.progress-bar {
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    transition: width 0.5s ease;
    border-radius: 10px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.progress-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.view-dashboard-button {
    width: 100%;
    padding: 0.75rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.view-dashboard-button:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    color: white;
}

.reset-progress-button {
    width: 100%;
    margin-top: 1rem;
    padding: 0.75rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.reset-progress-button:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* メインエリア */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ウェルカムセクション */
.welcome-section {
    background: var(--gradient-primary);
    color: white;
    padding: 3rem 2rem;
    border-radius: 0 0 20px 20px;
    margin-bottom: 1.5rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0.95;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
}

.feature-icon {
    font-size: 1.5rem;
    display: inline-block;
    min-width: 2rem;
}

.get-started-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.get-started-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    font-size: 1.2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.secondary-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.secondary-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: white;
}

.secondary-action-btn:active {
    transform: translateY(0);
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .secondary-action-btn {
        text-align: center;
        justify-content: center;
    }
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInRight 0.8s ease-out;
}

.hero-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.hero-main-image:hover {
    transform: scale(1.05);
}

.features-showcase {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.feature-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.demo-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.demo-text p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.9;
}

.demo-image {
    display: flex;
    justify-content: center;
}

.terminal-demo-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.terminal-demo-image:hover {
    transform: scale(1.03);
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .welcome-section {
        padding: 2rem 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .feature-demo {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .demo-image {
        order: -1;
    }
}

/* 課題説明エリア */
.challenge-area {
    padding: 1.5rem;
    background: var(--light-color);
    display: flex;
    gap: 1.5rem;
    min-height: 200px;
}

.challenge-card {
    flex: 1;
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.challenge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.challenge-card.active::before {
    opacity: 1;
}

.challenge-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.challenge-title-group h2 {
    color: var(--text-color);
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.challenge-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.difficulty-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty-badge.beginner {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.difficulty-badge.intermediate {
    background: rgba(255, 193, 7, 0.1);
    color: #d39e00;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.difficulty-badge.application {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.difficulty-badge.advanced {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.3);
}



.challenge-status-wrapper {
    display: flex;
    align-items: center;
}

.challenge-status {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.challenge-status.completed {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    color: var(--success-color);
    border: 2px solid rgba(40, 167, 69, 0.3);
}

.challenge-status.completed::before {
    content: '✓';
    font-weight: bold;
}

.challenge-status.pending {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    color: #d39e00;
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.challenge-status.pending::before {
    content: '📋';
}

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

.challenge-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    background: rgba(248, 249, 250, 0.7);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

/* コマンドリファレンス */
.command-reference,
.quick-reference {
    background: rgba(74, 144, 226, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(74, 144, 226, 0.1);
}

.command-reference h4,
.quick-reference h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 1rem;
}

.command-list,
.reference-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.command-item,
.reference-item {
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
}

.command-item:hover,
.reference-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* ヒントコンテナ */
.hint-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hint-button {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.hint-button:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hint-content {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    font-style: italic;
    color: #8B4513;
    line-height: 1.6;
    border-left: 4px solid #ffa500;
}

/* 学習進捗パネル */
.learning-progress-panel {
    width: 280px;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
}

.learning-progress-panel h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

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

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(248, 249, 250, 0.7);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-value {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

/* 学習開始セクション */
.learning-start-section {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 2rem;
}

.learning-start-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.learning-start-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.learning-start-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    animation: gentleBounce 2s ease-in-out infinite;
}

.learning-start-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.learning-start-text p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.learning-tips {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.tip-icon {
    font-size: 1.2rem;
    min-width: 1.5rem;
}

/* 課題完了演出 */
.lesson-complete-celebration,
.level-up-celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: celebrationFadeIn 0.5s ease-out;
}

.celebration-content,
.level-up-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: celebrationSlideIn 0.6s ease-out;
    max-width: 500px;
    margin: 2rem;
}

.celebration-image,
.level-up-image {
    margin-bottom: 2rem;
}

.celebration-main-image,
.level-up-main-image {
    max-width: 200px;
    height: auto;
    border-radius: 15px;
    animation: celebrationImageBounce 1s ease-out infinite;
}

.celebration-text h3,
.level-up-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.celebration-text p,
.level-up-text p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text-color);
}

/* 学習体験フローアニメーション */
@keyframes gentleBounce {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes celebrationFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes celebrationSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes celebrationImageBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* レスポンシブデザイン（学習体験フロー） */
@media (max-width: 768px) {
    .learning-start-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .learning-start-image {
        order: -1;
    }
    
    .celebration-content,
    .level-up-content {
        padding: 2rem;
        margin: 1rem;
    }
    
    .celebration-main-image,
    .level-up-main-image {
        max-width: 150px;
    }
}

/* ターミナルエリア */
.terminal-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #1e1e1e, #161616);
    overflow: hidden;
    min-height: 300px;
    z-index: 10;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: text;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: linear-gradient(145deg, #2d2d2d, #242424);
    border-bottom: 1px solid #3d3d3d;
    position: relative;
    min-height: 50px;
}

.terminal-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.terminal-control-btn {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-control-btn.close {
    background: linear-gradient(145deg, #ff6b5a, #ff5f4f);
}

.terminal-control-btn.minimize {
    background: linear-gradient(145deg, #ffbd2e, #ffb300);
}

.terminal-control-btn.maximize {
    background: linear-gradient(145deg, #28ca42, #20a834);
}

.terminal-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.terminal-title {
    color: #888;
    font-size: 0.9rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
}

.terminal-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.terminal-button {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(145deg, #3d3d3d, #333333);
    color: #888;
    border: 1px solid #4d4d4d;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-button:hover {
    background: linear-gradient(145deg, #4d4d4d, #434343);
    color: #aaa;
    transform: translateY(-1px);
}

.terminal-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.terminal-clear {
    padding: 0.25rem 0.75rem;
    background: linear-gradient(145deg, #3d3d3d, #333333);
    color: #888;
    border: 1px solid #4d4d4d;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s;
}

.terminal-clear:hover {
    background: linear-gradient(145deg, #4d4d4d, #434343);
    color: #aaa;
    transform: translateY(-1px);
}


.terminal {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    cursor: text;
}

.terminal-output {
    color: #d4d4d4;
    white-space: pre-wrap;
    word-wrap: break-word;
    cursor: text;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    margin-top: 0.5rem;
    z-index: 200;
    position: relative;
    background: #1e1e1e;
    padding: 0.5rem 0;
}

.prompt {
    color: #4ec9b0;
    margin-right: 0.5rem;
    white-space: nowrap;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #d4d4d4;
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* ターミナル出力のスタイル */
.output-line {
    margin: 0.25rem 0;
}

.output-error {
    color: #f48771;
}

.output-success {
    color: #4ec9b0;
}

.output-info {
    color: #3794ff;
}

.output-directory {
    color: #3794ff;
    font-weight: bold;
}

.output-file {
    color: #d4d4d4;
}

.output-executable {
    color: #4ec9b0;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #495057;
}

.badge-display {
    font-size: 4rem;
    margin: 1.5rem 0;
}

.modal-close {
    padding: 0.75rem 2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 正解時モーダルボタン（モバイル版と統一された美しいデザイン） */
.celebration-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    width: 100%;
}

.celebration-next-btn,
.celebration-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #28a745;
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 50px;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.celebration-next-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.celebration-close-btn.secondary {
    background: #6c757d;
    box-shadow: 0 2px 10px rgba(108, 117, 125, 0.3);
}

.celebration-close-btn.secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.btn-icon {
    font-size: 1.1em;
    margin-right: 0.25rem;
}

/* 課題完了モーダルのz-index確保 */
.lesson-complete-celebration {
    z-index: 9999 !important;
}

.celebration-content {
    z-index: 10000 !important;
    pointer-events: auto !important;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.modal-button {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.modal-button.cancel {
    background: #6c757d;
    color: white;
}

.modal-button.cancel:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.modal-button.confirm {
    background: #dc3545;
    color: white;
}

.modal-button.confirm:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* 成功メッセージ */
.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(40, 167, 69, 0.95);
    color: white;
    padding: 2rem 3rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    animation: successPulse 0.5s ease;
    z-index: 9999;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
    text-align: center;
}



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

.success-icon {
    font-size: 2rem;
}


/* フッター */
.site-footer {
    background: linear-gradient(135deg, #2c5530 0%, #1a3b1e 100%);
    color: white;
    padding: 2rem 0;
    margin-top: auto;
    z-index: 1;
    position: relative;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-link {
    color: #a8d4ae;
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
    text-decoration: underline;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #a8d4ae;
    opacity: 0.8;
}

.footer-copyright p {
    margin: 0;
}


/* Cookie同意バナー */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    z-index: 10000;
    border-top: 3px solid #2c5530;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text p {
    margin: 0.5rem 0;
    line-height: 1.4;
}

.cookie-consent-text a {
    color: #a8d4ae;
    text-decoration: underline;
}

.cookie-consent-text a:hover {
    color: white;
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cookie-consent-button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-consent-button.accept {
    background: #2c5530;
    color: white;
}

.cookie-consent-button.accept:hover {
    background: #1a3b1e;
}

.cookie-consent-button.essential {
    background: #666;
    color: white;
}

.cookie-consent-button.essential:hover {
    background: #555;
}

.cookie-consent-button.settings {
    background: transparent;
    color: #a8d4ae;
    border: 1px solid #a8d4ae;
}

.cookie-consent-button.settings:hover {
    background: #a8d4ae;
    color: #000;
}

/* Cookie設定モーダル */
.cookie-categories {
    margin: 1.5rem 0;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #2c5530;
}

.cookie-category h3 {
    margin: 0 0 0.5rem 0;
    color: #2c5530;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-category p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-category input[type="checkbox"] {
    margin: 0;
}


/* プライバシーポリシーページ */
.privacy-policy-page {
    background: var(--gradient-primary);
    min-height: 100vh;
    margin: 0;
    padding: 2rem 0;
}

.privacy-policy {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    line-height: 1.7;
    color: var(--text-color);
}

.privacy-policy h1 {
    color: #2c5530;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 3px solid #2c5530;
    padding-bottom: 1rem;
    font-weight: 700;
}

.privacy-policy h2 {
    color: #2c5530;
    font-size: 1.5rem;
    margin: 3rem 0 1.5rem 0;
    padding: 0.75rem 0 0.5rem 1rem;
    border-left: 5px solid #2c5530;
    background: linear-gradient(90deg, #f0f8f0 0%, transparent 100%);
    font-weight: 600;
}

.privacy-policy h3 {
    color: #4a7c59;
    font-size: 1.2rem;
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.privacy-policy p {
    margin: 1rem 0;
    text-align: justify;
    font-size: 1rem;
}

.privacy-policy ul, .privacy-policy ol {
    margin: 1rem 0 1rem 2rem;
}

.privacy-policy li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.privacy-policy .highlight {
    background: linear-gradient(135deg, #f0f8f0 0%, #e8f5e8 100%);
    padding: 2rem;
    border-left: 6px solid #2c5530;
    border-radius: 0 10px 10px 0;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.1);
}

.privacy-policy .highlight p {
    margin: 0.5rem 0;
}

.privacy-policy .contact-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    border: 1px solid #dee2e6;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.privacy-policy .toc {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
    border: 1px solid #dee2e6;
}

.privacy-policy .toc h3 {
    margin-top: 0;
    color: #2c5530;
    text-align: center;
    font-size: 1.3rem;
}

.privacy-policy .toc ul {
    margin: 1rem 0 0 0;
    list-style: none;
    columns: 2;
    column-gap: 2rem;
}

.privacy-policy .toc li {
    margin: 0.5rem 0;
    break-inside: avoid;
}

.privacy-policy .toc a {
    color: #2c5530;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
}

.privacy-policy .toc a:hover {
    color: #1a3b1e;
    background: rgba(44, 85, 48, 0.1);
}

.privacy-policy .back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2c5530 0%, #1a3b1e 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
}

.privacy-policy .back-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(44, 85, 48, 0.4);
    background: linear-gradient(135deg, #1a3b1e 0%, #2c5530 100%);
}

.privacy-policy .last-updated {
    color: #666;
    font-style: italic;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-radius: 25px;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.privacy-policy a {
    color: #2c5530;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.privacy-policy a:hover {
    color: #1a3b1e;
}

.privacy-policy strong {
    color: #2c5530;
    font-weight: 600;
}


/* ナビゲーションスタイル */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ドロップダウンメニュー */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.8rem;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 1px solid #dee2e6;
    z-index: 1000;
    margin-top: 0.25rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* ホバー時の表示（親要素またはドロップダウン自体のホバー） */
.nav-dropdown:hover .dropdown-content,
.dropdown-content:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ホバー状態を維持するための invisible bridge */
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 0.25rem;
    background: transparent;
    z-index: 999;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #667eea;
}

.dropdown-content a:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.dropdown-content a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-content a.active {
    background: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

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

/* フッタースタイル */
.site-footer {
    background: #343a40;
    color: #adb5bd;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem 2rem;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: #f8f9fa;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-column a:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-social {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* 全体的なリストスタイルの統一 */
ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    color: #495057;
}

/* 特定のコンテナ内のリストスタイル調整 */
.lesson-list ul,
.challenge-list ul,
.benefits-grid ul,
.features-grid ul,
.concept-grid ul,
.mission-content ul,
.lesson-list ol,
.challenge-list ol,
.benefits-grid ol,
.features-grid ol,
.concept-grid ol,
.mission-content ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.lesson-list li,
.challenge-list li,
.benefits-grid li,
.features-grid li,
.concept-grid li,
.mission-content li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

/* フッター内のリストは異なるスタイル */
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

/* ナビゲーションリストのスタイル除外 */
.nav-dropdown ul,
.dropdown-content,
.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-dropdown li,
.dropdown-content li,
.sidebar li {
    margin-bottom: 0;
}

















    


/* ==========================================
   ハンバーガーメニューとモバイルメニュー
   ========================================== */

/* ハンバーガーメニューボタン */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 30px;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    position: absolute;
    left: 0;
}

.hamburger-line:nth-child(1) {
    top: 0;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(13px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: translateY(-13px) rotate(-45deg);
}

/* モバイルメニューオーバーレイ */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* モバイルメニュー本体 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 80%;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
}

.mobile-menu-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.mobile-menu-content {
    padding: 1rem;
}

.mobile-nav-section {
    margin-bottom: 1.5rem;
}

.mobile-nav-section h4 {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.mobile-nav-link:hover {
    background-color: var(--light-color);
}

.mobile-progress-info {
    padding: 0.5rem;
    background-color: var(--light-color);
    border-radius: 4px;
}

.mobile-progress-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.mobile-nav-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.mobile-nav-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* メインナビゲーション */
.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    min-width: 200px;
    margin-top: 0.5rem;
    z-index: 1000;
}

.nav-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--light-color);
}

.dropdown-section {
    margin-bottom: 1rem;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-header {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

/* ==========================================
   レスポンシブ対応
   ========================================== */

@media (max-width: 768px) {
    /* ハンバーガーメニュー表示 */
    .hamburger-menu {
        display: flex;
    }
    
    /* メインナビゲーション非表示 */
    .main-nav {
        display: none;
    }
    
    /* ヘッダー調整 */
    .header {
        padding: 1rem;
    }
    
    /* ロゴサイズ調整 */
    .logo {
        font-size: 1.2rem;
    }
    
    .logo-image {
        height: 40px;
    }
    
    /* プログレス情報非表示 */
    .progress-info {
        display: none;
    }
    
    /* article-containerの調整（about.htmlなど用） */
    .article-container {
        padding: 0;
    }
    
    .article-main {
        padding: 1rem;
    }
    
    /* サイドバー非表示（index.htmlのみ） */
    /* モバイル・タブレット対応 */
    @media (max-width: 768px) {
        .sidebar {
            width: 100%;
            order: 2; /* ターミナルの下に表示 */
            max-height: 50vh;
        }

        .lesson-info-panel {
            min-height: 80px;
            padding: 1rem;
        }

        .lesson-filter-grid {
            grid-template-columns: 1fr 1fr;
            gap: 0.4rem;
        }

        .lesson-filter-grid .filter-btn {
            padding: 0.5rem 0.6rem;
            font-size: 0.8rem;
        }

        .main-content {
            flex-direction: column;
        }

        .terminal-area {
            order: 1; /* ターミナルを上に表示 */
        }
    }

    .sidebar {
        display: none;
    }
    
    /* メインエリア全幅化 */
    .main-area {
        width: 100%;
    }
}

/* ==========================================================================
   UI/UX改善: 学習コンテンツカード & モーダル
   ========================================================================== */

/* 学習コンテンツカードセクション */
.learning-content-cards {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem 2rem;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.learning-content-cards h2 {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 600;
}

.content-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

/* 白い縦線を完全除去するための強制スタイル */
a.content-card,
.content-card {
    background: white !important;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
    outline: none !important;
    text-decoration: none !important;
    color: inherit !important;
    display: block !important;
}

/* 全ての子要素からもborderを削除 */
a.content-card *,
.content-card * {
    border: none !important;
    border-left: none !important;
    border-right: none !important;
    border-top: none !important;
    border-bottom: none !important;
}

a.content-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border: 0 !important;
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

a.content-card h3 {
    color: var(--dark-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border: none !important;
}

a.content-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    border: none !important;
}

.content-card a,
.content-card button {
    display: inline-block;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.content-card a:hover,
.content-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* カテゴリカード（目次ページへのリンク用） */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.category-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 2px solid #e8ecff;
    text-decoration: none;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.15);
    border-color: var(--secondary-color);
}

.category-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.category-card h3 {
    color: var(--dark-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.category-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.category-card small {
    color: var(--secondary-color);
    font-weight: 600;
}

.category-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* おすすめ記事セクション */
.featured-articles {
    margin-top: 3rem;
}

.featured-articles h3 {
    text-align: center;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.featured-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.featured-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid rgba(102, 126, 234, 0.1);
    text-decoration: none;
}

.featured-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.3);
}

.featured-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.featured-card h4 {
    color: var(--dark-color);
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.featured-card p {
    color: var(--text-muted);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* カード別カラー - 左border削除済み */

/* 初回訪問者モーダル機能は削除済み */

/* 必要なモーダルスタイル（確認ダイアログ等で使用） */
.modal-content {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-content h2 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.modal-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 150px;
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-button.secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.modal-button.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 記事レコメンドトースト */
.article-recommendation {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    min-width: 320px;      /* 最小幅を確保（一貫性） */
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--info-color);
    transform: translateX(420px);
    transition: transform 0.3s ease;
    z-index: 900;
}

.article-recommendation.show {
    transform: translateX(0);
}

.recommendation-content {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.recommendation-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.recommendation-text {
    flex: 1;
    line-height: 1.5;
}

.recommendation-text strong {
    color: var(--dark-color);
    display: block;
    margin-bottom: 0.25rem;
}

.recommendation-text a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.recommendation-text a:hover {
    text-decoration: underline;
}

.recommendation-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-full);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.recommendation-close:hover {
    background-color: var(--light-color);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .learning-content-cards {
        padding: 2rem 1rem;
        margin: 1rem 0;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .category-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }

    .category-card {
        padding: 2rem 1.5rem;
    }

    .category-icon {
        font-size: 3rem;
    }

    .category-card h3 {
        font-size: 1.4rem;
    }

    .featured-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .featured-card {
        padding: 1.5rem;
    }

    .featured-articles {
        margin-top: 2rem;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }

    .modal-buttons {
        flex-direction: column;
    }

    .article-recommendation {
        bottom: 10px;
        right: 10px;
        left: auto;           /* 右寄せ（横幅いっぱいを解除） */
        max-width: 350px;     /* 最大幅を制限 */
        min-width: 280px;     /* 最小幅を確保 */
        transform: translateY(100px);
    }

    .article-recommendation.show {
        transform: translateY(0);
    }
}

/* ==========================================
   学習記事目次ページリンクのスタイル
   ========================================== */

/* 目次ページリンクの強調スタイル */
.index-link {
    font-weight: 600 !important;
    background: rgba(102, 126, 234, 0.1) !important;
    border-radius: 4px !important;
    padding: 8px 12px !important;
    transition: all 0.2s ease !important;
}

.index-link:hover {
    background: rgba(102, 126, 234, 0.2) !important;
    transform: translateX(4px) !important;
}

/* ドロップダウンメニューの区切り線 */
.dropdown-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 8px 0;
    border: none;
}

/* フッターの区切り線 */
.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 8px 0;
    list-style: none;
}

/* ==========================================
   index.html重複削除完了 - shared.cssに移行済み
   ========================================== */
