:root {
  /* 品牌主色调 - 基于Logo提取 */
  --primary-blue: #2563eb;
  --primary-purple: #7c3aed;
  --accent-orange: #f59e0b;
  --accent-pink: #ec4899;
  
  /* 中性色调 */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* 功能色 */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  /* 渐变背景 */
  --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-pink) 100%);
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
  font-family: var(--font-family);
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: var(--gradient-primary);
  overflow: auto;
}

.certificate-option {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.certificate-option .input-label {
    margin-right: 10px;
}

.certificate-option .input-checkbox {
    margin-right: 10px;
}

.certificate-option .input-text {
    color: #3d3f40ba;
}

.hidden {
    display: none;
}

/* 调整快速问题按钮的样式 */
.quick-questions {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 左对齐 */
    margin: -5px 0; /* 调整与上下元素的间距 */
    padding-left: 45px; /* 与消息气泡的左边距对齐 */
}

.quick-question-btn {
    background-color: #ffffff70;
    border: none;
    padding: 8px 12px;
    margin: 3px 0;
    border-radius: 16px; /* 与消息气泡相似的圆角 */
    cursor: pointer;
    font-size: 14px; /* 字体稍微小一点 */
    color: #3d3f40ba; /* 设置文字颜色 */
    display: flex;
    align-items: center;
    text-align: left;
}

.quick-question-btn:hover {
    background-color: #eaeaea;
}

.quick-question-btn .arrow-icon {
    margin-left: 5px;
    width: 12px;
    height: 12px;
}



@media (max-width: 768px) {
    .bracelet-bead {
        width: 1.5cm;
        height: 1.5cm;
    }
}

.chat-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 100%;
    max-width: 900px;
    height: 100vh;
    margin: 0 auto;
    background: transparent;
    padding: 0;
    padding-bottom: 180px; /* 为输入区域和底部导航留出空间 */
}
@media (max-width: 768px) {
  .chat-container {
    width: 100vw;
    max-width: none;
    padding: 0;
  }
}

/* Logo styling */
.logo {
  display: block;
  width: 200px;
  max-width: 100%;
  height: auto;
}

@media only screen and (max-width: 600px) {
  .logo {
    width: 120px;
  }
}

/* Header styling */
.chat-header {
  text-align: center;
  padding: 20px 24px;
  width: 100%;
  box-sizing: border-box;
}

.chat-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 登录后Header设计 */
.logged-in .chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  height: 72px;
  box-sizing: border-box;
}

/* 登录后Logo样式 */
.logged-in .logo {
  margin: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 8px;
  object-fit: contain;
}

/* Header左侧容器 */
.logged-in .header-left {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 12px;
}

/* Header右侧容器 */
.logged-in .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}


/* 登录后标题样式 */
.logged-in .chat-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  padding: 0;
  margin: 0;
}

/* 清空聊天按钮样式 */
.clear-chat-button {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  height: 40px;
}

.clear-chat-button:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
  color: var(--gray-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.clear-chat-button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* 在未登录状态下隐藏清空按钮 */
body:not(.logged-in) .clear-chat-button {
  display: none !important;
}

/* 确保登录后按钮可见 */
body.logged-in .clear-chat-button {
  display: flex !important;
}

/* 登录后调整 chat-container 的位置，避免被固定 header 遮挡 */
.logged-in .chat-container {
  padding-top: 72px;
}

/* 确保 body 无内边距 */
body.logged-in {
  padding: 0;
  margin: 0;
}
/* Chat window styling */
.chat-window {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  margin: 16px;
  padding: 24px;
  width: calc(100% - 32px);
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 200px;
}

/* Input area styling */
.input-area {
  display: flex;
  padding: 16px 24px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
  flex-shrink: 0;
  position: fixed;
  bottom: 76px; /* 在底部导航栏之上 */
  left: 50%;
  transform: translateX(-50%);
  z-index: 999; /* 高于底部导航栏 */
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.3);
  gap: 12px;
}


.input-box {
  flex: 1;
  margin: 0;
  padding: 12px 16px;
  box-sizing: border-box;
  resize: none;
  overflow: hidden;
  min-height: 48px;
  font-size: 16px;
  line-height: 1.5;
  border: 1px solid var(--gray-300);
  border-radius: 16px;
  background: white;
  transition: all 0.2s ease;
}

.input-box:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.send-button {
  background: var(--gradient-primary);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 16px;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  white-space: nowrap;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  min-width: 80px;
}

.send-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.send-button:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Chat message styles */
/* 添加消息框间隔 */
.user-message, .ai-message {
  display: flex;
  align-items: flex-start;
  margin-bottom: 15px; /* 增加间隔 */
}

.user-message {
  justify-content: flex-end;
}

.ai-message {
  justify-content: flex-start;
}

.chat-link {
  display: inline-block;
  color: #0366d6;
  text-decoration: none;
  word-break: break-all;
}

.chat-link:hover {
  text-decoration: underline;
}

.message-bubble a {
  margin-right: 4px;
}

/* 消息气泡样式 */
.message-bubble {
  max-width: 80%;
  padding: 16px 20px;
  border-radius: 20px;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
  position: relative;
  animation: fadeIn 0.3s ease-in-out;
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.user-bubble {
  background: var(--gradient-primary);
  color: white;
  text-align: left;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}

.ai-bubble {
  background: white;
  color: var(--gray-800);
  text-align: left;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--gray-200);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  margin: 0 8px;
  /*border: 2px solid #f88d64;*/ /* 主色边框 
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(37, 99, 235, 0.1);
  backdrop-filter: blur(10px);
  justify-content: flex-end;
  align-items: flex-start;
  padding: 80px 60px 40px 40px;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 24px;
    width: 400px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    animation: slideDown 0.3s ease-out;
}

@media (max-width: 768px) {
  .modal {
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
  }
}

.pay-button {
    width: 100%; /* 按钮宽度占满父容器 */
    background-color: #e47b3d; /* 辅助色背景 */
    color: white;
    padding: 12px 20px; /* 增加内边距 */
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
    font-size: 1rem; /* 增大字体 */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

.pay-button:hover {
    background-color: #a0a25c; /* 深色辅助色 */
    transform: scale(1.05);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-title {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
    font-weight: 600;
}

.input-group {
  margin-bottom: 10px; /* 增加间隔 */
  text-align: left;
}

.inline-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px; /* 调整间距 */
}
/* 输入标签样式 */
.input-label {
  font-size: 1rem;
  color: #333;
  white-space: nowrap;
}
.input-text {
  font-size: 1rem;
  color: #333;
  margin-left: 10px;
}


#recipientAddress {
  height: 4em;
  resize: vertical;
  text-align: left;
  padding: 10px;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-break: break-all;
  line-height: 1.5; /* 保持合理的行高 */
  display: block;
  /* 确保文本垂直对齐到顶部 */
  vertical-align: top; 
}

.tip-text {
  font-size: 0.7rem; /* 减小字体大小 */
  color: #999; /* 设置为灰色 */
  margin-top: 10px;
  line-height: 1.5;
  text-align: left;
}

/* 标记文本为红色 */
.highlight-red {
  color: red;
  font-weight: bold; /* 可选，增强效果 */
}

.input-box {
  width: 100%;
  padding: 12px; /* 增加内边距 */
  border: 1px solid #b0bfc3;
  border-radius: 16px; /* 增加圆角 */
  outline: none;
  transition: border-color 0.3s;
  font-size: 1rem; /* 增大字体 */
  background-color: #fafafa; /* 增加背景色 */
  /*padding-bottom: 60px;*/
}

.input-box:focus {
  border-color: #f88d64; /* 聚焦时主色边框 */
  box-shadow: 0 0 5px rgba(248, 141, 100, 0.5); /* 聚焦时添加阴影 */
}



/* 发送验证码按钮样式 */
.get-code-button {
  padding: 12px 20px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
}

.get-code-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.login-button {
  padding: 14px 24px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 16px;
  border: none;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  white-space: nowrap;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  margin-top: 16px;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.close-button {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #f88d64; /* 主色 */
  transition: color 0.3s;
}

.close-button:hover {
  color: #e57a4a; /* 深色主色 */
}

.open-modal-button {
  padding: 12px 24px; /* 增加内边距 */
  background-color: #b8ba71; /* 辅助色背景 */
  color: white;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-weight: bold;
  font-size: 1rem; /* 增大字体 */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

.open-modal-button:hover {
  background-color: #a0a25c; /* 深色辅助色 */
  transform: scale(1.05);
}


.language-json {
    display: none;
}

/* 我的订单页面样式 */

/* 订单容器 */
.orders-container {
    padding: 20px;
    margin-top: 80px; /* 确保内容不被固定的头部遮挡 */
    /*background-color: rgba(255, 255, 255, 0.8);  半透明白色背景 */
    background-color: #fff8f0;
    background-image: url(/background.jpg);
    border-radius: 24px;
    /*overflow-y: auto;*/
    flex: 1; /* 使容器填满剩余空间 */
}

/* 订单项 */
.order-item {
    background-color: #ffffffc2; /* 与聊天窗口的背景色一致 */
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.order-item h2 {
    font-size: 1.2rem;
    color: #009688; /* 主色字体 */
    margin-bottom: 10px;
}

.order-item p {
    font-size: 1rem;
    color: #3d3f40ba;
    margin-bottom: 6px;
}

.course-card {
    width: 100%;
    /* 其他样式 */
}

.course-card .course-image {
    width: 100%;
    height: auto;
}

.course-card .course-title,
.course-card .course-recommendation,
.course-card .enroll-button {
    width: 100%;
    /* 确保其他元素也占满父容器 */
}

/* 切换按钮样式 */
.toggle-button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-right: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-button .icon {
  width: 24px; /* 根据需要调整图标大小 */
  height: 24px;
}

/* 按住说话按钮样式 */
.speak-button {
  background: var(--gradient-primary);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 600;
  flex-grow: 1;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
  font-size: 1rem;
}

.speak-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.speak-button.active {
  display: block;
  background: var(--gradient-accent);
}

.input-area .hidden {
  display: none;
}

/* 防止文字被选中 */
#holdToSpeak {
  -webkit-user-select: none; /* Safari */
  -ms-user-select: none;     /* IE 10+ */
  user-select: none;         /* 标准语法 */
}

/* 按下时的效果 */
#holdToSpeak.active {
  background: var(--gradient-accent) !important;
  transform: translateY(0) !important;
  box-shadow: var(--shadow-sm) !important;
}

.footer-text {
  text-align: center;      /* 居中显示 */
  font-size: 12px;         /* 字体大小 */
  color: #999;             /* 字体颜色为灰色 */
  margin-top: 10px;        /* 与上方内容的间距 */
}

/* 在移动端隐藏备案号 */
@media screen and (max-width: 768px) {
  .footer-text {
    display: none; /* 隐藏元素 */
  }
}

.input-area button,
.input-area .input-box {
    font-size: 16px;
}


header {
    background: white;
    
}

/* 底部导航栏样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 998; /* 低于输入区域 */
}

/* 导航菜单列表样式 */
.bottom-nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    width: 100%;
    justify-content: space-around;
}

/* 导航菜单项样式 */
.bottom-nav li {
    flex: 1;
    text-align: center;
}

/* 导航链接样式 */
.bottom-nav a {
    display: block;
    padding: 15px 0;
    color: #333;
    text-decoration: none;
    font-size: 16px;
}

/* 导航链接的悬停和激活状态 */
.bottom-nav a:hover,
.bottom-nav a.active {
    color: var(--primary-blue);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
  .input-area {
    margin: 0 16px;
    width: calc(100% - 32px);
    left: 0;
    transform: none;
    bottom: 76px; /* 在底部导航栏之上 */
    padding: 12px 16px;
  }
  
  .chat-window {
    margin: 8px;
    width: calc(100% - 16px);
    padding: 16px;
    padding-bottom: 180px; /* 移动端需要更多底部空间 */
  }
  
  .chat-container {
    padding-bottom: 200px; /* 移动端增加更多底部空间 */
  }
  
  .message-bubble {
    max-width: 90%;
  }
  
  .logged-in .chat-header {
    padding: 12px 16px;
    height: 64px;
  }
  
  .logged-in .chat-container {
    padding-top: 64px;
  }
  
  .send-button {
    padding: 12px 16px;
    min-width: 60px;
    font-size: 0.9rem;
  }
  
  .clear-chat-button {
    padding: 6px 12px;
    font-size: 0.8rem;
    height: 36px;
  }
}

