/* 页面加载动画样式 */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: -webkit-fill-available;
  background: linear-gradient(135deg, #202123 0%, #343541 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  visibility: visible;
  padding: 20px;
  box-sizing: border-box;
  margin: 0;
  border: 0;
}

/* 确保html和body不影响fixed定位 */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* 移动端加载动画样式优化 */
@media (max-width: 768px) {
  .page-loader {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }
  
  .loader-content {
    max-width: 100%;
    padding: 20px;
    margin: 0 auto;
    text-align: center;
  }
  
  .new-loader {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
  }
  
  .loader-title {
    font-size: 24px;
  }
  
  .loader-subtitle {
    font-size: 14px;
  }
}

.page-loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  padding: 40px;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* 新的加载动画样式 - 圆点跳动 */
.new-loader {
  width: 100px;
  height: 100px;
  margin: 0 auto 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.loader-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #10a37f;
  animation: dotBounce 1.4s infinite ease-in-out both;
}

.loader-dot:nth-child(1) {
  animation-delay: -0.32s;
  background-color: #10a37f;
}

.loader-dot:nth-child(2) {
  animation-delay: -0.16s;
  background-color: #3b82f6;
}

.loader-dot:nth-child(3) {
  background-color: #f59e0b;
}

@keyframes dotBounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

.loader-title {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.loader-subtitle {
  font-size: 16px;
  color: #a0aec0;
  margin: 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.6s forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 全局样式重置 */

/* 输入框带清除按钮的样式 */
.input-with-clear,
.input-with-toggle {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-with-clear input,
.input-with-toggle input {
  width: 100%;
  padding-right: 36px; /* 为按钮留出空间 */
}

/* 清除按钮样式 */
.clear-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: #888;
  cursor: pointer;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.clear-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

.clear-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* 密码显示/隐藏切换按钮样式 - 简约无背景 */
.toggle-password-btn,
.toggle-password {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent !important;
  border: none !important;
  font-size: 14px !important;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  opacity: 0.6;
  color: #888;
  z-index: 1;
}

.toggle-password-btn:hover,
.toggle-password:hover {
  opacity: 1;
  background: transparent !important;
}

.toggle-password-btn:focus,
.toggle-password:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* 注册表单中的密码按钮定位调整 */
.toggle-password {
  margin-left: -28px;
  margin-right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
    "Ubuntu", "Cantarell", "Open Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  color: #e0e0e0;
  background-color: #343541;
  overflow: hidden;
}

/* 主应用容器 */
.app-container {
  display: flex;
  height: 100vh;
  position: relative;
}

/* 侧边栏样式 */
.sidebar {
  width: 260px;
  background-color: #202123;
  border-right: 1px solid #3e3e42;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 10;
}

/* 个人信息区域样式 */
.user-profile-section {
  padding: 20px 16px;
  border-bottom: 1px solid #3e3e42;
  background: linear-gradient(135deg, #2a2b2e 0%, #202123 100%);
}

.user-avatar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.user-avatar-container:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #10a37f;
  box-shadow: 0 4px 12px rgba(16, 163, 127, 0.3);
  background-color: #343541;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info-text {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-bio {
  font-size: 12px;
  color: #a0aec0;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-header {
  padding: 16px;
  border-bottom: 1px solid #3e3e42;
}

.new-chat-btn {
  width: 100%;
  padding: 10px 16px;
  background-color: transparent;
  border: 1px solid #5a5a5a;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.new-chat-btn:hover {
  background-color: #2a2b2e;
  border-color: #6e6e6e;
}

/* 聊天历史列表 */
.chat-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-history-list::-webkit-scrollbar {
  width: 4px;
}

.chat-history-list::-webkit-scrollbar-track {
  background: #202123;
}

.chat-history-list::-webkit-scrollbar-thumb {
  background: #4b4b4b;
  border-radius: 2px;
}

.chat-history-item {
  padding: 12px;
  margin-bottom: 6px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.4;
  color: #d1d5db;
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  white-space: normal;
  min-height: 52px;
}

.chat-history-item:hover {
  background-color: #2a2b2e;
}

.chat-history-item.active {
  background-color: #2a2b2e;
  border-left: 3px solid #10a37f;
}

.chat-history-item .chat-icon {
  font-size: 12px;
  margin-top: 3px;
  align-self: flex-start;
  line-height: 1.4;
  vertical-align: top;
}

.session-content {
  flex: 1;
  display: flex;
  min-width: 0;
  align-items: flex-start;
}

.chat-history-item .chat-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
  margin: 0;
  margin-bottom: 0;
}

.chat-history-item .chat-time {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  display: inline-block;
  margin: 0 0 0 8px;
  align-self: flex-start;
  padding-top: 0;
}

.delete-chat-btn {
  display: none;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 12px;
  transition: all 0.2s ease;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.chat-history-item:focus-within .delete-chat-btn,
.chat-history-item:hover .delete-chat-btn {
  display: flex;
}

/* 移动端长按状态样式 */
.chat-history-item.long-press {
  background-color: #3a3b3f;
  transform: scale(0.98);
  transition: all 0.2s ease;
}

.chat-history-item.long-press .delete-chat-btn {
  display: flex !important;
}

/* 移动端触摸优化 */
@media (max-width: 768px) {
  .chat-history-item {
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1); /* 显示触摸反馈 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    min-height: 44px; /* 苹果推荐的最小触摸目标尺寸 */
    display: flex;
    align-items: center;
    touch-action: manipulation; /* 优化触摸响应 */
  }

  .chat-history-item:active {
    background-color: #3a3b3f;
    transform: scale(0.98);
    transition: all 0.1s ease;
  }
}

.delete-chat-btn:hover {
  color: #ef4444;
  background-color: rgba(239, 68, 68, 0.1);
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
  font-size: 14px;
}

/* 侧边栏底部 */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #3e3e42;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.user-info:hover {
  background-color: #2a2b2e;
}

.settings-btn {
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.settings-btn:hover {
  background-color: #2a2b2e;
}

/* 主聊天区域 */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #343541;
  position: relative;
}

/* 欢迎页面 */
.welcome-screen {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.welcome-content {
  margin-top: 40px;
  max-width: 600px;
  text-align: center;
}

.logo {
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
  border-radius: 20px;
}

.welcome-content h1 {
  font-size: 32px;
  margin-bottom: 24px;
  color: #ffffff;
  text-align: center;
}

/* 欢迎页面功能列表样式 */
.welcome-features {
  margin-bottom: 32px;
  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-title {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 16px;
  font-weight: 600;
  text-align: left;
  padding-bottom: 8px;
  border-bottom: 2px solid #10a37f;
  display: inline-block;
}

.features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.feature-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-left-color: #10a37f;
  transform: translateX(5px);
}

.feature-icon {
  font-size: 18px;
  color: #10a37f;
  margin-top: 2px;
  flex-shrink: 0;
}

.feature-item span {
  font-size: 16px;
  color: #a0aec0;
  line-height: 1.6;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
  .welcome-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .welcome-features {
    padding: 0 16px;
  }
  
  .features-title {
    font-size: 18px;
  }
  
  .feature-item {
    padding: 10px 14px;
  }
  
  .feature-item span {
    font-size: 14px;
  }
  
  .feature-icon {
    font-size: 16px;
  }
}

.start-chat-btn {
  padding: 12px 24px;
  background-color: #10a37f;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  /* 屏蔽开始对话按钮 */
  display: none;
}

.start-chat-btn:hover {
  background-color: #0e8d6f;
}

/* 隐藏欢迎按钮容器 */
.welcome-buttons {
  display: none;
}

/* 聊天消息区域 */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #343541;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #4b4b4b;
  border-radius: 4px;
}

.chat-message {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background-color: #444654;
  align-self: flex-start;
  max-width: 75%;
  margin-left: 0;
  margin-right: auto;
}

.chat-message.assistant {
  border-bottom-left-radius: 4px;
  position: relative;
}

.chat-message.user {
  background-color: #3b82f6;
  flex-direction: row-reverse;
  align-self: flex-end;
  text-align: left;
  margin-left: auto;
  margin-right: 0;
  border-bottom-right-radius: 4px;
}

/* 消息操作按钮样式 */
.message-actions {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.action-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: none;
  background-color: #6b7280;
  color: #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background-color: #4b5563;
  color: #f3f4f6;
  transform: scale(1.1);
}

.action-btn:active {
  transform: scale(0.95);
}

/* 按钮通用样式 */
.action-btn {
  background: none;
  border: none;
  color: #8e8e93;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin: 0; /* 重置margin */
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

/* 按钮间距重置 - 确保统一 */
.copy-btn,
.regenerate-btn {
  margin: 0; /* 重置所有margin */
}

/* 为语音播放按钮添加右边距，保持与文字内容右边距一致 */
.play-voice-btn {
  margin: 0;
  margin-right: 24px;
}

/* PC端按钮容器样式 - 确保不与内容重叠 */
.chat-message.assistant {
  position: relative;
  padding-bottom: 50px;
}

.chat-message.assistant .message-actions {
  position: absolute;
  bottom: 16px;
  right: 0;
  display: flex;
  gap: 8px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* 重新生成按钮样式 */
.regenerate-btn {
  background: none;
  border: none;
  color: #8e8e93;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin: 0; /* 重置margin */
}

.regenerate-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

/* Toast动画 */
@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background-color: #10a37f;
}

.user .avatar {
  background-color: #5865f2;
}

.message-content {
  flex: 1;
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
}

.message-content p {
  margin-bottom: 8px;
}

.message-content p:last-child {
  margin-bottom: 0;
}

/* Markdown 渲染样式 */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
  margin: 16px 0 8px 0;
  font-weight: 600;
  line-height: 1.3;
}

.message-content h1 {
  font-size: 1.5em;
  border-bottom: 1px solid #4b4b4b;
  padding-bottom: 4px;
}

.message-content h2 {
  font-size: 1.3em;
}

.message-content h3 {
  font-size: 1.1em;
}

.message-content ul,
.message-content ol {
  margin: 8px 0;
  padding-left: 24px;
}

.message-content li {
  margin: 4px 0;
}

.message-content strong {
  font-weight: 600;
  color: #ffffff;
}

.message-content em {
  font-style: italic;
}

.message-content code {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.9em;
}

.message-content pre {
  background-color: #1e1e1e;
  padding: 16px;
  border-radius: 6px;
  margin: 16px 0;
  overflow-x: auto;
  white-space: pre-wrap;
}

.message-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
}

/* 思考中提示样式 */
.thinking-text {
  color: #a0aec0 !important;
  font-style: italic !important;
  animation: thinkingPulse 2s infinite ease-in-out;
}

@keyframes thinkingPulse {
  0%,
  100% {
    opacity: 0.7;
  }
  50% {
    opacity: 1;
  }
}

/* 输入区域 */
.input-container {
  padding: 20px;
  background-color: #343541;
  border-top: 1px solid #3e3e42;
}

/* 备案信息样式 */
.icp-record-container {

  margin-top: 10px;
  text-align: center;

  font-size: 14px;
  color: #666;
  font-family: Arial, sans-serif;
}

.icp-record {
  color: #666;
  text-decoration: none;
  font-weight: normal;
  transition: color 0.3s ease;
}

.icp-record:hover {
  color: #10a37f;
}

/* 移动端备案信息样式保持一致 */
@media (max-width: 768px) {
  .icp-record-container {
    margin-top: 8px;
    font-size: 12px;
    padding-bottom: 5px;
  }
}

.chat-form {
    position: relative;
    background-color: #40414f;
    border-radius: 12px;
    border: 1px solid #4e4e52;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.user-input {
  flex: 1;
  width: 100%;
  padding: 12px 16px 16px 0;
  background-color: transparent;
  border: none;
  outline: none;
  color: #e0e0e0;
  font-size: 16px;
  line-height: 1.6;
  resize: none;
  min-height: 44px;
  max-height: 200px;
  font-family: inherit;
}

.user-input::placeholder {
  color: #8e8e93;
}

.input-actions {
  display: flex;
  align-items: center;
  padding: 0;
  width: auto;
  min-width: 44px; /* 确保按钮容器有足够空间 */
}

/* 文件上传按钮占位符，用于将发送按钮推到右侧 */
.input-actions-placeholder {
  flex: 1;
}

/* 发送按钮保持在右侧 */
.send-btn {
  margin-left: auto;
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #10a37f;
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  margin-left: auto;
}

.send-btn.stop-btn {
  background-color: #ef4444;
}

.send-btn:hover:not(:disabled) {
  background-color: #0e8d6f;
  transform: scale(1.05);
}

.send-btn.stop-btn:hover:not(:disabled) {
  background-color: #dc2626;
}

.send-btn:disabled {
  background-color: #4b4b4b;
  cursor: not-allowed;
}

/* 文件上传按钮样式 */
.upload-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: transparent;
  color: #e0e0e0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
}

.upload-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: scale(1.05);
}

.upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 文件上传列表样式 */
.file-upload-list {
  margin-bottom: 10px;
  max-height: 150px;
  overflow-y: auto;
  padding: 8px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  display: none;
}

.file-upload-list.has-files {
  display: block;
}

.file-upload-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 14px;
}

.file-upload-item:last-child {
  margin-bottom: 0;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
}

.file-icon {
  font-size: 18px;
  color: #10a37f;
}

.file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.file-size {
  font-size: 12px;
  color: #8e8e93;
  margin-left: 8px;
}

.remove-file-btn {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.remove-file-btn:hover {
  background-color: rgba(239, 68, 68, 0.1);
  transform: scale(1.1);
}

/* 文件上传提示样式 */
.file-upload-tip {
  font-size: 12px;
  color: #8e8e93;
  text-align: center;
  margin-top: 8px;
  padding: 0 12px;
}

/* 文件上传列表滚动条样式 */
.file-upload-list::-webkit-scrollbar {
  width: 4px;
}

.file-upload-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.file-upload-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}

.file-upload-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.input-hint {
  text-align: center;
  font-size: 12px;
  color: #8e8e93;
  margin-top: 8px;
}

/* 备案号链接样式，去除蓝色和下划线 */
.input-hint a {
  color: #8e8e93;
  text-decoration: none;
  cursor: pointer;
}

/* 移动端侧边栏开关 */
.sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #10a37f;
  color: white;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 认证模态框样式 */
/* 登录选项卡样式 */
.login-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid #333;
}

.login-tab {
  flex: 1;
  padding: 10px 15px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.login-tab.active {
  color: #3b82f6;
  border-bottom: 2px solid #3b82f6;
}

.login-tab:hover:not(.active) {
  color: #ccc;
}

/* 带按钮的输入框样式 */
.input-with-button {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-with-button input {
  flex: 1;
  padding-right: 100px; /* 为按钮留出空间 */
}

/* 获取验证码按钮样式 */
.send-code-btn {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  padding: 0 12px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.3s ease;
}

/* 短信登录页面的获取验证码按钮绿色背景 */
#send-code-btn {
  background-color: #389e8a;
}

.send-code-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

/* 短信登录页面按钮的绿色悬停样式 */
#send-code-btn:hover:not(:disabled) {
  background-color: #2d8c78;
}

.send-code-btn:disabled {
  background-color: #6b7280;
  cursor: not-allowed;
}

/* 注册页面的获取验证码按钮浅绿色背景 */
.register-send-code-btn {
  background-color: #389e8a;
}

.register-send-code-btn:hover:not(:disabled) {
  background-color: #2d8c78;
}

/* 认证模态框样式 */
.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.auth-modal.show {
  display: flex;
}

.auth-modal-content {
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 90%;
  max-width: 400px;
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-auth-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-auth-modal:hover {
  background-color: #f0f0f0;
  color: #333;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
}

.auth-tab {
  flex: 1;
  padding: 15px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: #666;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.auth-tab.active {
  color: #10a37f;
  border-bottom-color: #10a37f;
  font-weight: 500;
}

.auth-tab:hover:not(.active) {
  color: #10a37f;
}

.auth-form-container {
  padding: 20px;
}

.auth-form-container h2 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 20px;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  color: #666;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  background-color: #ffffff;
}

.form-group input:focus {
  outline: none;
  border-color: #389e8a;
  box-shadow: 0 0 0 2px rgba(16, 163, 127, 0.2);
}

.auth-btn {
  padding: 10px;
  background-color: #10a37f;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-top: 10px;
}

.auth-btn:hover {
  background-color: #0e8d6f;
}

.auth-btn:active {
  background-color: #0c7a61;
}

.auth-error {
  color: #ff4d4f;
  font-size: 14px;
  margin-top: 10px;
  min-height: 20px;
}

/* 侧边栏认证按钮 */
.auth-buttons {
  display: flex;
  gap: 8px;
}

.login-btn,
.logout-btn {
  padding: 6px 12px;
  border: 1px solid #1890ff;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.login-btn {
  background-color: white;
  color: #10a37f;
  border-color: #10a37f;
}

.login-btn:hover {
  background-color: #f6ffed;
}

.logout-btn {
  background-color: #e0e0e0;
  color: #666;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.logout-btn:hover {
  background-color: #d0d0d0;
  color: #333;
}

/* 欢迎页面登录按钮 */
.welcome-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}

.welcome-buttons .login-btn {
  padding: 12px 24px;
  font-size: 16px;
}

/* 加载状态模态框 */
.loading-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000; /* 最高层级 */
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s ease;
}

.loading-modal.show {
  visibility: visible;
  opacity: 1;
}

.loading-content {
  background-color: #202123;
  padding: 32px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #3e3e42;
  border-top: 3px solid #10a37f;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    overflow: auto;
    height: 100vh;
    height: -webkit-fill-available;
  }

  .app-container {
    height: 100vh;
    height: -webkit-fill-available;
    flex-direction: column;
  }

  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    height: -webkit-fill-available;
    width: 85%;
    max-width: 320px;
    z-index: 1001; /* 提高z-index确保侧边栏在遮罩层之上 */
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    transition: transform 0.3s ease;
  }

  /* 为移动端侧边栏内的用户头像区域添加上边距，避免被固定的菜单按钮挡住 */
  .sidebar .user-profile-section {
    padding-top: calc(
      72px + env(safe-area-inset-top, 0px)
    ); /* 为固定的菜单按钮留出空间 */
  }

  .sidebar.open {
    transform: translateX(0);
  }

  /* 侧边栏遮罩 */
  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* 遮罩层基础层级 */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: pointer; /* 添加指针样式表明可点击 */
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .sidebar-toggle {
    display: flex;
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0px));
    left: 16px;
    z-index: 1100; /* 提高z-index确保在侧边栏之上 */
    background: rgba(32, 33, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 8px;
  }

  .back-button {
    display: none;
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: 16px;
    z-index: 1100; /* 提高z-index确保在侧边栏之上 */
    background: rgba(32, 33, 35, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    color: #e0e0e0;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .back-button:hover {
    background: rgba(32, 33, 35, 0.9);
  }

  .chat-container {
    min-height: 100vh;
    min-height: -webkit-fill-available;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }

  .chat-messages {
    padding: 16px;
    padding-bottom: 120px; /* 为输入框留出空间 */
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* 移动端按钮样式优化 */
  .action-btn {
    padding: 8px 12px;
    font-size: 16px;
    margin-top: 16px;
    position: relative;
    z-index: 10;
  }

  .copy-btn {
    margin-left: 16px;
    margin-right: 8px; /* 缩小与复制图标的间距 */
  }

  .regenerate-btn {
    margin-left: 0;
    margin-right: 8px; /* 调整与语音按钮的间距 */
  }

  .play-voice-btn {
    margin-left: 0;
    margin-right: 16px; /* 增加右边距 */
  }

  /* 确保AI消息内容下方有足够空间 */
  .chat-message.assistant {
    padding-bottom: 60px; /* 为按钮预留更多空间 */
    position: relative;
  }

  /* 按钮容器样式 */
  .chat-message.assistant .message-actions {
    position: absolute;
    bottom: 16px;
    right: 0;
    display: flex;
    gap: 8px; /* 缩小按钮之间的间距 */
    align-items: center; /* 确保所有按钮垂直居中对齐 */
    opacity: 1;
    transition: opacity 0.2s ease;
  }

  /* 移动端按钮统一垂直对齐 */
  .chat-message.assistant .message-actions button,
  .chat-message.assistant .message-actions .action-btn,
  .chat-message.assistant .message-actions .copy-btn,
  .chat-message.assistant .message-actions .regenerate-btn,
  .chat-message.assistant .message-actions .play-voice-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    padding: 0;
    font-size: 16px;
    line-height: 32px;
    margin: 0;
    vertical-align: middle;
    box-sizing: border-box;
    border: none;
    background: none;
    color: #8e8e93;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
  }

  .chat-message.assistant .message-actions button:hover,
  .chat-message.assistant .message-actions .action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
  }

  /* 确保图标本身也垂直居中 */
  .chat-message.assistant .message-actions button i,
  .chat-message.assistant .message-actions button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 1;
  }

  /* 移动端语音图标右边距 */
  .chat-message.assistant .message-actions .play-voice-btn {
    margin-right: 16px !important; /* 移动端语音图标右边距 */
  }

  .chat-message {
    max-width: calc(100% - 32px);
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 16px;
  }

  .chat-message.user {
    margin-left: auto;
    margin-right: 0;
  }

  .input-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #343541;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #3e3e42;
    z-index: 100;
  }

  .input-hint {
    display: none;
  }

  .chat-form {
    padding: 6px; /* 减少内边距以增加输入区域宽度 */
  }

  .user-input {
    min-height: 44px;
    max-height: 120px;
    font-size: 16px;
    padding: 12px 12px 12px 0; /* 减少右侧内边距，充分利用空间 */
  }

  .input-actions {
    padding: 0;
    min-width: 44px; /* 确保按钮容器宽度刚好 */
  }

  .send-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .welcome-content h1 {
    font-size: 24px;
  }

  .welcome-content p {
    font-size: 14px;
  }

  /* 欢迎页面适配 */
  .welcome-screen {
    padding-bottom: 120px; /* 为输入框留出空间 */
  }

  /* 消息滚动优化 */
  .chat-messages {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 20px;
  }

  .chat-messages::-webkit-scrollbar {
    width: 4px;
  }

  .chat-messages::-webkit-scrollbar-track {
    background: transparent;
  }

  .chat-messages::-webkit-scrollbar-thumb {
    background: #4b4b4b;
    border-radius: 2px;
  }

  /* 安全区域适配优化 */
  @supports (padding: max(0px)) {
    .input-container {
      padding-bottom: max(16px, env(safe-area-inset-bottom, 16px));
    }

    .sidebar-toggle {
      top: max(16px, env(safe-area-inset-top, 16px));
    }
  }

  /* iPhone X及以上设备适配 */
  @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3),
    only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2),
    only screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3),
    only screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3),
    only screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) {
    .chat-container {
      padding-left: env(safe-area-inset-left, 0px);
      padding-right: env(safe-area-inset-right, 0px);
    }

    .chat-messages {
      padding-left: env(safe-area-inset-left, 16px);
      padding-right: env(safe-area-inset-right, 16px);
    }
  }

  /* 消息显示优化 */
  .chat-message {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .message-content {
    line-height: 1.5;
    font-size: 16px; /* 移动端字体大小优化 */
  }

  /* 输入框获得焦点时优化 */
  .user-input:focus {
    border-color: #10a37f;
    outline: none;
  }
}

/* 工具提示 */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #202123;
  color: #e0e0e0;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  margin-bottom: 8px;
  z-index: 100;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* 复制按钮样式 */
.copy-btn {
  background: none;
  border: none;
  color: #8e8e93;
  cursor: pointer;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin: 0; /* 重置margin */
}

.copy-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e0e0e0;
}

/* 代码块样式 */
.code-block {
  background-color: #1e1e1e;
  padding: 16px;
  border-radius: 6px;
  margin: 16px 0;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: auto;
  position: relative;
}

.code-block pre {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
  color: #8e8e93;
}

/* 光标样式 */
.cursor-pointer {
  cursor: pointer;
  transition: background-color 0.2s;
}

.cursor-pointer:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* 自媒体平台弹出框样式 */
.social-media-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.social-media-modal.show {
  opacity: 1;
  visibility: visible;
}

.social-media-modal-content {
  background-color: #202123;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s ease;
  border: 1px solid #3e3e42;
}

.social-media-modal.show .social-media-modal-content {
  transform: scale(1);
}

.social-media-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #3e3e42;
  position: relative;
}

.social-media-header h3 {
  font-size: 20px;
  color: #ffffff;
  margin: 0 0 12px 0;
  font-weight: 600;
  text-align: center;
}

.social-media-description {
  background: linear-gradient(135deg, #2a2b2e 0%, #303135 100%);
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #a0aec0;
  border-left: 4px solid #10a37f;
  text-align: justify;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.close-social-modal {
  background: none;
  border: none;
  font-size: 28px;
  color: #8e8e93;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: absolute;
  top: -10px;
  right: -10px;
  background-color: #1c1c1e;
}

.close-social-modal:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: rotate(90deg);
}

/* 自媒体平台网格布局 */
.social-media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* 自媒体平台卡片样式 */
.social-media-card {
  background-color: #2a2b2e;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.social-media-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.social-media-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background-color: #303135;
}

.social-media-card:hover::before {
  transform: scaleX(1);
}

/* 平台专属配色 */
.douyin-card {
  border-color: #fe2c55;
}

.douyin-card::before {
  background: linear-gradient(90deg, #fe2c55, #ff0050);
}

.xiaohongshu-card {
  border-color: #ff2442;
}

.xiaohongshu-card::before {
  background: linear-gradient(90deg, #ff2442, #ff6184);
}

.wechat-card {
  border-color: #07c160;
}

.wechat-card::before {
  background: linear-gradient(90deg, #07c160, #5ce29d);
}

.wechat-video-card {
  border-color: #00c250;
}

.wechat-video-card::before {
  background: linear-gradient(90deg, #00c250, #7fffd4);
}

/* 社交图标样式 */
.social-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.douyin-card .social-icon {
  background: linear-gradient(135deg, #fe2c55, #ff0050);
}

.xiaohongshu-card .social-icon {
  background: linear-gradient(135deg, #ff2442, #ff6184);
}

.wechat-card .social-icon {
  background: linear-gradient(135deg, #07c160, #5ce29d);
}

.wechat-video-card .social-icon {
  background: linear-gradient(135deg, #00c250, #7fffd4);
}

/* 卡片内容样式 */
.social-media-card h4 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 8px 0;
}

.social-media-card p {
  font-size: 14px;
  color: #a0aec0;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.social-link {
  display: inline-block;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
  z-index: -1;
}

.social-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-link:hover::before {
  left: 100%;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
  .social-media-modal-content {
    width: 95%;
    max-width: 400px;
    max-height: 90vh;
    padding: 20px 16px;
    margin: 10px;
  }

  .social-media-header h3 {
    font-size: 18px;
  }

  .social-media-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .social-media-card {
    padding: 16px;
  }

  .social-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .social-media-card h4 {
    font-size: 16px;
  }

  .social-media-card p {
    font-size: 13px;
  }

  /* 确保在安全区域内显示 */
  .social-media-modal {
    padding: env(safe-area-inset-top, 20px) env(safe-area-inset-right, 20px)
      env(safe-area-inset-bottom, 20px) env(safe-area-inset-left, 20px);
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .social-media-card:active {
    transform: scale(0.98);
  }

  .social-link:active {
    transform: scale(0.95);
  }
}

/* 内容区域通用样式 */
.content-section {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #3e3e42;
}

.section-title {
  font-size: 20px;
  color: #ffffff;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  font-weight: 600;
}

/* 文章列表样式 */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background-color: #2a2b2e;
  border-radius: 8px;
  border: 1px solid #3e3e42;
  transition: all 0.3s ease;
  cursor: pointer;
}

.article-item:hover {
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  border-color: #10a37f;
}

.article-thumbnail {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  margin-right: 15px;
  flex-shrink: 0;
}

.article-content {
  flex: 1;
  min-width: 0;
}

.article-title {
  font-size: 16px;
  color: #ffffff;
  margin: 0 0 5px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.article-meta {
  font-size: 12px;
  color: #8e8e93;
  margin: 0;
}

/* 视频列表样式 */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.video-card {
  background-color: #2a2b2e;
  border-radius: 8px;
  border: 1px solid #3e3e42;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border-color: #fe2c55;
}

.video-thumbnail {
  width: 100%;
  padding-top: 56.25%; /* 16:9 宽高比 */
  background: linear-gradient(135deg, #fe2c55 0%, #ff6184 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.video-play-button {
  position: absolute;
  width: 64px;
  height: 64px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
  opacity: 0.9;
  bottom: 35px;
}

.video-play-button i {
  color: white;
  font-size: 28px;
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.video-card:hover .video-play-button {
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
  opacity: 1;
}

.video-card:hover .video-play-button i {
  transform: scale(1.1);
}

.video-thumbnail::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.video-info {
  padding: 12px;
}

.video-title {
  font-size: 16px;
  color: #ffffff;
  margin: 0 0 8px 0;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 500;
}

.video-meta {
  font-size: 12px;
  color: #8e8e93;
  margin: 0;
}

/* 移动端响应式设计 */
@media (max-width: 768px) {
  .article-thumbnail {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .video-thumbnail {
    padding-top: 56.25%; /* 保持16:9宽高比 */
    width: 100%;
    height: auto;
  }

  .video-play-button {
    width: 48px;
    height: 48px;
  }

  .video-play-button i {
    font-size: 20px;
    margin-left: 3px;
  }

  .article-title,
  .video-title {
    font-size: 14px;
  }
}

/* 滚动条样式优化 */
.social-media-modal-content::-webkit-scrollbar {
  width: 6px;
}

.social-media-modal-content::-webkit-scrollbar-track {
  background: #202123;
}

.social-media-modal-content::-webkit-scrollbar-thumb {
  background: #4b4b4b;
  border-radius: 3px;
}

.social-media-modal-content::-webkit-scrollbar-thumb:hover {
  background: #5a5a5a;
}
