/*
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/CascadeStyleSheet.css to edit this template
*/
/* 
    Created on : 2025年6月4日, 23:32:19
    Author     : Administrator
*/
/** {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }*/
 

 
    .demo-container {
         font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
         
      background: rgba(255, 255, 255, 0.1);
      padding: 20px;
      border-radius: 20px;
      backdrop-filter: blur(10px);
      text-align: center;
      color: white;
    }
 
    /* 聊天触发按钮 */
    .chat-trigger {
      position: fixed;
      bottom: 30px;
      right: 30px;
      width: 60px;
      height: 60px;
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      box-shadow: 0 8px 25px rgba(79, 172, 254, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
      z-index: 1000;
    }
 
    .chat-trigger:hover {
      transform: scale(1.1);
      box-shadow: 0 12px 35px rgba(79, 172, 254, 0.6);
    }
 
    .chat-trigger svg {
      width: 24px;
      height: 24px;
      fill: white;
      transition: transform 0.3s ease;
    }
 
    .chat-trigger.active svg {
      transform: rotate(45deg);
    }
 
    /* 聊天窗口 */
    .chat-window {
      position: fixed;
      bottom: 100px;
      right: 30px;
      width: 350px;
      height: 500px;
      background: white;
      border-radius: 20px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
      transform: translateY(100%) scale(0.8);
      opacity: 0;
      transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
      z-index: 999;
      overflow: hidden;
    }
 
    .chat-window.active {
      transform: translateY(0) scale(1);
      opacity: 1;
    }
 
    /* 聊天头部 */
    .chat-header {
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      color: white;
      padding: 20px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
 
    .avatar {
      width: 40px;
      height: 40px;
      background: rgba(255, 255, 255, 0.2);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
    }
 
    .chat-info h3 {
      font-size: 16px;
      font-weight: 600;
      margin-bottom: 4px;
    }
 
    .chat-info p {
      font-size: 12px;
      opacity: 0.8;
    }
 
    .status-dot {
      width: 8px;
      height: 8px;
      background: #4ade80;
      border-radius: 50%;
      margin-left: auto;
      animation: pulse 2s infinite;
    }
 
    @keyframes pulse {
 
      0%,
      100% {
        opacity: 1;
      }
 
      50% {
        opacity: 0.5;
      }
    }
 
    /* 消息区域 */
    .chat-messages {
      height: 320px;
      overflow-y: auto;
      padding: 20px;
      background: #f8fafc;
      scroll-behavior: smooth;
    }
 
    .message {
      margin-bottom: 16px;
      display: flex;
      align-items: flex-end;
      gap: 8px;
      animation: messageSlideIn 0.3s ease;
    }
 
    @keyframes messageSlideIn {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
 
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
 
    .message.user {
      flex-direction: row-reverse;
    }
 
    .message-bubble {
      max-width: 80%;
      padding: 12px 16px;
      border-radius: 18px;
      font-size: 14px;
      line-height: 1.4;
      word-wrap: break-word;
    }
 
    .message.bot .message-bubble {
      background: white;
      color: #334155;
      border: 1px solid #e2e8f0;
      border-bottom-left-radius: 6px;
    }
 
    .message.user .message-bubble {
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      color: white;
      border-bottom-right-radius: 6px;
    }
 
    .message-avatar {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 12px;
      font-weight: 600;
      flex-shrink: 0;
    }
 
    .message.user .message-avatar {
      background: #64748b;
    }
 
    .timestamp {
      font-size: 11px;
      color: #94a3b8;
      margin-top: 4px;
      text-align: center;
    }
 
    /* 正在输入指示器 */
    .typing-indicator {
      display: none;
      padding: 12px 16px;
      margin-bottom: 16px;
    }
 
    .typing-indicator.active {
      display: flex;
      align-items: center;
      gap: 8px;
    }
 
    .typing-dots {
      display: flex;
      gap: 4px;
    }
 
    .typing-dot {
      width: 6px;
      height: 6px;
      background: #94a3b8;
      border-radius: 50%;
      animation: typingBounce 1.4s infinite ease-in-out;
    }
 
    .typing-dot:nth-child(1) {
      animation-delay: -0.32s;
    }
 
    .typing-dot:nth-child(2) {
      animation-delay: -0.16s;
    }
 
    @keyframes typingBounce {
 
      0%,
      80%,
      100% {
        transform: scale(0.8);
        opacity: 0.5;
      }
 
      40% {
        transform: scale(1);
        opacity: 1;
      }
    }
 
    /* 输入区域 */
    .chat-input {
      padding: 20px;
      background: white;
      border-top: 1px solid #e2e8f0;
    }
 
    .input-container {
      display: flex;
      gap: 12px;
      align-items: center;
    }
 
    .input-field {
      flex: 1;
      padding: 12px 16px;
      border: 2px solid #e2e8f0;
      border-radius: 24px;
      font-size: 14px;
      outline: none;
      transition: all 0.3s ease;
      background: #f8fafc;
    }
 
    .input-field:focus {
      border-color: #4facfe;
      background: white;
      box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.1);
    }
 
    .send-btn {
      width: 40px;
      height: 40px;
      background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s ease;
    }
 
    .send-btn:hover {
      transform: scale(1.1);
      box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
    }
 
    .send-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
      transform: none;
    }
 
    .send-btn svg {
      width: 16px;
      height: 16px;
      fill: white;
    }
 
    /* 快捷回复 */
    .quick-replies {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
      flex-wrap: wrap;
    }
 
    .quick-reply {
      padding: 6px 12px;
      background: white;
      border: 1px solid #e2e8f0;
      border-radius: 16px;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.3s ease;
      color: #64748b;
    }
 
    .quick-reply:hover {
      background: #4facfe;
      color: white;
      border-color: #4facfe;
      transform: translateY(-1px);
    }
 
    /* 响应式设计 */
    @media (max-width: 480px) {
      .chat-window {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 80px;
      }
 
      .chat-trigger {
        right: 20px;
        bottom: 20px;
      }
    }
 
    /* 滚动条样式 */
    .chat-messages::-webkit-scrollbar {
      width: 4px;
    }
 
    .chat-messages::-webkit-scrollbar-track {
      background: transparent;
    }
 
    .chat-messages::-webkit-scrollbar-thumb {
      background: #cbd5e1;
      border-radius: 2px;
    }
 
    .chat-messages::-webkit-scrollbar-thumb:hover {
      background: #94a3b8;
    }
