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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* PC端：禁用滚动，不显示滚动条 */
@media (min-width: 769px) {
    html, body {
        height: 100vh;
        overflow: hidden;
    }
    
    #app {
        height: 100vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
    
    /* PC端首页模式：确保内容不超出视口 */
    body.home-mode #app {
        height: 100vh;
        overflow: hidden;
    }
}

/* 移动端：允许滚动，但隐藏滚动条 */
@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        display: none;
    }
}


#app{
   width:100%;
   min-height:100vh;
   display: flex;
   flex-direction: column;
}
/* Header */
.header {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e5e5;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0; /* 防止 header 被压缩 */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ghost-icon {
    width: 24px;
    height: 24px;
    background: #1890ff;
    border-radius: 4px;
    position: relative;
}

.ghost-icon::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    top: 4px;
    left: 6px;
}

.ghost-icon::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    bottom: 2px;
    left: 8px;
}

.header-title {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 18px;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    padding-bottom: 80px; /* 为固定的footer留出空间 */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-height: 0; /* 确保在flex容器中能正确滚动 */
}

.main-content::-webkit-scrollbar {
    display: none;
}

/* PC端：确保主内容区域在固定高度内可以滚动 */
@media (min-width: 769px) {
    .main-content {
        flex: 1;
        overflow-y: auto;
        min-height: 0;
        max-height: 100%;
        padding-bottom: 80px; /* 为固定的footer留出空间 */
    }
}

/* 移动端：调整底部padding，并确保从顶部开始显示 */
@media (max-width: 768px) {
    .main-content {
        padding-bottom: 80px; /* 为固定的footer留出空间 */
    }
    
    /* 确保移动端页面加载时从顶部开始 */
    body {
        scroll-behavior: auto;
    }
    
    /* 确保主内容区域从顶部开始 */
    .main-content {
        scroll-behavior: auto;
    }
}

.welcome-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.messages-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-item {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
}

.message-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 70%;
}

.message-username {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
    padding-right: 4px;
}

.message-bubble {
    background: #a8d8ff;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.bot-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 12px;
}

.bot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    flex-shrink: 0;
}

.bot-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 80%;
}

.bot-name {
    font-size: 12px;
    color: #999;
}

.bot-bubble {
    background: #f7f9fc;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e6ecf5;
}

.bot-question {
    font-size: 15px;
    color: #222;
    margin-bottom: 12px;
    line-height: 1.5;
}

.bot-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-option-btn {
    width: 100%;
    text-align: left;
    background: #f9fafb;
    border: 1px solid #e6ecf5;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.bot-option-btn:hover {
    border-color: #1890ff;
    background: #f0f7ff;
}

.bot-option-btn.selected {
    border-color: #1890ff;
    background: #e6f2ff;
    color: #1890ff;
    box-shadow: 0 2px 6px rgba(24,144,255,0.16);
}

.bot-option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.75;
}

.avatar-container {
    text-align: center;
    margin-bottom: 24px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


.avatar-title {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.chat-bubble {
    background: #f0f0f0;
    border-radius: 12px;
    padding: 20px;
    max-width: 90%;
    margin-bottom: 16px;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.chat-bubble .message-line {
    margin-bottom: 8px;
}

.chat-bubble .message-line:last-child {
    margin-bottom: 0;
}

.rose-icon {
    display: inline-block;
    margin-right: 6px;
    color: #ff4d4f;
}

.greeting-title {
    font-size: 16px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.greeting-intro {
    color: #666;
    margin-bottom: 16px;
    line-height: 1.8;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item {
    background: #fff;
    border-left: 3px solid #1890ff;
    border-radius: 6px;
    padding: 12px 14px;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.service-item:hover {
    box-shadow: 0 2px 6px rgba(24,144,255,0.15);
    transform: translateX(2px);
}

.service-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #1890ff;
    margin-bottom: 6px;
    font-size: 14px;
}

.service-label::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #1890ff;
    border-radius: 50%;
}

.service-content {
    color: #555;
    font-size: 13px;
    line-height: 1.6;
    margin-left: 12px;
}

.input-area {
    background: #fff;
    padding: 12px 16px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* 防止 footer 被压缩，确保固定在底部 */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    box-sizing: border-box;
}

/* 移动端：考虑安全区域（底部导航栏） */
@media (max-width: 768px) {
    .input-area {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }
}

.input-left-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 18px;
}

.input-field {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    outline: none;
    background: #f5f5f5;
}

.input-field:focus {
    border-color: #1890ff;
    background: #fff;
}

.input-right-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: all 0.2s;
}

.input-icon:hover {
    background: #e8e8e8;
    transform: scale(1.05);
}

.new-chat-btn {
    background: #f5f5f5;
    padding: 8px;
}

.new-chat-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

.new-chat-btn:hover {
    background: #e6f2ff;
}

.new-chat-btn:hover img {
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(195deg) brightness(98%) contrast(96%);
}

.send-btn {
    color: #fff;
}

.send-btn:hover {
  background: #e6f2ff;
}

.send-btn img {
    width: 20px;
    height: 20px;
    display: block;
}
.send-btn:hover img {
    filter: brightness(0) ssend-btnaturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(195deg) brightness(98%) contrast(96%);
}
@media (max-width: 480px) {
    .avatar {
        width: 70px;
        height: 70px;
    }

    .avatar::before {
        font-size: 40px;
    }

    .chat-bubble {
        font-size: 13px;
        padding: 16px;
    }

    .service-item {
        padding: 10px 12px;
    }

    .service-label {
        font-size: 13px;
    }

    .service-content {
        font-size: 12px;
    }

    .greeting-title {
        font-size: 15px;
    }

    .message-content {
        max-width: 80%;
    }

    .message-bubble {
        font-size: 13px;
        padding: 8px 12px;
    }

    .message-avatar {
        width: 28px;
        height: 28px;
    }

    .message-avatar::before {
        font-size: 16px;
    }
}

.dot-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: #f2f3f5; /* 类似你截图里的浅灰背景 */
}

.dot-loading span {
  width: 6px;
  height: 6px;
  margin: 0 3px;
  background-color: #8a8f99;
  border-radius: 50%;
  display: inline-block;
  animation: dotPulse 1.4s infinite ease-in-out both;
}

/* 让三个点错峰动起来 */
.dot-loading span:nth-child(1) {
  animation-delay: -0.32s;
}
.dot-loading span:nth-child(2) {
  animation-delay: -0.16s;
}
.dot-loading span:nth-child(3) {
  animation-delay: 0s;
}

@keyframes dotPulse {
  0% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  20% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
}
/* Markdown 容器基础 */
.markdown-body {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  word-break: break-word;
}

/* 段落 */
.markdown-body p {
  margin: 6px 0;
}

/* 标题（压缩尺寸，适合聊天） */
.markdown-body h1 {
  font-size: 18px;
  margin: 8px 0;
}
.markdown-body h2 {
  font-size: 16px;
  margin: 8px 0;
}
.markdown-body h3 {
  font-size: 15px;
  margin: 6px 0;
}

/* 列表 */
.markdown-body ul,
.markdown-body ol {
  padding-left: 20px;
  margin: 6px 0;
}

/* 引用 */
.markdown-body blockquote {
  border-left: 4px solid #1890ff;
  padding-left: 10px;
  color: #555;
  background: #f6f8fa;
  margin: 6px 0;
}

/* 行内代码 */
.markdown-body code {
  background: #f2f3f5;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 13px;
}

/* 代码块 */
.markdown-body pre {
  background: #1e1e1e;
  color: #f8f8f2;
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
}

/* 链接 */
.markdown-body a {
  color: #1890ff;
  text-decoration: none;
}
.markdown-body a:hover {
  text-decoration: underline;
}

/* ===== 输入节点气泡（图1） ===== */
.input-bubble {
  background: #f7f7f9;
  border-radius: 16px;
  padding: 16px 18px 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #eceff4;
  min-width: 260px;
}

.input-bubble .input-label {
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.input-bubble .input-field {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  padding: 8px 10px;
  font-size: 14px;
  outline: none;
  background: #fff;
  margin-bottom: 12px;
}

.input-bubble .input-field::placeholder {
  color: #bbb;
}

.input-bubble .input-field:focus {
  border-color: #5b5dff;
  box-shadow: 0 0 0 2px rgba(91, 93, 255, 0.16);
}

.input-bubble .input-submit-btn {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 500;
  background: #5b5dff;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.input-bubble .input-submit-btn:hover {
  background: #7375ff;
  box-shadow: 0 2px 8px rgba(91, 93, 255, 0.35);
}

/* ===== QA 节点气泡（图2） ===== */
.qa-bubble {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 18px 16px;
  border: 1px solid #e6ecf5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.qa-bubble .qa-text {
  font-size: 14px;
  color: #333;
  line-height: 1.6;
  margin-bottom: 12px;
}

.qa-bubble .qa-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qa-bubble .qa-option-btn {
  width: 100%;
  border-radius: 8px;
  border: none;
  padding: 8px 10px;
  font-size: 14px;
  text-align: left;
  background: #f7f7f9;
  color: #444;
  cursor: pointer;
  transition: all 0.2s;
}

.qa-bubble .qa-option-btn:hover {
  background: #eef3ff;
  color: #3b5bff;
}

/* ===== 登录/注册模态框样式 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1890ff 0%, #40a9ff 50%, #69c0ff 100%);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
  padding: 28px 32px 24px;
  text-align: center;
  position: relative;
}

.modal-title {
  font-size: 22px;
  font-weight: 600;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
  letter-spacing: 0.5px;
}

.modal-body {
  padding: 32px;
  background: #fff;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group:last-of-type {
  margin-bottom: 0;
}

.form-label {
  display: block;
  font-size: 14px;
  color: #555;
  margin-bottom: 10px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-label::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(24, 144, 255, 0.2);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  background: #fafbfc;
  color: #333;
  font-weight: 400;
}

.form-input::placeholder {
  color: #bbb;
  font-weight: 400;
}

.form-input:hover {
  border-color: #d0d7de;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-input:focus {
  border-color: #1890ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.1), 0 4px 16px rgba(24, 144, 255, 0.2);
  transform: translateY(-1px);
}

/* 反馈表单 textarea 样式 */
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
  min-height: 96px;
  max-height: 220px;
  outline: none;
  box-sizing: border-box;
  background: #fafbfc;
  color: #333;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-textarea::placeholder {
  color: #bbb;
}

.form-textarea:hover {
  border-color: #d0d7de;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-textarea:focus {
  border-color: #1890ff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 144, 255, 0.1), 0 4px 16px rgba(24, 144, 255, 0.2);
  transform: translateY(-1px);
}

.feedback-modal {
  max-width: 600px;
  width: 90%;
  display: flex;
  flex-direction: column;
}

.feedback-modal .modal-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.feedback-modal .modal-footer {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
}

/* 反馈表单响应式设计 */
@media (max-width: 768px) {
  .feedback-modal {
    max-width: 95%;
    width: 95%;
    max-height: 85vh;
  }
  
  .feedback-modal .modal-body {
    padding: 24px 20px;
  }
  
  .feedback-modal .modal-footer {
    padding: 20px;
    flex-direction: row;
  }
  
  .feedback-modal .modal-footer .btn {
    flex: 1;
  }
  
  .feedback-modal .modal-header {
    padding: 24px 20px 20px;
  }
  
  .feedback-modal .modal-title {
    font-size: 20px;
  }
  
  .feedback-modal .form-group {
    margin-bottom: 20px;
  }
  
  .feedback-modal .form-input,
  .feedback-modal .form-textarea {
    font-size: 16px; /* 防止 iOS 自动缩放 */
  }
}

@media (max-width: 480px) {
  .feedback-modal {
    max-width: 100%;
    width: 100%;
    border-radius: 0;
    max-height: 100vh;
  }
  
  .feedback-modal .modal-body {
    padding: 20px 16px;
  }
  
  .feedback-modal .modal-footer {
    padding: 16px;
    flex-direction: column;
  }
  
  .feedback-modal .modal-footer .btn {
    width: 100%;
  }
  
  .feedback-modal .form-textarea {
    min-height: 100px;
  }
}

.feedback-body .form-group {
  margin-bottom: 18px;
}

.form-helper {
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

/* 输入框图标 */
#phoneInput {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 46px;
}

#phoneInput:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231890ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E");
}

#passwordInput {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 46px;
}

#passwordInput:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231890ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}

.form-error {
  color: #ff4d4f;
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px;
  display: none;
  padding: 8px 12px;
  background: #fff1f0;
  border-radius: 8px;
  border-left: 3px solid #ff4d4f;
  animation: shake 0.3s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.form-error.show {
  display: block;
}

.modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 32px 20px;
  background: #fafbfc;
  border-top: 1px solid #e8ecf0;
  flex-shrink: 0;
  z-index: 1;
}

.modal-switch {
  text-align: center;
  padding: 0 32px 24px;
  background: #fafbfc;
  font-size: 14px;
  color: #666;
}

.modal-switch a {
  color: #1890ff;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-switch a:hover {
  color: #40a9ff;
  text-decoration: underline;
}

.btn {
  flex: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #40a9ff 0%, #69c0ff 100%);
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.4);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(24, 144, 255, 0.3);
}

.btn-primary:disabled {
  background: #d9d9d9;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-primary:disabled::before {
  display: none;
}

.btn-cancel {
  background: #fff;
  color: #666;
  border: 2px solid #e8ecf0;
}

.btn-cancel:hover {
  background: #f5f5f5;
  border-color: #d0d7de;
  color: #333;
  transform: translateY(-1px);
}

.btn-cancel:active {
  transform: translateY(0);
}

.login-icon-btn {
  font-size: 22px;
  color: #1890ff;
  transition: all 0.3s ease;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-icon-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.login-icon-btn img,
.export-icon-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.export-icon-btn {
  font-size: 22px;
  color: #1890ff;
  transition: all 0.3s ease;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

.export-icon-btn:hover {
  color: #fff;
  background: linear-gradient(135deg, #1890ff 0%, #40a9ff 100%);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.export-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.export-wrapper {
  position: relative;
  display: inline-flex;
}

.feedback-wrapper {
  position: relative;
  display: inline-flex;
  margin-left: 8px;
}

.feedback-icon-btn img {
  width: 20px;
  height: 20px;
}

.export-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 16px;
  min-width: 280px;
  z-index: 1000;
  display: none;
  border: 1px solid #e8ecf0;
}

.export-wrapper.active .export-dropdown {
  display: block;
}

.export-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8ecf0;
}

.export-mode-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.export-mode-btn {
  padding: 6px 16px;
  border: 1px solid #e8ecf0;
  border-radius: 6px;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.export-mode-btn:hover {
  border-color: #1890ff;
  color: #1890ff;
}

.export-mode-btn.active {
  background: #1890ff;
  color: #fff;
  border-color: #1890ff;
}

.export-period-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.export-period-btn {
  padding: 8px 12px;
  border: 1px solid #e8ecf0;
  border-radius: 6px;
  background: #fff;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 50px;
  text-align: center;
}

.export-period-btn:hover:not(.disabled) {
  border-color: #1890ff;
  color: #1890ff;
  background: #f0f7ff;
}

.export-period-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #f5f5f5;
}


/* Home Page Styles */
.home-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  overflow: visible;
}

/* PC端：首页容器固定高度，不允许滚动 */
@media (min-width: 769px) {
  .home-container {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }
}

/* 仅首页时，让 body 使用同款渐变背景，避免底部颜色不一致 */
.home-mode {
  background:
    radial-gradient(900px circle at 75% -20%, rgba(102,126,234,0.10) 0%, rgba(102,126,234,0.06) 35%, transparent 70%),
    radial-gradient(800px circle at -15% 85%, rgba(118,75,162,0.10) 0%, rgba(118,75,162,0.06) 40%, transparent 70%),
    linear-gradient(135deg, #eef2f7 0%, #dfe7f3 45%, #c3cfe2 100%);
  background-attachment: fixed;
}

.home-header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 1;
}

.home-icon-wrapper {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.home-container::before {
  content: '';
  position: absolute;
  top: -18%;
  right: -10%;
  width: 640px;
  height: 640px;
  background: radial-gradient(closest-side, rgba(102,126,234,0.18) 0%, rgba(64,169,255,0.16) 45%, transparent 70%);
  filter: blur(40px);
  transform: translate3d(0,0,0);
  animation: bgFloat 18s ease-in-out infinite;
}

.home-container::after {
  content: '';
  position: absolute;
  left: -12%;
  bottom: -14%;
  width: 760px;
  height: 760px;
  background: radial-gradient(closest-side, rgba(118,75,162,0.16) 0%, rgba(102,126,234,0.14) 48%, transparent 72%);
  filter: blur(44px);
  transform: translate3d(0,0,0);
  animation: bgFloat2 22s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% {
    transform: translate3d(0,0,0);
  }
  50% {
    transform: translate3d(-8px, -10px, 0);
  }
}

@keyframes bgFloat2 {
  0%, 100% {
    transform: translate3d(0,0,0);
  }
  50% {
    transform: translate3d(10px, 12px, 0);
  }
}

@media (max-width: 768px) {
  .home-container::before,
  .home-container::after {
    display: none;
  }
}

.home-icon-wrapper img {
  width: 60px;
  height: 60px;
  filter: brightness(0) invert(1);
}

.home-title {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.home-subtitle {
  font-size: 18px;
  color: #666;
  margin: 0;
  font-weight: 400;
}

.agent-select {
  max-width: 900px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.agent-card {
  background: #ffffff;
  border: 2px solid #e5e6eb;
  border-radius: 16px;
  padding: 32px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: flex-start;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.agent-card:hover {
  border-color: #667eea;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.15);
  transform: translateY(-4px);
}

.agent-card:hover::before {
  transform: scaleX(1);
}

.agent-card:hover .agent-card-arrow {
  transform: translateX(4px);
  color: #667eea;
}

.agent-card-icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: transform 0.3s ease;
}

.agent-card:hover .agent-card-icon {
  transform: scale(1.1) rotate(5deg);
}

.agent-card-content {
  flex: 1;
  text-align: left;
}

.agent-card h3 {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  transition: color 0.3s ease;
}

.agent-card:hover h3 {
  color: #667eea;
}

.agent-card-desc {
  font-size: 15px;
  color: #666;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.agent-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feature-tag {
  display: inline-block;
  padding: 6px 12px;
  background: #f0f2f5;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  transition: all 0.3s ease;
}

.agent-card:hover .feature-tag {
  background: #e6f0ff;
  color: #667eea;
}

.agent-card-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  transition: all 0.3s ease;
  border-radius: 50%;
  background: #f5f7fa;
}

.agent-card:hover .agent-card-arrow {
  background: #e6f0ff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .home-title {
    font-size: 28px;
  }
  
  .home-subtitle {
    font-size: 16px;
  }
  
  .agent-select {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .agent-card {
    padding: 24px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .agent-card-content {
    text-align: center;
  }
  
  .agent-card-features {
    justify-content: center;
  }
}

/* Toast 消息提示框样式 */
.toast-container {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 400px;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  border-left: 4px solid #1890ff;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(24, 144, 255, 0.1);
  color: #1890ff;
  line-height: 1;
}

.toast-text {
  flex: 1;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  word-break: break-word;
}

/* 不同类型的 toast 样式 */
.toast-info {
  border-left-color: #1890ff;
}

.toast-info .toast-icon {
  background: rgba(24, 144, 255, 0.1);
  color: #1890ff;
}

.toast-success {
  border-left-color: #52c41a;
}

.toast-success .toast-icon {
  background: rgba(82, 196, 26, 0.1);
  color: #52c41a;
}

.toast-warning {
  border-left-color: #faad14;
}

.toast-warning .toast-icon {
  background: rgba(250, 173, 20, 0.1);
  color: #faad14;
}

.toast-error {
  border-left-color: #ff4d4f;
}

.toast-error .toast-icon {
  background: rgba(255, 77, 79, 0.1);
  color: #ff4d4f;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .toast-container {
    top: 60px;
    left: 16px;
    right: 16px;
    transform: none;
    width: auto;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
    max-width: 100%;
  }
}
