/* 스타일 파일: styles.css */
/* 전체적인 레이아웃과 스타일 설정 */

/* 기본 스타일 설정 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* 컨테이너 스타일 */
.login-container, .chat-container {
    width: 400px;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

/* 헤더 스타일 */
.login-container h1, .chat-container .header h1 {
    margin: 0;
    margin-bottom: 20px;
}

/* 폼 그룹 스타일 */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group-inline {
    display: flex;
    justify-content: space-between;
}

.form-group-inline .form-group {
    flex: 1;
    margin-right: 10px;
}

.form-group-inline .form-group:last-child {
    margin-right: 0;
}

/* 레이블 및 입력 필드 스타일 */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

input[type="text"], input[type="number"], select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* 라디오 버튼 스타일 */
.radio-group {
    display: flex;
    justify-content: space-between;
}

.radio-group label {
    flex: 1;
    text-align: center;
}

input[type="radio"] {
    margin-right: 5px;
}

/* 파일 입력 및 이미지 미리보기 스타일 */
input[type="file"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.image-preview {
    display: block;
    width: 100px;
    height: 100px;
    margin-top: 10px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #ddd;
}

/* 버튼 스타일 */
button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 20px;
    margin-top: 10px;
}

button:hover {
    background: #0056b3;
}

/* 채팅 컨테이너 스타일 */
.chat-container {
    height: 600px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 헤더 스타일 */
.header {
    background: #007bff;
    padding: 15px;
    text-align: center;
    color: white;
}

/* 채팅 박스 스타일 */
.chat-box {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse; /* 메시지가 아래에서 위로 쌓이도록 설정 */
    background: #e5e5ea;
}

/* 입력 컨테이너 스타일 */
.input-container {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    background: #f9f9f9;
}

input[type="text"] {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px;
    font-size: 16px;
    margin-right: 10px;
}

/* 채팅 메시지 스타일 */
.chat-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    position: relative;
}

.chat-message img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* 채팅 메시지 내용 스타일 */
.chat-message .message-content {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 70%;
    margin-left: 10px;
}

/* 사용자 메시지 스타일 */
.chat-message.user {
    justify-content: flex-end;
}

.chat-message.user .message-content {
    background: #dcf8c6;
    margin-right: 10px;
    margin-left: 0;
}

.chat-message.user img {
    order: 2;
    margin-left: 10px;
}

/* GPT 메시지 스타일 */
.chat-message.gpt {
    justify-content: flex-start;
}

/* 추가 정보 스타일 */
.chat-info {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}
