/* 기본 스타일 초기화 */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 0;
}

header {
    background-color: #007bff;
    color: white;
    padding: 20px;
    text-align: center;
}

/* 대시보드 레이아웃 */
.dashboard {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* 요약 카드 섹션 */
.summary-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* 반응형을 위해 줄 바꿈 허용 */
}

.card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex: 1; /* 유연하게 공간 차지 */
    min-width: 250px; /* 카드의 최소 너비 설정 */
}

.card h3 {
    margin-top: 0;
    color: #007bff;
}

/* 진도율 원형 그래프 (간단한 CSS 구현) */
.progress-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    background-color: #28a745; /* 기본 배경색 */
    /* data-progress를 이용한 동적 배경 구현은 JavaScript 필요 */
}

/* 과목 목록 및 활동 섹션 */
.course-list, .activity-notifications {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.course-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.course-item:last-child {
    border-bottom: none;
}

.progress-bar {
    width: 150px;
    /*height: 8px;
    background-color: #e9ecef;*/
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #ffc107;
}

/* 활동 및 알림 */
.activity-box {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.activity-box p {
    margin: 5px 0;
}

.activity-box .time {
    font-size: 0.8em;
    color: #6c757d;
}

.notification {
    background-color: #fff3cd;
    padding: 15px;
    border-radius: 4px;
    border-left: 5px solid #ffc107;
}

.h4b {
	font-size: 1.5rem;
	font-weight: 700;
}

.truncate-multi-line-3 {
    overflow: hidden;
    /* 웹킷 기반 브라우저 (Chrome, Safari 등)에서 다중 줄 말줄임표를 활성화 */
    display: -webkit-box;
    /* 표시할 줄 수 설정 */
    -webkit-line-clamp: 3;
    /* 텍스트가 수직으로 쌓이도록 설정 */
    -webkit-box-orient: vertical;
}


/* 미디어 쿼리 (모바일 최적화) */
@media (max-width: 768px) {
    .summary-cards {
        flex-direction: column; /* 모바일에서는 세로로 쌓기 */
    }

    .card {
        min-width: 100%;
    }
}


/* 챗봇 플로팅 버튼 (FAB) */
.chatbot-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    font-size: 24px;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
}

/* 챗봇 패널 */
.chatbot-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    z-index: 999;
}

.hidden {
    display: none;
}

.chatbot-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-body {
    flex-grow: 1;
    padding: 10px;
    overflow-y: auto;
    border-bottom: 1px solid #eee;
}

/* ... 메시지 스타일 추가 (user, bot) ... */

.chatbot-footer {
    display: flex;
    padding: 10px;
}

#chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-right: 5px;
}

#send-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* 챗봇 메시지 스타일 */
.chat-message {
    margin-bottom: 10px;
    display: flex;
}

.chat-message p {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 75%;
    line-height: 1.4;
    word-wrap: break-word; /* 긴 단어 줄바꿈 */
}

/* 사용자 메시지 (우측 정렬, 파란색 배경) */
.chat-message.user {
    justify-content: flex-end;
}

.chat-message.user p {
    background-color: #007bff;
    color: white;
    border-bottom-right-radius: 2px;
}

/* 봇 메시지 (좌측 정렬, 회색 배경) */
.chat-message.bot {
    justify-content: flex-start;
}

.chat-message.bot p {
    background-color: #e9ecef;
    color: #333;
    border-bottom-left-radius: 2px;
}