/* 챗봇 스타일 */
.chatbot-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #4f46e5;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .chatbot-button:hover {
    background-color: #3c35b5;
    transform: scale(1.05);
  }
  
  .chatbot-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
  }
  
  .chatbot-container.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  
  .chatbot-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(to right, #4f46e5, #6366f1);
    color: white;
    border-radius: 16px 16px 0 0;
  }
  
  .chatbot-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
  }
  
  .chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .chatbot-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f9fafb;
  }
  
  .chat-bubble {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 18px;
    margin-bottom: 8px;
    position: relative;
    word-wrap: break-word;
  }
  
  .user-message {
    align-self: flex-end;
    background-color: #4f46e5;
    color: white;
    border-radius: 18px 18px 0 18px;
  }
  
  .bot-message {
    align-self: flex-start;
    background-color: #e2e8f0;
    color: #1e293b;
    border-radius: 18px 18px 18px 0;
  }
  
  .chatbot-input {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    background-color: white;
  }
  
  .chatbot-input input {
    flex-grow: 1;
    border: none;
    padding: 10px 15px;
    border-radius: 24px;
    background-color: #f3f4f6;
    margin-right: 10px;
    font-size: 14px;
  }
  
  .chatbot-input input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #4f46e5;
  }
  
  .chatbot-input button {
    background-color: #4f46e5;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
  }
  
  .chatbot-input button:hover {
    background-color: #3c35b5;
  }
  
  .typing-indicator {
    display: flex;
    padding: 12px 15px;
    background-color: #e2e8f0;
    border-radius: 18px 18px 18px 0;
    align-self: flex-start;
    width: fit-content;
  }
  
  .typing-indicator span {
    height: 8px;
    width: 8px;
    margin: 0 2px;
    background-color: #64748b;
    display: block;
    border-radius: 50%;
    opacity: 0.4;
  }
  
  .typing-indicator span:nth-of-type(1) {
    animation: pulse 1s infinite 0.1s;
  }
  
  .typing-indicator span:nth-of-type(2) {
    animation: pulse 1s infinite 0.2s;
  }
  
  .typing-indicator span:nth-of-type(3) {
    animation: pulse 1s infinite 0.3s;
  }
  
  @keyframes pulse {
    0% {
      opacity: 0.4;
      transform: scale(1);
    }
    50% {
      opacity: 1;
      transform: scale(1.2);
    }
    100% {
      opacity: 0.4;
      transform: scale(1);
    }
  }
  
  .message-time {
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.7;
    text-align: right;
  }
  
  /* 모바일 최적화 */
  @media (max-width: 640px) {
    .chatbot-container {
      width: calc(100% - 40px);
      height: 60vh;
      bottom: 90px;
    }
    
    .chatbot-button {
      bottom: 90px;
    }
  }

    /* 봇 메시지 헤더 스타일 */
    .bot-message-header {
        display: flex;
        justify-content: flex-end;
        position: absolute;
        top: 5px;
        right: 5px;
        opacity: 0;
        transition: opacity 0.2s ease;
    }

    .bot-message:hover .bot-message-header {
        opacity: 1;
    }

    /* 복사 버튼 스타일 */
    .copy-button {
        background: rgba(255, 255, 255, 0.8);
        border: none;
        border-radius: 4px;
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #4a5568;
        font-size: 12px;
        transition: all 0.2s ease;
    }

    .copy-button:hover {
        background: rgba(255, 255, 255, 1);
        color: #2b6cb0;
    }

    /* 봇 메시지 위치 조정 (헤더 공간 확보) */
    .bot-message {
        position: relative;
        padding-top: 25px;
    }

