/* [의도] 브라우저 전체 스크롤바 강제 제거 및 화면 고정 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;      /* min-height 대신 고정 height 사용 */
    overflow: hidden;   /* [핵심] 바깥쪽 스크롤바를 아예 없앰 */
    background-color: #f0f2f5;
}

/* [의도] 채팅창 영역 설정 - 화면 높이에 맞춰 자동 조절 */
.chat-container {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;   /* [의도] 대화 내용이 많아질 때 '여기만' 스크롤 생성 */
    background-color: #ffffff;
    margin: 10px auto;  /* 상하 마진 축소 */
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 90%;         /* 가로 폭 확대하여 가로 스크롤 방지 */
    max-width: 800px;
    
    /* [의도] 브라우저 기본 스크롤바 디자인 숨기기 (선택 사항) */
    scrollbar-width: thin; 
}

/* [의도] 메시지 말풍선 및 레이아웃 */
.message {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.message.user { justify-content: flex-end; }
.message.ai { justify-content: flex-start; }

.message-bubble {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 75%;
    word-wrap: break-word;
    line-height: 1.5;
}

/* 유저 메세지 색상 */
.message.user .message-bubble {
    background-color: #2563EB;
    color: white;
    border-bottom-right-radius: 2px;
}

/* AI 메세지 색상 */
.message.ai .message-bubble {
    background-color: #ffd950ab;
    color: #333;
    border-bottom-left-radius: 2px;
}

/* [의도] 하단 입력창 고정 및 여백 제거 */
.input-container {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    width: 95%;
    max-width: 800px;
    margin: 0 auto 10px auto; /* 하단 마진 살짝 부여 */
    border-radius: 0 0 8px 8px;
    box-sizing: border-box; /* 패딩이 너비에 영향을 주지 않도록 설정 */
}

.input-container input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

/* 메세지 전송 버튼 색상 */
.input-container button {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #2563EB;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
}

/* 로딩 애니메이션 */
.loading-spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: #2563EB;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: none;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 마이페이지에 저장 버튼 */
.save-btn {
    margin-top: 0px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #62B6FF, #2563EB);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(79, 124, 255, 0.25);
    transition: all 0.2s ease;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(79, 124, 255, 0.35);
    background: linear-gradient(135deg, #2563EB, #62B6FF);
}

.save-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(79, 124, 255, 0.2);
}


