body{
    height: 100vh;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

main {
    display: table;
    width: 100%;
}

.side-gutter {
    width: 50px;
    display: table-cell;
}

.center-main-field {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.center-main-field .back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin: 20px 0 16px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.center-main-field .back-button:hover {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}

.center-main-field .description {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-bottom: 24px;
}

.center-main-field .description h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.center-main-field .description p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.center-main-field .button {
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.center-main-field .button:hover {
    opacity: 0.9;
}

.center-main-field .button:active {
    transform: scale(0.98);
}

.center-main-field .chat-container {
    background: #fff;
    font-family: inherit;
    border-radius: 0;
    padding: 0;
    margin-left: 0;
    max-width: 100%;
    height: 75vh;
}

.center-main-field .chat-header {
    margin-bottom: 1em;
    color: #fff;
}

.center-main-field .chat-header h2 {
    font-size: 1.25em;
    font-weight: bold;
}


.center-main-field .chat-messages {
    height: 85%;
    overflow-y: auto;
    padding: 0;
}

.center-main-field .chat-messages::-webkit-scrollbar {
    width: 4px;
}

.center-main-field .chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.center-main-field .chat-messages::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 4px;
}

.center-main-field .chat-messages::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.center-main-field .message {
    padding: 16px 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    color: #333;
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
}

.center-main-field .message:last-child {
    border-bottom: none;
}

.center-main-field .message-sender {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.875rem;
    color: #666;
}

.center-main-field .message-text {
    font-size: 0.95rem;
    margin-bottom: 4px;
    word-wrap: break-word;
    line-height: 1.6;
    color: #333;
}

.center-main-field .message-timestamp {
    font-size: 0.75rem;
    text-align: right;
    color: #999;
}

.center-main-field .blue-bg {
    background: transparent;
}

.center-main-field .blue-bg .message-text {
    text-align: right;
    color: #333;
}

.center-main-field .blue-bg .message-sender{
    text-align: right;
    color: #666;
}

.center-main-field .blue-bg .message-timestamp {
    color: #999;
}

.center-main-field .gray-bg {
    background: transparent;
}

.center-main-field .gray-bg .message-text {
    text-align: left;
}

.center-main-field .gray-bg .message-sender{
    text-align: left;
}

.center-main-field .gray-bg .message-timestamp {
    text-align: left;
}

.center-main-field .chat-input-form {
    margin-bottom: 100px;
    display: flex;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
    background: #fff;
    padding: 16px 0;
    border-top: 1px solid #e0e0e0;
}

.center-main-field .chat-input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    font-size: 0.95rem;
    flex-grow: 1;
    transition: all 0.2s;
    font-family: inherit;
}

.center-main-field .chat-input:focus {
    outline: none;
    border-color: #999;
}

.center-main-field .send-button {
    background: #333;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
}

.center-main-field .send-button:hover {
    background: #000;
}

.center-main-field .stop-button {
    background: #d32f2f;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
}

.center-main-field .stop-button:hover {
    background: #b71c1c;
}

.center-main-field .clear-chat-button {
    display: block;
    margin: 2.5em auto;
}

.message {
    position: relative;
    padding-left: 0px; /* 메시지 텍스트와 아이콘 사이에 공간 확보 */
}

.message-icon {
    left: -20%; /* 아이콘을 메시지 박스 왼쪽 외부로 이동 */
    width: 40px;         /* 이미지 크기 조정 */
    height: 40px;        /* 이미지 크기 조정 */
    border-radius: 50%;  /* 이미지를 원형으로 만듦 */
    object-fit: cover;   /* 이미지가 요소에 꽉 차도록 */
    float: left;         /* 왼쪽으로 정렬 */
    margin-right: 0px;  /* 오른쪽 여백 설정 */
}

/* Disabled state styles */
.center-main-field.disabled {
    opacity: 0.6;
    filter: grayscale(80%);
    pointer-events: none;
}

.center-main-field.disabled .chat-input {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.center-main-field.disabled .send-button {
    background: #ccc;
    cursor: not-allowed;
}

.disabled-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #ddd;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.disabled-overlay h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 16px;
    font-weight: 600;
}

.disabled-overlay p {
    font-size: 1rem;
    color: #999;
    margin-bottom: 24px;
    line-height: 1.6;
}

.disabled-overlay a {
    display: inline-block;
    padding: 12px 24px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s;
}

.disabled-overlay a:hover {
    background: #000;
}