* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 800px;
    margin: 0 auto;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    padding: 0 20px;
    background-color: #4267B2;
    color: white;
}

.chat-header h1 {
    font-size: 24px;
    font-weight: bold;
}

.logout-button {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: transparent;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.logout-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.main-image {
    height: 200px;
    border-radius: 10px;
    height: auto;
    margin: 20px auto;
    display: block;
  }
  
  .date-input {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
  }
  
  .date-input label {
    font-size: 16px;
    font-weight: bold;
    width: 300px;
  }
  
  
  .date-input input {
    padding: 10px;
    border: none;
    border-radius: 20px;
    background-color: white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 16px;
    flex-grow: 1;
  }
  
  .date-input button {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #4267B2;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
  }
  
  .date-input button:hover {
    background-color: #385898;
  }
  

.chat-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    background-color: #F0F2F5;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex-grow: 1;
    justify-content: flex-end; /* 새로운 코드 */
}

.chat-messages .message {
    max-width: 70%;
    padding: 10px;
    border-radius: 10px;
    background-color: white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    align-self: flex-start; /* 변경된 코드 */
}

.chat-messages .message.outgoing {
    align-self: flex-end;
    background-color: #DCF8C6;
}

.chat-messages .message .author {
    font-weight: bold;
    margin-bottom: 5px;
}


.chat-input {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.chat-input .message-input {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 20px;
    background-color: white;
    box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 16px;
}

.chat-input .send-button {
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #4267B2;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.chat-input .send-button:hover {
    background-color: #385898;
}



/* 로딩 스피너 스타일링 */
.spinner {
    border: 3px solid #f3f3f3; /* Light grey */
    border-top: 3px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
  }
  
  @keyframes spin {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }
  
  /* 로딩 중인 메시지 스타일링 */
  .message.loading .text {
    color: rgba(0, 0, 0, 0.5);
  }
  
  /* 로딩 중인 메시지 스타일링 */
  .message.loading .spinner {
    margin-right: 10px;
  }
  
  /* 로딩 중인 메시지 스타일링 */
  .message.loading .text::after {
    content: " .";
    animation: dots 1s steps(5, end) infinite;
  }
  
  .send-button:disabled {
    opacity: 0.6;
    background-color: #ccc;
    cursor: not-allowed;
  }

  @keyframes dots {
    0%,
    20% {
      color: rgba(0, 0, 0, 0.1);
      text-shadow: none;
    }
  
    50% {
      color: rgba(0, 0, 0, 0.5);
      text-shadow: 0px 0px 1px #000;
    }
  
    100% {
      color: rgba(0, 0, 0, 0.1);
      text-shadow: none;
    }
  }


  