diff --git a/css/course-completion.css b/css/course-completion.css new file mode 100644 index 0000000..f8a700b --- /dev/null +++ b/css/course-completion.css @@ -0,0 +1,767 @@ +/* Course Completion Styles */ + +/* Course Completion Modal */ +.course-completion-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 10000; + opacity: 0; + transition: opacity 0.3s ease; +} + +.course-completion-container.show { + opacity: 1; +} + +.course-completion-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + display: flex; + align-items: center; + justify-content: center; + padding: 2rem; +} + +.course-completion-modal { + background: white; + border-radius: 20px; + box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3); + max-width: 800px; + width: 100%; + max-height: 90vh; + overflow-y: auto; + animation: modalSlideIn 0.4s ease-out; +} + +@keyframes modalSlideIn { + from { + opacity: 0; + transform: translateY(30px) scale(0.95); + } + to { + opacity: 1; + transform: translateY(0) scale(1); + } +} + +/* Completion Header */ +.completion-header { + text-align: center; + padding: 3rem 2rem 2rem; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + color: white; + border-radius: 20px 20px 0 0; +} + +.completion-celebration { + font-size: 4rem; + margin-bottom: 1rem; + animation: bounce 1s ease-in-out infinite alternate; +} + +@keyframes bounce { + from { transform: translateY(0); } + to { transform: translateY(-10px); } +} + +.completion-header h2 { + font-size: 2.5rem; + margin: 0 0 0.5rem 0; + font-weight: 700; +} + +.completion-header h3 { + font-size: 1.5rem; + margin: 0 0 1rem 0; + font-weight: 400; + opacity: 0.9; +} + +.completion-date { + font-size: 1rem; + opacity: 0.8; +} + +/* Completion Body */ +.completion-body { + padding: 2rem; +} + +.completion-section { + margin-bottom: 2.5rem; +} + +.completion-section h3 { + font-size: 1.3rem; + color: #2d3748; + margin-bottom: 1rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +/* Completion Stats */ +.completion-stats { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); + gap: 1rem; + margin-bottom: 1rem; +} + +.stat-item { + text-align: center; + padding: 1rem; + background: #f7fafc; + border-radius: 12px; + border: 2px solid #e2e8f0; +} + +.stat-value { + font-size: 2rem; + font-weight: 700; + color: #667eea; + margin-bottom: 0.5rem; +} + +.stat-label { + font-size: 0.9rem; + color: #4a5568; + font-weight: 500; +} + +/* Achievement Badges */ +.achievement-badges { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 1rem; +} + +.achievement-badge { + display: flex; + align-items: center; + gap: 1rem; + padding: 1rem; + background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%); + color: white; + border-radius: 12px; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); +} + +.achievement-icon { + font-size: 2rem; + flex-shrink: 0; +} + +.achievement-info { + flex: 1; +} + +.achievement-title { + font-weight: 700; + margin-bottom: 0.25rem; +} + +.achievement-description { + font-size: 0.9rem; + opacity: 0.9; +} + +/* Acquired Skills */ +.acquired-skills { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} + +.skill-tag { + background: #e6fffa; + color: #234e52; + padding: 0.5rem 1rem; + border-radius: 20px; + font-size: 0.9rem; + font-weight: 500; + border: 1px solid #81e6d9; +} + +/* Recommended Courses */ +.recommended-courses { + display: grid; + gap: 1rem; +} + +.recommended-course { + border: 2px solid #e2e8f0; + border-radius: 12px; + padding: 1.5rem; + background: white; + transition: all 0.3s ease; +} + +.recommended-course:hover { + border-color: #667eea; + box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15); +} + +.recommended-course-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.5rem; +} + +.recommended-course-header h4 { + margin: 0; + color: #2d3748; +} + +.recommended-course-description { + color: #4a5568; + margin-bottom: 0.5rem; + line-height: 1.5; +} + +.recommended-course-reason { + color: #667eea; + font-style: italic; + margin-bottom: 1rem; + font-size: 0.9rem; +} + +.recommended-course-meta { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 1rem; + font-size: 0.9rem; + color: #4a5568; +} + +.course-priority { + padding: 0.25rem 0.75rem; + border-radius: 12px; + font-size: 0.8rem; + font-weight: 600; +} + +.priority-high { + background: #fed7d7; + color: #c53030; +} + +.priority-medium { + background: #feebc8; + color: #dd6b20; +} + +.recommended-course-btn { + background: #667eea; + color: white; + border: none; + padding: 0.75rem 1.5rem; + border-radius: 8px; + font-weight: 600; + cursor: pointer; + transition: background-color 0.3s ease; + width: 100%; +} + +.recommended-course-btn:hover { + background: #5a67d8; +} + +/* Completion Actions */ +.completion-actions { + padding: 2rem; + border-top: 1px solid #e2e8f0; + display: flex; + gap: 1rem; + justify-content: center; + flex-wrap: wrap; +} + +.completion-btn { + padding: 0.75rem 2rem; + border-radius: 8px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + border: none; + font-size: 1rem; +} + +.completion-btn.primary { + background: #667eea; + color: white; +} + +.completion-btn.primary:hover { + background: #5a67d8; + transform: translateY(-2px); +} + +.completion-btn.secondary { + background: #48bb78; + color: white; +} + +.completion-btn.secondary:hover { + background: #38a169; + transform: translateY(-2px); +} + +.completion-btn.tertiary { + background: #e2e8f0; + color: #4a5568; +} + +.completion-btn.tertiary:hover { + background: #cbd5e0; +} + +/* Certificate Modal */ +.certificate-container { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 10001; + opacity: 0; + transition: opacity 0.3s ease; +} + +.certificate-container.show { + opacity: 1; +} + +.certificate-overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.9); + display: flex; + align-items: center; + justify-content: center; + padding: 2rem; +} + +.certificate-modal { + background: white; + border-radius: 16px; + box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5); + max-width: 900px; + width: 100%; + max-height: 90vh; + overflow-y: auto; + animation: certificateSlideIn 0.5s ease-out; +} + +@keyframes certificateSlideIn { + from { + opacity: 0; + transform: scale(0.8) rotateY(10deg); + } + to { + opacity: 1; + transform: scale(1) rotateY(0deg); + } +} + +.certificate-header { + padding: 1rem; + text-align: right; +} + +.certificate-close { + background: #e2e8f0; + border: none; + border-radius: 50%; + width: 40px; + height: 40px; + font-size: 1.5rem; + cursor: pointer; + color: #4a5568; + transition: all 0.3s ease; +} + +.certificate-close:hover { + background: #cbd5e0; + transform: scale(1.1); +} + +/* Certificate Content */ +.certificate-content { + padding: 2rem; +} + +.certificate-border { + border: 8px solid #667eea; + border-radius: 16px; + padding: 2rem; + background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%); + position: relative; +} + +.certificate-border::before { + content: ''; + position: absolute; + top: -4px; + left: -4px; + right: -4px; + bottom: -4px; + background: linear-gradient(45deg, #667eea, #764ba2, #667eea); + border-radius: 20px; + z-index: -1; +} + +.certificate-inner { + background: white; + padding: 3rem; + border-radius: 12px; + text-align: center; + box-shadow: inset 0 0 20px rgba(102, 126, 234, 0.1); +} + +.certificate-title h1 { + font-size: 3rem; + color: #2d3748; + margin: 0 0 0.5rem 0; + font-family: 'Georgia', serif; + font-weight: 700; +} + +.certificate-subtitle { + font-size: 1.2rem; + color: #4a5568; + font-style: italic; + margin-bottom: 2rem; +} + +.certificate-text { + font-size: 1.1rem; + color: #4a5568; + margin-bottom: 1.5rem; +} + +.certificate-course-title { + font-size: 2rem; + color: #667eea; + font-weight: 700; + margin: 1rem 0; + font-family: 'Georgia', serif; +} + +.certificate-course-description { + font-size: 1rem; + color: #4a5568; + margin-bottom: 2rem; + line-height: 1.6; +} + +.certificate-details { + margin: 2rem 0; + text-align: left; + max-width: 400px; + margin-left: auto; + margin-right: auto; +} + +.certificate-detail-row { + display: flex; + justify-content: space-between; + margin-bottom: 0.5rem; + padding: 0.5rem 0; + border-bottom: 1px dotted #e2e8f0; +} + +.detail-label { + font-weight: 600; + color: #4a5568; +} + +.detail-value { + color: #2d3748; +} + +.certificate-skills { + margin: 2rem 0; + text-align: left; +} + +.certificate-skills h3 { + color: #2d3748; + margin-bottom: 1rem; + text-align: center; +} + +.certificate-skills-list { + max-width: 500px; + margin: 0 auto; +} + +.certificate-skill { + margin-bottom: 0.5rem; + color: #4a5568; + line-height: 1.5; +} + +.certificate-footer { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 3rem; + padding-top: 2rem; + border-top: 2px solid #e2e8f0; +} + +.certificate-issuer { + text-align: left; +} + +.issuer-name { + font-size: 1.1rem; + font-weight: 600; + color: #2d3748; + margin-bottom: 0.5rem; +} + +.validation-code { + font-size: 0.9rem; + color: #4a5568; + font-family: 'Courier New', monospace; +} + +.certificate-seal { + font-size: 4rem; + color: #667eea; + animation: sealGlow 2s ease-in-out infinite alternate; +} + +@keyframes sealGlow { + from { text-shadow: 0 0 10px rgba(102, 126, 234, 0.5); } + to { text-shadow: 0 0 20px rgba(102, 126, 234, 0.8); } +} + +/* Certificate Actions */ +.certificate-actions { + padding: 2rem; + display: flex; + gap: 1rem; + justify-content: center; + flex-wrap: wrap; +} + +.certificate-btn { + padding: 0.75rem 2rem; + border-radius: 8px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s ease; + border: none; + font-size: 1rem; +} + +.certificate-btn.download { + background: #48bb78; + color: white; +} + +.certificate-btn.download:hover { + background: #38a169; + transform: translateY(-2px); +} + +.certificate-btn.share { + background: #ed8936; + color: white; +} + +.certificate-btn.share:hover { + background: #dd6b20; + transform: translateY(-2px); +} + +/* Celebration Effect */ +.celebration-effect { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + pointer-events: none; + z-index: 9999; +} + +.celebration-effect .confetti { + position: absolute; + font-size: 2rem; + animation: confettiFall 3s linear forwards; +} + +@keyframes confettiFall { + 0% { + transform: translateY(-100vh) rotate(0deg); + opacity: 1; + } + 100% { + transform: translateY(100vh) rotate(360deg); + opacity: 0; + } +} + +.celebration-effect .confetti:nth-child(1) { left: 10%; animation-delay: 0s; } +.celebration-effect .confetti:nth-child(2) { left: 30%; animation-delay: 0.5s; } +.celebration-effect .confetti:nth-child(3) { left: 50%; animation-delay: 1s; } +.celebration-effect .confetti:nth-child(4) { left: 70%; animation-delay: 1.5s; } +.celebration-effect .confetti:nth-child(5) { left: 90%; animation-delay: 2s; } + +/* Course Completion Notification */ +.course-completion-notification { + position: fixed; + top: 2rem; + right: 2rem; + background: white; + border-radius: 12px; + box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); + z-index: 9998; + animation: notificationSlideIn 0.4s ease-out; + cursor: pointer; + transition: transform 0.3s ease; +} + +.course-completion-notification:hover { + transform: translateY(-2px); +} + +@keyframes notificationSlideIn { + from { + opacity: 0; + transform: translateX(100%); + } + to { + opacity: 1; + transform: translateX(0); + } +} + +.notification-content { + display: flex; + align-items: center; + gap: 1rem; + padding: 1rem 1.5rem; +} + +.notification-icon { + font-size: 2rem; + flex-shrink: 0; +} + +.notification-text { + flex: 1; + color: #2d3748; +} + +.notification-close { + background: none; + border: none; + font-size: 1.5rem; + color: #a0aec0; + cursor: pointer; + padding: 0; + width: 24px; + height: 24px; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + transition: all 0.3s ease; +} + +.notification-close:hover { + background: #e2e8f0; + color: #4a5568; +} + +/* Responsive Design */ +@media (max-width: 768px) { + .course-completion-overlay { + padding: 1rem; + } + + .completion-header { + padding: 2rem 1rem 1rem; + } + + .completion-header h2 { + font-size: 2rem; + } + + .completion-header h3 { + font-size: 1.2rem; + } + + .completion-body { + padding: 1rem; + } + + .completion-stats { + grid-template-columns: repeat(2, 1fr); + } + + .achievement-badges { + grid-template-columns: 1fr; + } + + .completion-actions { + flex-direction: column; + padding: 1rem; + } + + .certificate-inner { + padding: 2rem 1rem; + } + + .certificate-title h1 { + font-size: 2rem; + } + + .certificate-course-title { + font-size: 1.5rem; + } + + .certificate-actions { + flex-direction: column; + padding: 1rem; + } + + .course-completion-notification { + top: 1rem; + right: 1rem; + left: 1rem; + } +} + +/* Difficulty Classes */ +.course-difficulty.beginner { + background: #c6f6d5; + color: #22543d; +} + +.course-difficulty.intermediate { + background: #feebc8; + color: #744210; +} + +.course-difficulty.advanced { + background: #fed7d7; + color: #742a2a; +} \ No newline at end of file diff --git a/css/course-system.css b/css/course-system.css new file mode 100644 index 0000000..1394591 --- /dev/null +++ b/css/course-system.css @@ -0,0 +1,1507 @@ +/* ===== コースシステム専用CSS ===== */ + +/* ===== コース選択画面 ===== */ + +.course-selection-screen { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + z-index: 1000; + display: flex; + align-items: center; + justify-content: center; + padding: 2rem; + overflow-y: auto; + animation: fadeIn 0.5s ease-out; +} + +.course-selection-screen.hidden { + display: none; +} + +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(20px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.course-selection-container { + max-width: 1200px; + width: 100%; + margin: 0 auto; +} + +.course-selection-header { + text-align: center; + margin-bottom: 3rem; + color: white; + animation: slideInDown 0.6s ease-out; +} + +@keyframes slideInDown { + from { + opacity: 0; + transform: translateY(-30px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.course-selection-header h2 { + font-size: 2.5rem; + margin-bottom: 1rem; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); + font-weight: 700; +} + +.course-selection-header p { + font-size: 1.2rem; + opacity: 0.9; + max-width: 600px; + margin: 0 auto; + line-height: 1.6; +} + +.course-list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); + gap: 2rem; + margin-bottom: 2rem; +} + +.course-card { + background: white; + border-radius: 16px; + padding: 2rem; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); + transition: all 0.3s ease; + cursor: pointer; + position: relative; + overflow: hidden; + animation: slideInUp 0.6s ease-out; + animation-fill-mode: both; +} + +.course-card:nth-child(1) { animation-delay: 0.1s; } +.course-card:nth-child(2) { animation-delay: 0.2s; } +.course-card:nth-child(3) { animation-delay: 0.3s; } + +@keyframes slideInUp { + from { + opacity: 0; + transform: translateY(30px); + } + to { + opacity: 1; + transform: translateY(0); + } +} + +.course-card:hover { + transform: translateY(-8px); + box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3); +} + +.course-card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 4px; + background: linear-gradient(90deg, #667eea, #764ba2); +} + +.course-header { + display: flex; + align-items: center; + gap: 1rem; + margin-bottom: 1.5rem; +} + +.course-icon { + font-size: 2.5rem; + width: 60px; + height: 60px; + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(135deg, #667eea, #764ba2); + border-radius: 12px; + color: white; + box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); +} + +.course-title-section h3 { + font-size: 1.5rem; + color: #2d3748; + margin-bottom: 0.5rem; + font-weight: 600; +} + +.course-difficulty { + display: inline-block; + padding: 0.25rem 0.75rem; + border-radius: 20px; + font-size: 0.8rem; + font-weight: 600; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.course-difficulty.beginner { + background: #c6f6d5; + color: #22543d; +} + +.course-difficulty.intermediate { + background: #fed7d7; + color: #742a2a; +} + +.course-difficulty.advanced { + background: #bee3f8; + color: #2a4365; +} + +.course-description { + color: #4a5568; + line-height: 1.6; + margin-bottom: 1.5rem; + font-size: 0.95rem; +} + +.course-meta { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; + margin-bottom: 1.5rem; +} + +.course-meta-item { + display: flex; + align-items: center; + gap: 0.5rem; + color: #718096; + font-size: 0.9rem; +} + +.course-meta-icon { + font-size: 1.1rem; +} + +.course-progress { + margin-bottom: 1.5rem; +} + +.course-progress-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.5rem; +} + +.course-progress-label { + font-size: 0.9rem; + color: #4a5568; + font-weight: 600; +} + +.course-progress-percentage { + font-size: 0.8rem; + color: #718096; + font-weight: 600; +} + +.course-progress-bar { + height: 8px; + background: #e2e8f0; + border-radius: 4px; + overflow: hidden; +} + +.course-progress-fill { + height: 100%; + background: linear-gradient(90deg, #48bb78, #38a169); + border-radius: 4px; + transition: width 0.3s ease; +} + +.course-modules { + margin-bottom: 1.5rem; +} + +.course-modules-header { + font-size: 0.9rem; + color: #4a5568; + font-weight: 600; + margin-bottom: 0.75rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.course-modules-list { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} + +.course-module-tag { + padding: 0.25rem 0.75rem; + background: #f7fafc; + border: 1px solid #e2e8f0; + border-radius: 16px; + font-size: 0.8rem; + color: #4a5568; + transition: all 0.2s ease; +} + +.course-module-tag.completed { + background: #c6f6d5; + border-color: #9ae6b4; + color: #22543d; + font-weight: 600; +} + +.course-actions { + display: flex; + gap: 1rem; +} + +.course-select-btn { + flex: 1; + padding: 0.75rem 1.5rem; + background: linear-gradient(135deg, #667eea, #764ba2); + color: white; + border: none; + border-radius: 8px; + font-weight: 600; + cursor: pointer; + transition: all 0.2s ease; + font-size: 0.9rem; +} + +.course-select-btn:hover { + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); +} + +.course-select-btn.continue { + background: linear-gradient(135deg, #48bb78, #38a169); +} + +.course-select-btn.continue:hover { + box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4); +} + +.course-info-btn { + padding: 0.75rem; + background: transparent; + border: 2px solid #e2e8f0; + border-radius: 8px; + color: #718096; + cursor: pointer; + transition: all 0.2s ease; + font-size: 1rem; +} + +.course-info-btn:hover { + border-color: #cbd5e0; + color: #4a5568; + background: #f7fafc; +} + +/* ===== コース情報モーダル ===== */ + +.course-info-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + display: flex; + align-items: center; + justify-content: center; + z-index: 2000; + padding: 2rem; + overflow-y: auto; + animation: fadeIn 0.3s ease-out; +} + +.course-info-modal { + background: white; + border-radius: 16px; + max-width: 800px; + width: 100%; + max-height: 90vh; + overflow-y: auto; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); + animation: modalSlideIn 0.3s ease-out; +} + +@keyframes modalSlideIn { + from { + opacity: 0; + transform: scale(0.9) translateY(20px); + } + to { + opacity: 1; + transform: scale(1) translateY(0); + } +} + +.course-info-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 2rem 2rem 1rem; + border-bottom: 1px solid #e2e8f0; +} + +.course-info-header h2 { + color: #2d3748; + margin: 0; + font-size: 1.5rem; +} + +.course-info-close { + background: none; + border: none; + font-size: 1.5rem; + cursor: pointer; + color: #718096; + padding: 0.5rem; + border-radius: 50%; + transition: all 0.2s ease; + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; +} + +.course-info-close:hover { + background: #f7fafc; + color: #4a5568; +} + +.course-info-body { + padding: 2rem; +} + +.course-overview { + background: #f7fafc; + padding: 1.5rem; + border-radius: 12px; + margin-bottom: 2rem; + border-left: 4px solid #667eea; +} + +.course-overview p { + margin: 0.5rem 0; + color: #4a5568; +} + +.course-overview p:first-child { + margin-top: 0; +} + +.course-overview p:last-child { + margin-bottom: 0; +} + +.course-description-full { + margin-bottom: 2rem; +} + +.course-description-full h3 { + color: #2d3748; + margin-bottom: 1rem; + font-size: 1.2rem; +} + +.course-modules-detail h3 { + color: #2d3748; + margin-bottom: 1.5rem; + font-size: 1.2rem; +} + +.module-detail { + border: 1px solid #e2e8f0; + border-radius: 8px; + padding: 1.5rem; + margin-bottom: 1rem; + transition: all 0.2s ease; +} + +.module-detail:hover { + border-color: #cbd5e0; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.module-detail.completed { + background: #f0fff4; + border-color: #9ae6b4; +} + +.module-detail h4 { + color: #2d3748; + margin: 0 0 0.5rem 0; + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 1.1rem; +} + +.module-detail p { + color: #4a5568; + margin: 0 0 1rem 0; + line-height: 1.5; +} + +.module-progress { + font-size: 0.9rem; + color: #718096; + margin-bottom: 0.5rem; + font-weight: 500; +} + +.module-prerequisites { + font-size: 0.8rem; + color: #e53e3e; + font-style: italic; +} + +.course-info-actions { + padding: 1rem 2rem 2rem; + border-top: 1px solid #e2e8f0; + text-align: center; +} + +.course-info-actions .course-select-btn { + min-width: 200px; +} + +/* ===== 進捗表示パネル ===== */ + +.progress-panel { + width: 320px; + background: white; + box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); + transition: transform 0.3s ease; + z-index: 100; + position: fixed; + right: 0; + top: 80px; + height: calc(100vh - 80px); + overflow-y: auto; +} + +.progress-panel.hidden { + transform: translateX(100%); +} + +.progress-panel-header { + padding: 1rem; + border-bottom: 1px solid #e2e8f0; + display: flex; + justify-content: space-between; + align-items: center; + background: #f7fafc; + position: sticky; + top: 0; + z-index: 10; +} + +.progress-panel-header h3 { + margin: 0; + color: #2d3748; + font-size: 1rem; +} + +.progress-panel-content { + padding: 1rem; +} + +/* コース全体の進捗セクション */ +.course-progress-section { + margin-bottom: 2rem; + padding: 1rem; + background: #f7fafc; + border-radius: 8px; + border-left: 4px solid #667eea; +} + +.course-progress-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.75rem; +} + +.course-progress-header h4 { + margin: 0; + color: #2d3748; + font-size: 1rem; +} + +.course-progress-stats { + font-size: 0.85rem; + color: #718096; + margin-top: 0.5rem; +} + +/* モジュール進捗セクション */ +.modules-progress-section { + margin-bottom: 2rem; +} + +.modules-progress-section h4 { + margin: 0 0 1rem 0; + color: #2d3748; + font-size: 1rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.modules-list { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.module-item { + border: 1px solid #e2e8f0; + border-radius: 8px; + padding: 1rem; + transition: all 0.2s ease; +} + +.module-item:hover { + border-color: #cbd5e0; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.module-item.completed { + background: #f0fff4; + border-color: #9ae6b4; +} + +.module-item.current { + background: #ebf8ff; + border-color: #90cdf4; +} + +.module-header { + margin-bottom: 0.75rem; +} + +.module-title { + display: flex; + align-items: center; + gap: 0.5rem; + font-weight: 600; + color: #2d3748; + font-size: 0.9rem; +} + +.module-status { + font-size: 1rem; +} + +.module-progress { + display: flex; + align-items: center; + gap: 0.5rem; + margin-bottom: 0.75rem; +} + +.module-progress-text { + font-size: 0.8rem; + color: #718096; + font-weight: 500; +} + +.module-progress-bar { + flex: 1; + height: 6px; + background: #e2e8f0; + border-radius: 3px; + overflow: hidden; +} + +.module-progress-bar .progress-fill { + height: 100%; + background: linear-gradient(90deg, #48bb78, #38a169); + border-radius: 3px; + transition: width 0.3s ease; +} + +.module-lessons { + display: flex; + flex-wrap: wrap; + gap: 0.25rem; +} + +.lesson-dot { + width: 12px; + height: 12px; + border-radius: 50%; + background: #e2e8f0; + cursor: pointer; + transition: all 0.2s ease; + position: relative; +} + +.lesson-dot:hover { + transform: scale(1.2); +} + +.lesson-dot.completed { + background: #48bb78; +} + +.lesson-dot.current { + background: #667eea; + animation: pulse 2s infinite; +} + +@keyframes pulse { + 0% { + box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); + } + 70% { + box-shadow: 0 0 0 6px rgba(102, 126, 234, 0); + } + 100% { + box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); + } +} + +/* 現在のレッスンセクション */ +.current-lesson-section { + margin-bottom: 2rem; + padding: 1rem; + background: #ebf8ff; + border-radius: 8px; + border-left: 4px solid #3182ce; +} + +.current-lesson-section h4 { + margin: 0 0 1rem 0; + color: #2d3748; + font-size: 1rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.current-lesson-info { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.lesson-position { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 0.9rem; + color: #2d3748; + font-weight: 500; +} + +.lesson-separator { + color: #718096; +} + +.lesson-navigation { + display: flex; + gap: 0.5rem; +} + +.lesson-nav-btn { + flex: 1; + padding: 0.5rem 0.75rem; + background: #3182ce; + color: white; + border: none; + border-radius: 6px; + font-size: 0.8rem; + cursor: pointer; + transition: all 0.2s ease; +} + +.lesson-nav-btn:hover:not(:disabled) { + background: #2c5aa0; + transform: translateY(-1px); +} + +.lesson-nav-btn:disabled { + background: #cbd5e0; + color: #a0aec0; + cursor: not-allowed; + transform: none; +} + +/* 学習統計セクション */ +.learning-stats-section { + padding: 1rem; + background: #fffaf0; + border-radius: 8px; + border-left: 4px solid #ed8936; +} + +.learning-stats-section h4 { + margin: 0 0 1rem 0; + color: #2d3748; + font-size: 1rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.stats-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; +} + +.stat-item { + text-align: center; +} + +.stat-label { + display: block; + font-size: 0.8rem; + color: #718096; + margin-bottom: 0.25rem; +} + +.stat-value { + display: block; + font-size: 1.2rem; + font-weight: 700; + color: #2d3748; +} + +/* ヘッダーの進捗ボタン */ +.show-progress-btn { + background: none; + border: none; + font-size: 1.2rem; + cursor: pointer; + padding: 0.5rem; + border-radius: 50%; + transition: all 0.2s ease; + color: #4a5568; +} + +.show-progress-btn:hover { + background: rgba(255, 255, 255, 0.2); + transform: scale(1.1); +} + +/* レスポンシブ対応 */ +@media (max-width: 1024px) { + .progress-panel { + width: 280px; + } + + .course-list { + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 1.5rem; + } +} + +@media (max-width: 768px) { + .course-selection-screen { + padding: 1rem; + } + + .course-selection-header h2 { + font-size: 2rem; + } + + .course-selection-header p { + font-size: 1rem; + } + + .course-list { + grid-template-columns: 1fr; + gap: 1.5rem; + } + + .course-card { + padding: 1.5rem; + } + + .course-meta { + grid-template-columns: 1fr; + gap: 0.75rem; + } + + .course-actions { + flex-direction: column; + gap: 0.75rem; + } + + .progress-panel { + position: fixed; + top: 80px; + right: 0; + width: 100%; + max-width: 320px; + transform: translateX(100%); + z-index: 1001; + } + + .progress-panel:not(.hidden) { + transform: translateX(0); + } + + .stats-grid { + grid-template-columns: 1fr; + gap: 0.75rem; + } +} + +@media (max-width: 480px) { + .course-selection-header h2 { + font-size: 1.75rem; + } + + .course-card { + padding: 1.25rem; + } + + .course-header { + flex-direction: column; + text-align: center; + gap: 0.75rem; + } + + .course-icon { + font-size: 2rem; + width: 50px; + height: 50px; + } + + .course-info-overlay { + padding: 1rem; + } + + .course-info-header { + padding: 1.5rem 1.5rem 1rem; + } + + .course-info-body { + padding: 1.5rem; + } + + .course-info-actions { + padding: 1rem 1.5rem 1.5rem; + } + + .module-detail { + padding: 1rem; + } + + .progress-panel { + max-width: 100%; + } +} + +/* ダークモード対応(将来の拡張用) */ +@media (prefers-color-scheme: dark) { + .course-card { + background: #2d3748; + color: #e2e8f0; + } + + .course-title-section h3 { + color: #e2e8f0; + } + + .course-description { + color: #a0aec0; + } + + .progress-panel { + background: #2d3748; + color: #e2e8f0; + } + + .progress-panel-header { + background: #4a5568; + } + + .course-progress-section, + .current-lesson-section, + .learning-stats-section { + background: #4a5568; + } + + .module-item { + background: #4a5568; + border-color: #718096; + } +} + +/* アニメーション効果の改善 */ +.course-card { + will-change: transform; +} + +.lesson-dot { + will-change: transform; +} + +.progress-fill { + will-change: width; +} + +/* アクセシビリティ対応 */ +@media (prefers-reduced-motion: reduce) { + .course-card, + .lesson-dot, + .progress-fill, + .course-selection-screen, + .course-info-modal { + animation: none; + transition: none; + } + + .lesson-dot.current { + animation: none; + } +} + +/* フォーカス状態の改善 */ +.course-select-btn:focus, +.course-info-btn:focus, +.lesson-nav-btn:focus, +.lesson-dot:focus { + outline: 2px solid #667eea; + outline-offset: 2px; +} + +/* 高コントラスト対応 */ +@media (prefers-contrast: high) { + .course-card { + border: 2px solid #2d3748; + } + + .course-difficulty { + border: 1px solid currentColor; + } + + .lesson-dot { + border: 1px solid #2d3748; + } +} +/ +* ===== 追加のレスポンシブ改善 ===== */ + +/* 超小型デバイス対応 (320px以下) */ +@media (max-width: 320px) { + .course-selection-header h2 { + font-size: 1.5rem; + } + + .course-card { + padding: 1rem; + } + + .course-icon { + font-size: 1.8rem; + width: 45px; + height: 45px; + } + + .course-title-section h3 { + font-size: 1.2rem; + } + + .course-meta { + grid-template-columns: 1fr; + gap: 0.5rem; + } + + .progress-panel { + width: 100%; + } + + .stats-grid { + grid-template-columns: 1fr; + } +} + +/* タッチデバイス対応 */ +@media (hover: none) and (pointer: coarse) { + .course-card:hover { + transform: none; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); + } + + .course-select-btn:hover, + .course-info-btn:hover, + .lesson-nav-btn:hover { + transform: none; + } + + .lesson-dot { + width: 16px; + height: 16px; + } + + .lesson-nav-btn { + padding: 0.75rem 1rem; + font-size: 0.9rem; + } +} + +/* 横向きモバイル対応 */ +@media (max-width: 768px) and (orientation: landscape) { + .course-selection-screen { + padding: 1rem; + } + + .course-selection-header { + margin-bottom: 2rem; + } + + .course-selection-header h2 { + font-size: 1.8rem; + } + + .progress-panel { + width: 280px; + } +} + +/* 大型デスクトップ対応 */ +@media (min-width: 1440px) { + .course-selection-container { + max-width: 1400px; + } + + .course-list { + grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); + gap: 2.5rem; + } + + .progress-panel { + width: 360px; + } +} + +/* プリント対応 */ +@media print { + .course-selection-screen, + .progress-panel { + display: none !important; + } +} + +/* 高解像度ディスプレイ対応 */ +@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { + .course-icon { + image-rendering: -webkit-optimize-contrast; + image-rendering: crisp-edges; + } +} + +/* ===== パフォーマンス最適化 ===== */ + +/* GPU加速を有効にする要素 */ +.course-card, +.progress-panel, +.course-selection-screen { + will-change: transform; + transform: translateZ(0); +} + +/* アニメーション最適化 */ +.course-card { + backface-visibility: hidden; + perspective: 1000px; +} + +/* スクロール最適化 */ +.progress-panel-content, +.course-info-modal { + -webkit-overflow-scrolling: touch; + scroll-behavior: smooth; +} + +/* ===== アクセシビリティ強化 ===== */ + +/* スクリーンリーダー対応 */ +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +/* キーボードナビゲーション改善 */ +.course-card:focus, +.lesson-dot:focus { + outline: 3px solid #667eea; + outline-offset: 2px; +} + +/* 高コントラストモード対応 */ +@media (prefers-contrast: high) { + .course-card { + border: 2px solid #000; + } + + .course-progress-fill, + .progress-fill { + background: #000; + } + + .lesson-dot.completed { + background: #000; + border: 2px solid #fff; + } + + .lesson-dot.current { + background: #000; + border: 2px solid #fff; + animation: none; + } +} + +/* ===== ダークモード完全対応 ===== */ +@media (prefers-color-scheme: dark) { + .course-selection-screen { + background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%); + } + + .course-card { + background: #2d3748; + color: #e2e8f0; + border: 1px solid #4a5568; + } + + .course-title-section h3 { + color: #e2e8f0; + } + + .course-description { + color: #a0aec0; + } + + .course-meta-item { + color: #a0aec0; + } + + .course-module-tag { + background: #4a5568; + color: #e2e8f0; + border-color: #718096; + } + + .course-module-tag.completed { + background: #22543d; + color: #c6f6d5; + border-color: #38a169; + } + + .progress-panel { + background: #2d3748; + color: #e2e8f0; + border-left: 1px solid #4a5568; + } + + .progress-panel-header { + background: #4a5568; + border-bottom-color: #718096; + } + + .course-progress-section, + .current-lesson-section, + .learning-stats-section { + background: #4a5568; + border-left-color: #667eea; + } + + .module-item { + background: #4a5568; + border-color: #718096; + color: #e2e8f0; + } + + .module-item.completed { + background: #22543d; + border-color: #38a169; + } + + .module-item.current { + background: #2c5aa0; + border-color: #4299e1; + } + + .lesson-dot { + background: #718096; + } + + .lesson-dot.completed { + background: #48bb78; + } + + .lesson-dot.current { + background: #667eea; + } + + .course-info-modal { + background: #2d3748; + color: #e2e8f0; + } + + .course-info-header { + border-bottom-color: #4a5568; + } + + .course-overview { + background: #4a5568; + border-left-color: #667eea; + } + + .module-detail { + background: #4a5568; + border-color: #718096; + } + + .module-detail.completed { + background: #22543d; + border-color: #38a169; + } +}/* === +== 準備中コース対応スタイル ===== */ + +/* 準備中コースカード */ +.course-card.coming-soon { + opacity: 0.7; + position: relative; + overflow: hidden; +} + +.course-card.coming-soon::after { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: repeating-linear-gradient( + 45deg, + transparent, + transparent 10px, + rgba(255, 193, 7, 0.1) 10px, + rgba(255, 193, 7, 0.1) 20px + ); + pointer-events: none; +} + +.course-card.coming-soon:hover { + transform: none; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); +} + +/* 準備中バッジ */ +.coming-soon-badge { + display: inline-block; + padding: 0.25rem 0.75rem; + background: linear-gradient(135deg, #ffc107, #ff8f00); + color: white; + border-radius: 20px; + font-size: 0.7rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.5px; + margin-left: 0.5rem; + box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3); + animation: comingSoonPulse 2s ease-in-out infinite; +} + +@keyframes comingSoonPulse { + 0%, 100% { + transform: scale(1); + box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3); + } + 50% { + transform: scale(1.05); + box-shadow: 0 4px 8px rgba(255, 193, 7, 0.5); + } +} + +/* 準備中ボタン */ +.course-select-btn.disabled { + background: #6c757d; + color: white; + cursor: not-allowed; + opacity: 0.6; +} + +.course-select-btn.disabled:hover { + transform: none; + box-shadow: none; + background: #6c757d; +} + +/* 準備中コースの説明文強調 */ +.course-card.coming-soon .course-description strong { + color: #ff8f00; + font-weight: 700; +} + +/* 準備中コースのモジュールタグ */ +.course-card.coming-soon .course-module-tag { + opacity: 0.6; + background: #f8f9fa; + color: #6c757d; + border-color: #dee2e6; +} + +/* 準備中コースのメタ情報 */ +.course-card.coming-soon .course-meta-item { + opacity: 0.7; +} + +/* 準備中コースのアイコン */ +.course-card.coming-soon .course-icon { + position: relative; +} + +.course-card.coming-soon .course-icon::after { + content: '🚧'; + position: absolute; + top: -5px; + right: -5px; + font-size: 1rem; + background: white; + border-radius: 50%; + width: 20px; + height: 20px; + display: flex; + align-items: center; + justify-content: center; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); +} + +/* 準備中コースの情報モーダル対応 */ +.course-info-modal .course-card.coming-soon .course-overview { + border-left-color: #ffc107; +} + +/* レスポンシブ対応 */ +@media (max-width: 768px) { + .coming-soon-badge { + font-size: 0.6rem; + padding: 0.2rem 0.6rem; + margin-left: 0.25rem; + } + + .course-card.coming-soon .course-icon::after { + font-size: 0.8rem; + width: 16px; + height: 16px; + top: -3px; + right: -3px; + } +} + +@media (max-width: 480px) { + .course-card.coming-soon::after { + background: repeating-linear-gradient( + 45deg, + transparent, + transparent 8px, + rgba(255, 193, 7, 0.1) 8px, + rgba(255, 193, 7, 0.1) 16px + ); + } +} + +/* ダークモード対応 */ +@media (prefers-color-scheme: dark) { + .course-card.coming-soon { + background: #2d3748; + border: 1px solid #4a5568; + } + + .course-card.coming-soon::after { + background: repeating-linear-gradient( + 45deg, + transparent, + transparent 10px, + rgba(255, 193, 7, 0.2) 10px, + rgba(255, 193, 7, 0.2) 20px + ); + } + + .coming-soon-badge { + background: linear-gradient(135deg, #d69e2e, #b7791f); + } + + .course-select-btn.disabled { + background: #4a5568; + color: #a0aec0; + } + + .course-card.coming-soon .course-description strong { + color: #d69e2e; + } +} + +/* アクセシビリティ対応 */ +@media (prefers-reduced-motion: reduce) { + .coming-soon-badge { + animation: none; + } + + .course-card.coming-soon::after { + background: rgba(255, 193, 7, 0.1); + } +} + +/* 高コントラスト対応 */ +@media (prefers-contrast: high) { + .course-card.coming-soon { + border: 3px solid #ffc107; + } + + .coming-soon-badge { + background: #000; + color: #fff; + border: 2px solid #ffc107; + } + + .course-select-btn.disabled { + background: #000; + color: #fff; + border: 2px solid #6c757d; + } +} \ No newline at end of file diff --git a/css/main.css b/css/main.css index 3d1b2a1..ba0e4a9 100644 --- a/css/main.css +++ b/css/main.css @@ -25,6 +25,55 @@ body { font-size: 1.5rem; } +.header-center { + flex: 1; + display: flex; + justify-content: center; +} + +.current-course-info { + display: flex; + align-items: center; + gap: 0.75rem; + background: #f7fafc; + padding: 0.5rem 1rem; + border-radius: 20px; + border: 1px solid #e2e8f0; +} + +.current-course-info.hidden { + display: none; +} + +.course-label { + font-size: 0.9rem; + color: #718096; + font-weight: 500; +} + +#current-course-title { + font-size: 0.9rem; + color: #2d3748; + font-weight: 600; +} + +.switch-course-btn { + background: none; + border: none; + font-size: 1rem; + cursor: pointer; + padding: 0.25rem; + border-radius: 50%; + transition: all 0.2s ease; + color: #718096; +} + +.switch-course-btn:hover { + background: #e2e8f0; + color: #4a5568; + transform: rotate(90deg); +} + .score-display { display: flex; gap: 2rem; @@ -1186,4 +1235,904 @@ th { justify-content: flex-start; padding: 0.75rem; } +} + +/* ===== コース選択画面 ===== */ + +.course-selection-screen { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + z-index: 1000; + display: flex; + align-items: center; + justify-content: center; + padding: 2rem; + overflow-y: auto; +} + +.course-selection-screen.hidden { + display: none; +} + +.course-selection-container { + max-width: 1200px; + width: 100%; + margin: 0 auto; +} + +.course-selection-header { + text-align: center; + margin-bottom: 3rem; + color: white; +} + +.course-selection-header h2 { + font-size: 2.5rem; + margin-bottom: 1rem; + text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3); +} + +.course-selection-header p { + font-size: 1.2rem; + opacity: 0.9; + max-width: 600px; + margin: 0 auto; +} + +.course-list { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); + gap: 2rem; + margin-bottom: 2rem; +} + +.course-card { + background: white; + border-radius: 16px; + padding: 2rem; + box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2); + transition: all 0.3s ease; + cursor: pointer; + position: relative; + overflow: hidden; +} + +.course-card:hover { + transform: translateY(-8px); + box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3); +} + +.course-card::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 4px; + background: linear-gradient(90deg, #667eea, #764ba2); +} + +.course-header { + display: flex; + align-items: center; + gap: 1rem; + margin-bottom: 1.5rem; +} + +.course-icon { + font-size: 2.5rem; + width: 60px; + height: 60px; + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(135deg, #667eea, #764ba2); + border-radius: 12px; + color: white; +} + +.course-title-section h3 { + font-size: 1.5rem; + color: #2d3748; + margin-bottom: 0.25rem; +} + +.course-difficulty { + display: inline-block; + padding: 0.25rem 0.75rem; + border-radius: 20px; + font-size: 0.8rem; + font-weight: 600; + text-transform: uppercase; +} + +.course-difficulty.beginner { + background: #c6f6d5; + color: #22543d; +} + +.course-difficulty.intermediate { + background: #fed7d7; + color: #742a2a; +} + +.course-difficulty.advanced { + background: #bee3f8; + color: #2a4365; +} + +.course-description { + color: #4a5568; + line-height: 1.6; + margin-bottom: 1.5rem; +} + +.course-meta { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 1rem; + margin-bottom: 1.5rem; +} + +.course-meta-item { + display: flex; + align-items: center; + gap: 0.5rem; + color: #718096; + font-size: 0.9rem; +} + +.course-meta-icon { + font-size: 1.1rem; +} + +.course-progress { + margin-bottom: 1.5rem; +} + +.course-progress-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.5rem; +} + +.course-progress-label { + font-size: 0.9rem; + color: #4a5568; + font-weight: 600; +} + +.course-progress-percentage { + font-size: 0.8rem; + color: #718096; +} + +.course-progress-bar { + height: 8px; + background: #e2e8f0; + border-radius: 4px; + overflow: hidden; +} + +.course-progress-fill { + height: 100%; + background: linear-gradient(90deg, #48bb78, #38a169); + border-radius: 4px; + transition: width 0.3s ease; +} + +.course-modules { + margin-bottom: 1.5rem; +} + +.course-modules-header { + font-size: 0.9rem; + color: #4a5568; + font-weight: 600; + margin-bottom: 0.75rem; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.course-modules-list { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} + +.course-module-tag { + padding: 0.25rem 0.75rem; + background: #f7fafc; + border: 1px solid #e2e8f0; + border-radius: 16px; + font-size: 0.8rem; + color: #4a5568; +} + +.course-module-tag.completed { + background: #c6f6d5; + border-color: #9ae6b4; + color: #22543d; +} + +.course-actions { + display: flex; + gap: 1rem; +} + +.course-select-btn { + flex: 1; + padding: 0.75rem 1.5rem; + background: linear-gradient(135deg, #667eea, #764ba2); + color: white; + border: none; + border-radius: 8px; + font-weight: 600; + cursor: pointer; + transition: all 0.2s ease; +} + +.course-select-btn:hover { + transform: translateY(-2px); + box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); +} + +.course-select-btn.continue { + background: linear-gradient(135deg, #48bb78, #38a169); +} + +.course-select-btn.continue:hover { + box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4); +} + +.course-info-btn { + padding: 0.75rem; + background: transparent; + border: 2px solid #e2e8f0; + border-radius: 8px; + color: #718096; + cursor: pointer; + transition: all 0.2s ease; +} + +.course-info-btn:hover { + border-color: #cbd5e0; + color: #4a5568; +} + +/* レスポンシブ対応 */ +@media (max-width: 768px) { + .course-selection-screen { + padding: 1rem; + } + + .course-selection-header h2 { + font-size: 2rem; + } + + .course-selection-header p { + font-size: 1rem; + } + + .course-list { + grid-template-columns: 1fr; + gap: 1.5rem; + } + + .course-card { + padding: 1.5rem; + } + + .course-meta { + grid-template-columns: 1fr; + gap: 0.75rem; + } + + .course-actions { + flex-direction: column; + gap: 0.75rem; + } +} + +@media (max-width: 480px) { + .course-selection-header h2 { + font-size: 1.75rem; + } + + .course-card { + padding: 1.25rem; + } + + .course-header { + flex-direction: column; + text-align: center; + gap: 0.75rem; + } + + .course-icon { + font-size: 2rem; + width: 50px; + height: 50px; + } +} + +/* ===== コース情報モーダル ===== */ + +.course-info-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.8); + display: flex; + align-items: center; + justify-content: center; + z-index: 2000; + padding: 2rem; + overflow-y: auto; +} + +.course-info-modal { + background: white; + border-radius: 16px; + max-width: 800px; + width: 100%; + max-height: 90vh; + overflow-y: auto; + box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); +} + +.course-info-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 2rem 2rem 1rem; + border-bottom: 1px solid #e2e8f0; +} + +.course-info-header h2 { + color: #2d3748; + margin: 0; +} + +.course-info-close { + background: none; + border: none; + font-size: 1.5rem; + cursor: pointer; + color: #718096; + padding: 0.5rem; + border-radius: 50%; + transition: all 0.2s ease; +} + +.course-info-close:hover { + background: #f7fafc; + color: #4a5568; +} + +.course-info-body { + padding: 2rem; +} + +.course-overview { + background: #f7fafc; + padding: 1.5rem; + border-radius: 12px; + margin-bottom: 2rem; +} + +.course-overview p { + margin: 0.5rem 0; + color: #4a5568; +} + +.course-description-full { + margin-bottom: 2rem; +} + +.course-description-full h3 { + color: #2d3748; + margin-bottom: 1rem; +} + +.course-modules-detail h3 { + color: #2d3748; + margin-bottom: 1.5rem; +} + +.module-detail { + border: 1px solid #e2e8f0; + border-radius: 8px; + padding: 1.5rem; + margin-bottom: 1rem; + transition: all 0.2s ease; +} + +.module-detail:hover { + border-color: #cbd5e0; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); +} + +.module-detail.completed { + background: #f0fff4; + border-color: #9ae6b4; +} + +.module-detail h4 { + color: #2d3748; + margin: 0 0 0.5rem 0; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.module-detail p { + color: #4a5568; + margin: 0 0 1rem 0; + line-height: 1.5; +} + +.module-progress { + font-size: 0.9rem; + color: #718096; + margin-bottom: 0.5rem; +} + +.module-prerequisites { + font-size: 0.8rem; + color: #e53e3e; + font-style: italic; +} + +.course-info-actions { + padding: 1rem 2rem 2rem; + border-top: 1px solid #e2e8f0; + text-align: center; +} + +.course-info-actions .course-select-btn { + min-width: 200px; +} + +/* レスポンシブ対応 */ +@media (max-width: 768px) { + .course-info-overlay { + padding: 1rem; + } + + .course-info-header { + padding: 1.5rem 1.5rem 1rem; + } + + .course-info-body { + padding: 1.5rem; + } + + .course-info-actions { + padding: 1rem 1.5rem 1.5rem; + } + + .module-detail { + padding: 1rem; + } +} +/* ==== += 進捗表示パネル ===== */ + +.progress-panel { + width: 320px; + background: white; + box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1); + transition: transform 0.3s ease; + z-index: 90; + order: 3; +} + +.progress-panel.hidden { + transform: translateX(100%); +} + +.progress-panel-header { + padding: 1rem; + border-bottom: 1px solid #e2e8f0; + display: flex; + justify-content: space-between; + align-items: center; + background: #f8f9fa; +} + +.progress-panel-header h3 { + margin: 0; + color: #2d3748; + font-size: 1rem; +} + +.progress-panel-content { + padding: 1rem; + height: calc(100vh - 140px); + overflow-y: auto; +} + +/* コース全体の進捗セクション */ +.course-progress-section { + margin-bottom: 1.5rem; + padding: 1rem; + background: #f7fafc; + border-radius: 8px; + border-left: 4px solid #667eea; +} + +.course-progress-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.75rem; +} + +.course-progress-header h4 { + margin: 0; + color: #2d3748; + font-size: 1rem; + font-weight: 600; +} + +#course-progress-percentage { + font-size: 1.1rem; + font-weight: 700; + color: #667eea; +} + +.course-progress-bar { + height: 12px; + background: #e2e8f0; + border-radius: 6px; + overflow: hidden; + margin-bottom: 0.5rem; +} + +.course-progress-bar .progress-fill { + height: 100%; + background: linear-gradient(90deg, #667eea, #764ba2); + border-radius: 6px; + transition: width 0.5s ease; +} + +.course-progress-stats { + font-size: 0.9rem; + color: #718096; + text-align: center; +} + +/* モジュール進捗セクション */ +.modules-progress-section { + margin-bottom: 1.5rem; +} + +.modules-progress-section h4 { + margin: 0 0 1rem 0; + color: #2d3748; + font-size: 0.95rem; + font-weight: 600; +} + +.modules-list { + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +.module-item { + background: white; + border: 1px solid #e2e8f0; + border-radius: 8px; + padding: 0.75rem; + transition: all 0.2s ease; +} + +.module-item:hover { + border-color: #cbd5e0; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); +} + +.module-item.completed { + background: #f0fff4; + border-color: #9ae6b4; +} + +.module-item.current { + background: #ebf8ff; + border-color: #90cdf4; + box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1); +} + +.module-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.5rem; +} + +.module-title { + font-size: 0.9rem; + font-weight: 600; + color: #2d3748; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.module-status { + font-size: 1rem; +} + +.module-progress { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.5rem; +} + +.module-progress-text { + font-size: 0.8rem; + color: #718096; +} + +.module-progress-bar { + height: 6px; + background: #e2e8f0; + border-radius: 3px; + overflow: hidden; + flex: 1; + margin: 0 0.5rem; +} + +.module-progress-bar .progress-fill { + height: 100%; + background: linear-gradient(90deg, #48bb78, #38a169); + border-radius: 3px; + transition: width 0.3s ease; +} + +.module-lessons { + display: flex; + flex-wrap: wrap; + gap: 0.25rem; +} + +.lesson-dot { + width: 12px; + height: 12px; + border-radius: 50%; + background: #e2e8f0; + transition: all 0.2s ease; + cursor: pointer; + position: relative; +} + +.lesson-dot.completed { + background: #48bb78; +} + +.lesson-dot.current { + background: #667eea; + box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3); +} + +.lesson-dot:hover::after { + content: attr(data-lesson-name); + position: absolute; + bottom: 120%; + left: 50%; + transform: translateX(-50%); + background: #2d3748; + color: white; + padding: 0.25rem 0.5rem; + border-radius: 4px; + font-size: 0.7rem; + white-space: nowrap; + z-index: 100; +} + +/* 現在のレッスン情報セクション */ +.current-lesson-section { + margin-bottom: 1.5rem; + padding: 1rem; + background: #fff5f5; + border-radius: 8px; + border-left: 4px solid #f56565; +} + +.current-lesson-section h4 { + margin: 0 0 1rem 0; + color: #2d3748; + font-size: 0.95rem; + font-weight: 600; +} + +.current-lesson-info { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.lesson-position { + display: flex; + align-items: center; + gap: 0.5rem; + font-size: 0.9rem; + color: #4a5568; +} + +.lesson-separator { + color: #a0aec0; + font-weight: bold; +} + +#current-module-name { + font-weight: 600; + color: #2d3748; +} + +#current-lesson-name { + font-weight: 600; + color: #e53e3e; +} + +.lesson-navigation { + display: flex; + gap: 0.5rem; +} + +.lesson-nav-btn { + flex: 1; + padding: 0.5rem 0.75rem; + border: 1px solid #e2e8f0; + border-radius: 6px; + background: white; + color: #4a5568; + font-size: 0.8rem; + cursor: pointer; + transition: all 0.2s ease; +} + +.lesson-nav-btn:hover:not(:disabled) { + background: #f7fafc; + border-color: #cbd5e0; +} + +.lesson-nav-btn:disabled { + opacity: 0.5; + cursor: not-allowed; +} + +/* 学習統計セクション */ +.learning-stats-section { + padding: 1rem; + background: #fffaf0; + border-radius: 8px; + border-left: 4px solid #ed8936; +} + +.learning-stats-section h4 { + margin: 0 0 1rem 0; + color: #2d3748; + font-size: 0.95rem; + font-weight: 600; +} + +.stats-grid { + display: grid; + grid-template-columns: 1fr; + gap: 0.75rem; +} + +.stat-item { + display: flex; + justify-content: space-between; + align-items: center; + padding: 0.5rem; + background: white; + border-radius: 6px; + border: 1px solid #fed7d7; +} + +.stat-label { + font-size: 0.8rem; + color: #718096; + font-weight: 500; +} + +.stat-value { + font-size: 0.9rem; + font-weight: 700; + color: #2d3748; +} + +/* アプリレイアウトの調整 */ +.app-layout { + display: flex; + min-height: calc(100vh - 80px); +} + +.main-content { + flex: 1; + max-width: none; + margin: 0; + padding: 2rem; + display: grid; + gap: 1.5rem; + order: 2; +} + +.sidebar { + order: 1; +} + +/* 進捗パネル表示時のレイアウト調整 */ +.app-layout:has(.progress-panel:not(.hidden)) .main-content { + margin-right: 0; +} + +/* レスポンシブ対応 - 進捗パネル */ +@media (max-width: 1200px) { + .progress-panel { + width: 280px; + } +} + +@media (max-width: 768px) { + .progress-panel { + position: fixed; + top: 80px; + right: 0; + height: calc(100vh - 80px); + width: 300px; + z-index: 200; + } + + .progress-panel.hidden { + transform: translateX(100%); + } + + .progress-panel:not(.hidden) { + transform: translateX(0); + } + + .stats-grid { + grid-template-columns: 1fr; + } + + .lesson-navigation { + flex-direction: column; + } +}/* + 進捗表示ボタン */ +.show-progress-btn { + background: none; + border: none; + font-size: 1.2rem; + cursor: pointer; + padding: 0.5rem; + border-radius: 50%; + transition: all 0.2s ease; + color: #4a5568; + margin-left: 1rem; +} + +.show-progress-btn:hover { + background: rgba(102, 126, 234, 0.1); + color: #667eea; + transform: scale(1.1); +} + +.show-progress-btn:active { + transform: scale(0.95); } \ No newline at end of file diff --git a/data/courses.json b/data/courses.json new file mode 100644 index 0000000..d1e1c81 --- /dev/null +++ b/data/courses.json @@ -0,0 +1,148 @@ +{ + "courses": [ + { + "id": "sql-basics", + "title": "SQL基礎コース", + "description": "非エンジニアがデータを抽出できるようになるためのSELECT文の使い方から始まる参照中心の講座", + "targetAudience": "非エンジニア", + "difficulty": "初級", + "estimatedHours": 8, + "modules": [ + { + "id": "module-1", + "title": "SELECT文の基本", + "description": "基本的なデータ取得方法を学習", + "lessons": ["challenge-001", "challenge-002"], + "prerequisites": [] + }, + { + "id": "module-2", + "title": "データの絞り込み", + "description": "WHERE句を使った条件指定", + "lessons": ["challenge-003", "challenge-004"], + "prerequisites": ["module-1"] + }, + { + "id": "module-3", + "title": "データの並び替えと制限", + "description": "ORDER BYとLIMITを使ったデータ操作", + "lessons": ["challenge-005", "challenge-006", "challenge-007"], + "prerequisites": ["module-2"] + }, + { + "id": "module-4", + "title": "集約関数の基本", + "description": "COUNT、SUM、AVGなどの基本的な集約", + "lessons": ["challenge-008", "challenge-009"], + "prerequisites": ["module-3"] + }, + { + "id": "module-5", + "title": "グループ化と集計", + "description": "GROUP BYとHAVINGを使った集計", + "lessons": ["challenge-010", "challenge-011", "challenge-012"], + "prerequisites": ["module-4"] + }, + { + "id": "module-6", + "title": "テーブル結合の基本", + "description": "JOINを使った複数テーブルの結合", + "lessons": ["challenge-013", "challenge-014", "challenge-015"], + "prerequisites": ["module-5"] + }, + { + "id": "module-7", + "title": "サブクエリと応用", + "description": "副問い合わせと実践的なクエリ", + "lessons": ["challenge-016", "challenge-017"], + "prerequisites": ["module-6"] + } + ] + }, + { + "id": "db-fundamentals", + "title": "DB基礎コース", + "description": "エンジニアがテーブルの作り方や変更方法、INSERT,UPDATE,DELETEなどを学ぶための講座", + "targetAudience": "エンジニア", + "difficulty": "中級", + "estimatedHours": 12, + "status": "coming_soon", + "modules": [ + { + "id": "module-1", + "title": "DDL(データ定義言語)", + "description": "テーブルの作成と変更", + "lessons": ["ddl-001", "ddl-002", "ddl-003"], + "prerequisites": [] + }, + { + "id": "module-2", + "title": "DML(データ操作言語)", + "description": "データの挿入、更新、削除", + "lessons": ["dml-001", "dml-002", "dml-003"], + "prerequisites": ["module-1"] + }, + { + "id": "module-3", + "title": "制約とインデックス", + "description": "データ整合性とパフォーマンス最適化", + "lessons": ["constraint-001", "constraint-002", "index-001"], + "prerequisites": ["module-2"] + }, + { + "id": "module-4", + "title": "トランザクション管理", + "description": "ACID特性とトランザクション制御", + "lessons": ["transaction-001", "transaction-002"], + "prerequisites": ["module-3"] + } + ] + }, + { + "id": "big-data-basics", + "title": "大規模データ基礎コース", + "description": "duckdbの特性を活かした大規模データをETLしたり集計する手法を学ぶための講座", + "targetAudience": "データ専門家", + "difficulty": "上級", + "estimatedHours": 16, + "status": "coming_soon", + "modules": [ + { + "id": "module-1", + "title": "DuckDBの特徴", + "description": "分析用データベースの特性を理解", + "lessons": ["duckdb-001", "duckdb-002"], + "prerequisites": [] + }, + { + "id": "module-2", + "title": "大規模データの読み込み", + "description": "CSV、Parquet、JSONファイルの効率的な処理", + "lessons": ["etl-001", "etl-002", "etl-003"], + "prerequisites": ["module-1"] + }, + { + "id": "module-3", + "title": "高度な集計とウィンドウ関数", + "description": "分析に必要な高度なSQL技術", + "lessons": ["analytics-001", "analytics-002", "analytics-003"], + "prerequisites": ["module-2"] + }, + { + "id": "module-4", + "title": "パフォーマンス最適化", + "description": "大規模データ処理の最適化技術", + "lessons": ["performance-001", "performance-002"], + "prerequisites": ["module-3"] + }, + { + "id": "module-5", + "title": "ETLパイプライン構築", + "description": "実践的なデータパイプライン設計", + "lessons": ["pipeline-001", "pipeline-002", "pipeline-003"], + "prerequisites": ["module-4"] + } + ] + } + ] +} \ No newline at end of file diff --git a/index.html b/index.html index 255e786..3d637b6 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,6 @@ + @@ -7,17 +8,45 @@ + + +

🎮 SQL学習ゲーム

+
+ +
スコア: 0 ステージ: 1 +
+ + +
- -
-
-

データベースを初期化中...

-

しばらくお待ちください。

-
-
- 難易度: -
-
- - -
- -
- -
-
-

SQLクエリを入力してください

-
- - - + + +
+

📚 モジュール進捗

+
+ +
+
+ + +
+

📍 現在の位置

+
+
+ モジュール名 + > + レッスン名 +
+
+ + +
-
- - + + +
+

📊 学習統計

+
+
+ 総スコア + 0 +
+
+ 学習日数 + 0 +
+
+ 完了モジュール + 0 +
+
- - - - - -
+ + -
-
-

実行結果

-
-
-
-

クエリを実行すると結果がここに表示されます

-
-
+ + + - +
+
+

実行結果

+
+
+
+

クエリを実行すると結果がここに表示されます

+
+
+ +
@@ -161,13 +260,13 @@

💡 ヒント

AIが回答を分析中...
- + - + - +