/* Bootstrap Modern Style */
/* Bootstrap 변수 오버라이드 및 커스텀 스타일 */
:root {
    --bs-primary: #0d6efd;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-border-radius: 0.375rem;
    --bs-border-radius-sm: 0.25rem;
    --bs-border-radius-lg: 0.5rem;
    --bs-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem;
    color: #212529;
}

.container {
    display: flex;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* 왼쪽: 콘트롤 패널 - Bootstrap Card */
.control-panel {
    flex: 1;
    background: #ffffff;
    border-radius: var(--bs-border-radius-lg);
    padding: 2rem;
    max-width: 800px;
    box-shadow: var(--bs-box-shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.control-panel h1 {
    color: #212529;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.2;
}

.description {
    color: #6c757d;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 400;
}

/* 버튼 그룹 - 모던한 스타일 */
.button-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    border: none;
    min-width: 160px;
    height: 52px;
    flex: 1;
    overflow: hidden;
}

/* 열기 버튼 - 모던한 Cyan 색상 */
.btn-open {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
}

.btn-open::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-open:hover::before {
    left: 100%;
}

.btn-open:hover {
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
}

.btn-open:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(6, 182, 212, 0.4);
}

.btn-open:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
}

/* 닫기 버튼 - 모던한 Orange 색상 */
.btn-close {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.btn-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-close:hover::before {
    left: 100%;
}

.btn-close:hover {
    background: linear-gradient(135deg, #d97706 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
}

.btn-close:active {
    transform: translateY(0);
    box-shadow: 0 2px 12px rgba(245, 158, 11, 0.4);
}

.btn-close:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

/* 설정 섹션 */
.settings-section {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.settings-section h2 {
    color: #212529;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.setting-item {
    background: #f8f9fa;
    border-radius: 0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--bs-box-shadow-sm);
}

.setting-item h3 {
    color: #212529;
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
}

.setting-description {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.file-upload-area {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.file-upload-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 0.875rem;
    color: #495057;
}

.file-upload-label:hover {
    background: #f8f9fa;
    border-color: #86b7fe;
}

.file-upload-label i {
    font-size: 1.25rem;
    color: #0d6efd;
}

.btn-upload,
.btn-save,
.btn-generate {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    border: none;
    min-width: 100px;
}

.btn-upload {
    background: #0d6efd;
    color: #ffffff;
}

.btn-upload:hover:not(:disabled) {
    background: #0b5ed7;
    transform: translateY(-1px);
}

.btn-upload:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-save {
    background: #198754;
    color: #ffffff;
    margin-top: 0.75rem;
}

.btn-save:hover {
    background: #157347;
    transform: translateY(-1px);
}

.btn-generate {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-generate:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #212529;
}

.lecture-title-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0;
    font-size: 0.875rem;
    font-family: inherit;
    background: #ffffff;
    color: #212529;
    margin-bottom: 0.75rem;
}

.lecture-title-input:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.lecture-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 0.75rem;
    background: #ffffff;
    color: #212529;
}

.lecture-textarea:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.upload-status {
    margin-top: 0.75rem;
    padding: 0.5rem;
    border-radius: 0;
    font-size: 0.875rem;
    min-height: 1.5rem;
}

.upload-status.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.upload-status.error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.upload-status.info {
    background: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

/* 사용 방법 섹션 - Bootstrap */
.usage-section {
    margin-top: 2.5rem;
}

.usage-section h2 {
    color: #212529;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.code-block {
    background: #f8f9fa;
    border-radius: 0;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--bs-box-shadow-sm);
}

.code-block h3 {
    color: #212529;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.code-block pre {
    background: #000000;
    color: #212529;
    padding: 0;
    border-radius: 0;
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.8;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.12);
    word-wrap: break-word;
    white-space: pre;
    margin: 0;
}

.code-block pre code {
    display: block;
    font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875em;
    color: #212529;
    word-wrap: break-word;
    white-space: pre;
    padding: 0;
    margin: 0;
    background: transparent;
}

/* 제브라 스타일 - 줄단위 홀짝 배경색 */
.code-block pre .code-line {
    display: block;
    padding: 0.25rem 1rem;
    margin: 0;
    min-height: 1.8em;
}

/* 홀수 줄 - 밝은 회색 */
.code-block pre .code-line:nth-child(odd) {
    background-color: #f8f9fa;
}

/* 짝수 줄 - 어두운 회색 */
.code-block pre .code-line:nth-child(even) {
    background-color: #e9ecef;
}

/* 오른쪽: 챗봇 레이어 - Bootstrap Card */
.chatbot {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 400px;
    height: 700px;
    background: #ffffff;
    border-radius: var(--bs-border-radius-lg);
    box-shadow: var(--bs-box-shadow-lg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.125);
    overflow: hidden;
}

.chatbot.hidden {
    transform: translateY(100px);
    opacity: 0;
    pointer-events: none;
}

/* 챗봇 헤더 - 모던한 그라데이션 */
.chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 1.25rem;
    border-radius: var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0 0;
    position: relative;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    z-index: 20;
}

.chatbot-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    line-height: 1.2;
}

.chatbot-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    background: transparent;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0;
    margin-top: 0.5rem;
}

.tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    text-align: center;
    position: relative;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.tab:hover::before {
    width: 100%;
}

.tab.active {
    color: #ffffff;
    background: transparent;
    border-bottom-color: transparent;
}

.tab.active::before {
    width: 100%;
    background: linear-gradient(90deg, #06b6d4, #3b82f6);
}

.tab.active::after {
    display: none;
}

.close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--bs-border-radius);
    transition: all 0.15s ease-in-out;
    font-weight: 300;
    line-height: 1;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.close-btn:active {
    transform: scale(0.95);
}

/* 챗봇 콘텐츠 - Bootstrap */
.chatbot-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    background: #ffffff;
    position: relative;
}

/* 환영 메시지 (채팅 메시지 영역에 표시) */
.message.welcome-message {
    background: #e7f1ff;
    border: 1px solid #6c757d;
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.message.welcome-message .message-content {
    color: #084298;
    font-weight: 600;
}

.section {
    margin-bottom: 1.5rem;
    scroll-margin-top: 0;
}

/* 학습 목표 박스 스타일 - 박스 제거 */
.goals-box {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-top: 0.75rem;
    box-shadow: none;
}

/* 학습목표 섹션 내 text-muted는 goals-box의 margin-top으로 간격 조정되므로 추가 여백 불필요 */
.goals-box .text-muted {
    margin-top: 0;
}

/* 요약 섹션 p 태그 스타일 - 목표 섹션과 동일한 글씨 크기 */
#summarySection > p:not(.text-muted) {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #495057;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* .section ul 스타일이 적용되지 않도록 명시적으로 오버라이드 */
.goals-box .goals-list,
.goals-list {
    margin: 0 !important;
    padding-left: 0 !important;
    list-style: none !important;
}

/* .section li 스타일이 적용되지 않도록 명시적으로 오버라이드 */
.goals-box .goals-list li,
.goals-list li {
    margin-bottom: 0.875rem;
    line-height: 1.7;
    color: #495057;
    padding: 0.75rem 1rem 0.75rem 2rem !important;
    margin-left: 0 !important;
    background: #f8f9fa !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--bs-border-radius) !important;
    list-style-type: none !important;
    list-style-position: outside !important;
    transform: none !important;
    transition: all 0.2s ease !important;
    font-size: 0.9375rem !important;
    position: relative;
}

.goals-box .goals-list li::before {
    content: '•';
    position: absolute;
    left: 0.75rem;
    color: #0d6efd;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.5;
}

.goals-box .goals-list li:hover {
    /* hover 효과 제거 */
}

.goals-box .goals-list li:last-child {
    margin-bottom: 0 !important;
}

.section.quiz-section {
    background: #ffffff;
    padding: 0;
    border-radius: 0;
    border: none;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.quiz-content {
    margin: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 퀴즈 컨테이너 - Bootstrap 스타일, 디자인적으로 개선된 레이아웃 */
.quiz-container {
    padding: 0.375rem 1.5rem 0.75rem 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
    justify-content: flex-start;
}

.quiz-header {
    margin-bottom: 0.375rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.375rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.quiz-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-progress {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 600;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.5rem 1rem;
    border-radius: var(--bs-border-radius-lg);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: var(--bs-box-shadow-sm);
}

.quiz-question-container {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    flex: 1 1 auto;
    min-height: 0;
}

.quiz-question {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.5;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--bs-border-radius-lg);
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    position: relative;
}

.quiz-question::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: var(--bs-border-radius-lg) 0 0 var(--bs-border-radius-lg);
}

.quiz-options-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.25rem 0;
    max-height: 100%;
}

.quiz-option-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    text-align: left;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: var(--bs-border-radius-lg);
    font-size: 0.875rem;
    color: #212529;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
    position: relative;
    margin: 0;
    box-sizing: border-box;
}

.quiz-option-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 60%;
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
    transition: width 0.2s ease-in-out;
}

.quiz-option-btn:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
    margin-left: 0;
    margin-right: 0;
}

.quiz-option-btn:hover::before {
    width: 4px;
}

.quiz-option-btn:active {
    box-shadow: 0 1px 4px rgba(13, 110, 253, 0.2);
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
}

.quiz-option-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
}

/* 퀴즈 결과 화면 - Bootstrap 스타일, 디자인적으로 개선된 레이아웃 */
.quiz-result-container {
    padding: 0.375rem 1.5rem 0.75rem 1.5rem;
    max-width: 700px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    justify-content: flex-start;
}

.quiz-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 0;
    overflow-y: auto;
    gap: 0.75rem;
    justify-content: flex-start;
    padding-top: 0.5rem;
}

.quiz-result-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
}

.quiz-result-icon.correct {
    background: #d1e7dd;
    color: #0f5132;
    border: 2px solid #198754;
}

.quiz-result-icon.incorrect {
    background: #f8d7da;
    color: #842029;
    border: 2px solid #dc3545;
}

.quiz-result-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.quiz-result-title.correct {
    color: #198754;
}

.quiz-result-title.incorrect {
    color: #dc3545;
}

.quiz-result-question {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.5;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--bs-border-radius-lg);
    border: 2px solid #e9ecef;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: left;
    flex-shrink: 0;
}

.quiz-answer-info {
    width: 100%;
    text-align: left;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-your-answer,
.quiz-correct-answer {
    padding: 0.625rem 0.875rem;
    border-radius: var(--bs-border-radius-lg);
    border: 2px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.quiz-your-answer {
    background: #fff3cd;
    border-color: #ffc107;
}

.quiz-correct-answer {
    background: #d1e7dd;
    border-color: #198754;
}

.answer-label {
    font-size: 0.8125rem;
    color: #6c757d;
    font-weight: 500;
    display: inline-block;
    margin: 0;
    margin-right: 0.5rem;
}

.answer-value {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #ffffff;
    border-radius: var(--bs-border-radius);
    font-weight: 600;
    margin: 0;
    margin-right: 0.5rem;
    font-size: 0.8125rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.answer-value.correct {
    background: #198754;
    color: #ffffff;
    border-color: #198754;
}

.answer-text {
    display: inline-block;
    margin: 0;
    font-size: 0.875rem;
    color: #212529;
    line-height: 1.4;
}

.quiz-explanation {
    width: 100%;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, #cfe2ff 0%, #b3d7ff 100%);
    border: 2px solid #0d6efd;
    border-radius: var(--bs-border-radius-lg);
    font-size: 0.875rem;
    line-height: 1.5;
    color: #212529;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
    text-align: left;
    flex-shrink: 0;
    position: relative;
}

.quiz-explanation::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: var(--bs-border-radius-lg) 0 0 var(--bs-border-radius-lg);
}

.quiz-action-buttons {
    margin-top: auto;
    padding-top: 0.75rem;
    flex-shrink: 0;
}

.quiz-action-btn {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--bs-primary);
    color: #ffffff;
    border: 1px solid var(--bs-primary);
    border-radius: var(--bs-border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    box-shadow: var(--bs-box-shadow-sm);
}

.quiz-action-btn:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
    box-shadow: var(--bs-box-shadow);
}

.quiz-action-btn:active {
    transform: translateY(0);
    background: #0a58ca;
    border-color: #0a53be;
}

.quiz-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.section h3 {
    color: #212529;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

/* Bootstrap text-muted 클래스 */
.text-muted {
    color: #6c757d !important;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0.75rem 0 0 0;
}

.section ul {
    list-style: none;
    padding-left: 0;
}

.section li {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--bs-border-radius);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #212529;
    box-shadow: var(--bs-box-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.125);
    transition: all 0.15s ease-in-out;
}

.section li:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question-btn {
    background: #ffffff;
    border: 1px solid var(--bs-primary);
    color: var(--bs-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.15s ease-in-out;
    box-shadow: var(--bs-box-shadow-sm);
}

.question-btn:hover {
    background: var(--bs-primary);
    color: #ffffff;
    border-color: var(--bs-primary);
    transform: translateY(-1px);
    box-shadow: var(--bs-box-shadow);
}

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

/* 채팅 메시지 - 가독성 향상 스타일 */
.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 0;
    min-height: 200px;
}

.message {
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    max-width: 85%;
    min-width: fit-content;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    font-size: 0.9375rem;
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
    white-space: pre-wrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    flex-direction: column;
}

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

.message-content {
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
}

.message.user {
    background: #ffffff;
    align-self: flex-end;
    border: 1px solid #0d6efd;
    border-bottom-right-radius: 0.25rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}

.message.user .message-content {
    color: #1a1a1a;
    font-weight: normal;
}

.message.user .message-time {
    color: #6c757d;
    font-size: 0.6875rem;
    margin-top: 0.375rem;
    opacity: 0.7;
    align-self: flex-end;
}

.message.assistant {
    background: #ffffff;
    align-self: flex-start;
    border: 1px solid #6c757d;
    border-bottom-left-radius: 0.25rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.message.assistant .message-content {
    color: #1a1a1a;
    font-weight: normal;
    font-size: 0.875rem;
}

.message.assistant .message-time {
    color: #6c757d;
    font-size: 0.6875rem;
    margin-top: 0.375rem;
    opacity: 0.7;
    align-self: flex-start;
}

.message.error {
    background: #fff3cd;
    align-self: center;
    border: 1px solid #ffc107;
    border-radius: 0.5rem;
    max-width: 90%;
    text-align: center;
    padding: 0.75rem 1.25rem;
}

.message.error .message-content {
    color: #856404;
    font-weight: 600;
}

.message-time {
    font-size: 0.6875rem;
    color: #6c757d;
    margin-top: 0.375rem;
    opacity: 0.7;
}

/* 입력 영역 - Bootstrap Form */
.chatbot-input {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg);
}

#messageInput {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: var(--bs-border-radius);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.15s ease-in-out;
    background: #ffffff;
    color: #212529;
    font-family: inherit;
    box-shadow: none;
}

#messageInput:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    outline: 0;
}

#messageInput::placeholder {
    color: #6c757d;
    opacity: 1;
}

.send-btn {
    background: var(--bs-primary);
    color: #ffffff;
    border: 1px solid var(--bs-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--bs-border-radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.15s ease-in-out;
    box-shadow: var(--bs-box-shadow-sm);
    min-width: 80px;
}

.send-btn:hover {
    background: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
    box-shadow: var(--bs-box-shadow);
}

.send-btn:active {
    background: #0a58ca;
    border-color: #0a53be;
    transform: translateY(0);
}

.send-btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.send-btn:disabled {
    background: #6c757d;
    border-color: #6c757d;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.65;
    box-shadow: none;
}

/* 플로팅 아이콘 - 챗봇 영역 오른쪽 아래 */
.floating-icon {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--bs-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--bs-box-shadow-lg);
    transition: all 0.3s ease-in-out;
    z-index: 1001;
    color: #ffffff;
    border: none;
}

.floating-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.floating-icon:active {
    transform: scale(0.95);
}

.floating-icon.hidden {
    display: none;
}

/* 로딩 애니메이션 - Bootstrap Spinner */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 0.2em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
    opacity: 0.75;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* 반응형 디자인 - Bootstrap Breakpoints */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .control-panel {
        padding: 1.5rem;
    }

    .chatbot {
        width: calc(100% - 2rem);
        height: calc(100vh - 2rem);
        bottom: 1rem;
        right: 1rem;
    }

    .floating-icon {
        bottom: 1rem;
        right: 1rem;
    }
}

/* 강의 요약 목록 스타일 */
.summary-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: var(--bs-border-radius);
    padding: 1.25rem;
    box-shadow: var(--bs-box-shadow-sm);
    transition: box-shadow 0.15s ease-in-out;
}

.summary-item:hover {
    box-shadow: var(--bs-box-shadow);
}

.summary-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.summary-item-header h4 {
    color: #212529;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.summary-date {
    color: #6c757d;
    font-size: 0.875rem;
    white-space: nowrap;
    margin-left: 1rem;
}

.summary-preview {
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.btn-open-tutor {
    background: var(--bs-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--bs-border-radius);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
}

.btn-open-tutor:hover {
    background: #0b5ed7;
}

.btn-open-tutor:active {
    background: #0a58ca;
}

/* 스크롤바 스타일링 (Bootstrap 스타일) */
.chatbot-content::-webkit-scrollbar {
    width: 8px;
}

.chatbot-content::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: var(--bs-border-radius);
}

.chatbot-content::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: var(--bs-border-radius);
}

.chatbot-content::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}
