/**
 * 移动端暗色主题
 * 在手机端强制应用暗色主题样式
 */

/* ========== 移动端暗色主题 ========== */
@media (max-width: 768px) {
  /* 整体页面背景 - 强制应用 */
  html,
  body {
    background: #2d3748 !important;
    background-color: #2d3748 !important;
  }

  /* 主内容区域 */
  main,
  .content {
    background: #2d3748 !important;
  }

  /* 所有wrapper模块基础背景 */
  .wrapper {
    background: #1a202c !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
  }

  /* Banner区域 */
  .banner,
  .banner-header {
    background: #1a202c !important;
    border-bottom: 3px solid #fa8c32 !important;
  }

  .banner-content {
    background: transparent !important;
  }

  .banner-content h1,
  .banner-content p {
    color: #e2e8f0 !important;
  }

  /* Banner标题 - 硅谷科技评论 - 黑体字体 + 浅色文字 */
  .banner-title {
    /* 中文黑体 */
    font-family: "PingFang SC", "Microsoft YaHei", "STHeiti", "SimHei", "Heiti SC", sans-serif !important;
    font-weight: 700 !important;
    /* 暗色背景下使用浅色文字 */
    color: #e2e8f0 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
  }

  /* 英文标题 - Silicon Valley Tech Review - 黑体字体 + 浅色文字 */
  .banner-title[data-lang="en"],
  .banner-title:lang(en) {
    font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 900 !important;
    color: #e2e8f0 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
  }

  /* Banner副标题 */
  .banner-tagline,
  .banner-tagline div {
    color: #cbd5e0 !important;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4) !important;
  }

  /* 业务标签(数据榜单、内容社区、投资孵化) */
  .business-tags {
    background: transparent !important;
  }

  .business-tag {
    background: #374151 !important; /* 深灰背景 */
    color: #ffffff !important; /* 纯白色文字 */
    border: 2px solid rgba(250, 140, 50, 0.3) !important; /* 橙色边框 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important; /* 暗色阴影 */
    font-weight: 700 !important;
  }

  .business-tag:hover,
  .business-tag:active {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important; /* hover橙色渐变 */
    color: white !important;
    border-color: transparent !important;
    transform: scale(1.05) !important;
  }

  /* 统计卡片 */
  .stats-wrapper {
    background: #1a202c !important;
  }

  /* AI创投日报 - 统一容器 */
  .funding-unified-container {
    background: #1a202c !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* 表头区域 */
  .funding-header-enhanced {
    background: transparent !important;
  }

  .funding-main-title .title-text,
  .funding-subtitle {
    color: #e2e8f0 !important;
  }

  .funding-title-badge {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
  }

  /* 统计卡片 */
  .funding-stat-card {
    background: #2d3748 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .stat-label {
    color: #a0aec0 !important;
  }

  .stat-value {
    color: #fa8c32 !important;
  }

  /* 图表区域 */
  .funding-charts {
    background: transparent !important;
  }

  .chart-container {
    background: #2d3748 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .chart-title {
    color: #ffffff !important; /* 改为纯白色,提高对比度 */
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .chart-bar-label {
    color: #f3f4f6 !important; /* 改为更亮的灰白色 */
  }

  .chart-bar-track {
    background: #374151 !important;
  }

  /* 筛选栏区域 */
  .funding-filter-bar {
    background: transparent !important;
  }

  .filter-label {
    color: #ffffff !important; /* 改为纯白色 */
  }

  .filter-option {
    background: #4b5563 !important; /* 改为更亮的灰色,提高对比度 */
    color: #ffffff !important; /* 纯白色文字 */
    border: 2px solid rgba(255, 255, 255, 0.3) !important; /* 更明显的边框 */
    font-weight: 600 !important; /* 加粗文字 */
  }

  .filter-option.active {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
    border-color: transparent !important;
    font-weight: 700 !important;
  }

  .filter-reset-btn {
    background: #4b5563 !important; /* 改为更亮的灰色 */
    color: #ffffff !important; /* 纯白色 */
    border: 2px solid rgba(255, 255, 255, 0.3) !important; /* 更明显的边框 */
    font-weight: 600 !important; /* 加粗文字 */
  }

  /* 融资卡片列表 */
  .funding-highlights {
    background: transparent !important;
  }

  .funding-item {
    background: #2d3748 !important;
    border: none !important;
  }

  .company-name {
    color: #e2e8f0 !important;
  }

  .company-stage {
    background: rgba(250, 140, 50, 0.2) !important;
    color: #ffa64d !important;
  }

  .funding-amount {
    color: #48bb78 !important;
  }

  .funding-description {
    color: #a0aec0 !important;
  }

  .funding-tag {
    background: #374151 !important;
    color: #ffffff !important; /* 改为纯白色,提高对比度 */
    border-color: rgba(255, 255, 255, 0.2) !important; /* 增强边框可见度 */
  }

  .funding-time {
    color: #718096 !important;
  }

  /* 加载更多按钮 */
  .load-more-btn {
    background: #374151 !important;
    color: #cbd5e0 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
  }

  .load-more-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
  }

  /* 聊天组件 */
  .chatbox {
    background: #1a202c !important;
  }

  .chat-header {
    color: #ffffff !important; /* 改为纯白色 */
  }

  .chat-messages {
    background: #2d3748 !important;
  }

  /* 原生聊天容器 - 强制应用暗色背景 */
  #svtr-chat-container {
    background: #2d3748 !important;
  }

  .native-chat-container {
    background: #2d3748 !important;
  }

  .message {
    background: #374151 !important;
    color: #e2e8f0 !important;
  }

  .message.user {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
  }

  .chat-input-container {
    background: #2d3748 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .chat-input {
    background: #374151 !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .chat-input::placeholder {
    color: #718096 !important;
  }

  .chat-send-btn {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
  }

  /* Header导航 */
  header {
    background: #1a202c !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .logo-text {
    color: #e2e8f0 !important;
  }

  nav a {
    color: #cbd5e0 !important;
  }

  nav a:hover,
  nav a.active {
    color: #fa8c32 !important;
  }

  /* Footer */
  footer {
    background: #1a202c !important;
    color: #a0aec0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  footer a {
    color: #cbd5e0 !important;
  }

  footer a:hover {
    color: #fa8c32 !important;
  }

  /* 通用文本颜色 */
  h1, h2, h3, h4, h5, h6 {
    color: #e2e8f0 !important;
  }

  p {
    color: #cbd5e0 !important;
  }

  /* 卡片通用样式 */
  .card {
    background: #2d3748 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* 按钮通用样式 */
  button {
    color: #e2e8f0 !important;
  }

  /* 输入框通用样式 */
  input,
  textarea,
  select {
    background: #374151 !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  input::placeholder,
  textarea::placeholder {
    color: #718096 !important;
  }

  /* 分割线 */
  hr,
  .divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  /* Scrollbar样式 */
  ::-webkit-scrollbar {
    width: 8px;
    background: #1a202c;
  }

  ::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: #718096;
  }

  /* ========== 侧边栏底部区域 ========== */
  /* 登录注册按钮区域 */
  .sidebar-bottom-actions {
    background: linear-gradient(135deg, rgba(26, 32, 44, 0.98), rgba(45, 55, 72, 0.95)) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4) !important;
  }

  /* 登录/注册按钮 */
  .btn-member-login {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 2px solid #60A5FA !important;
    color: #60A5FA !important;
  }

  .btn-member-login:hover {
    background: rgba(59, 130, 246, 0.2) !important;
    border-color: #3B82F6 !important;
    color: #3B82F6 !important;
  }

  /* 社交媒体图标区域 */
  .social-media-icons {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .social-media-icons a {
    color: #cbd5e0 !important;
    background: rgba(55, 65, 81, 0.5) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
  }

  .social-media-icons a:hover {
    color: #fa8c32 !important;
    background: rgba(250, 140, 50, 0.2) !important;
    transform: translateY(-2px) !important;
  }

  .social-media-icons svg {
    filter: brightness(0.9) !important;
  }

  /* ========== 原生聊天容器 ========== */
  /* AI Chatbot 原生容器 */
  #svtr-chat-container,
  .native-chat-container {
    background: #1a202c !important;
  }

  /* 聊天消息区域 */
  .chat-messages,
  .messages-container {
    background: #2d3748 !important;
  }

  /* 聊天消息气泡 */
  .message,
  .chat-message {
    background: #374151 !important;
    color: #ffffff !important; /* 改为纯白色,提高对比度 */
    border: 1px solid rgba(255, 255, 255, 0.15) !important; /* 增强边框可见度 */
  }

  /* 用户消息 */
  .message.user,
  .chat-message.user,
  .user-message {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
    border: none !important;
  }

  /* AI消息 */
  .message.assistant,
  .message.bot,
  .chat-message.assistant,
  .chat-message.bot,
  .bot-message,
  .assistant-message {
    background: #374151 !important;
    color: #ffffff !important; /* 改为纯白色 */
  }

  /* 输入框容器 */
  .chat-input-wrapper,
  .input-container,
  .chat-input-area {
    background: #2d3748 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  /* 输入框 */
  .chat-input,
  .message-input,
  textarea.chat-input {
    background: #374151 !important;
    color: #ffffff !important; /* 改为纯白色 */
    border: 1px solid rgba(255, 255, 255, 0.2) !important; /* 增强边框可见度 */
  }

  .chat-input:focus,
  .message-input:focus {
    border-color: #fa8c32 !important;
    box-shadow: 0 0 0 3px rgba(250, 140, 50, 0.3) !important; /* 增强焦点效果 */
  }

  /* 发送按钮 */
  .chat-send-btn,
  .send-button,
  .btn-send {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
    border: none !important;
  }

  .chat-send-btn:hover,
  .send-button:hover {
    background: linear-gradient(135deg, #ff9f40, #ffb366) !important;
    box-shadow: 0 4px 12px rgba(250, 140, 50, 0.4) !important;
  }

  .chat-send-btn:disabled,
  .send-button:disabled {
    background: #4a5568 !important;
    color: #718096 !important;
  }

  /* 聊天加载状态 */
  .chat-loading,
  .typing-indicator {
    background: #374151 !important;
    color: #cbd5e0 !important;
  }

  /* 聊天时间戳 */
  .message-time,
  .timestamp {
    color: #718096 !important;
  }

  /* 聊天系统消息 */
  .system-message,
  .chat-system {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #60A5FA !important;
    border: 1px solid rgba(59, 130, 246, 0.2) !important;
  }

  /* ========== 用户操作区域 (侧边栏订阅) ========== */
  .user-actions {
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.9), rgba(75, 85, 99, 0.7)) !important;
    border-color: rgba(156, 163, 175, 0.2) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
  }

  .subscribe-trust {
    color: #10b981 !important;
  }

  .subscribe-form-inline input {
    background: #374151 !important;
    color: #e2e8f0 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
  }

  .subscribe-form-inline input:focus {
    border-color: #10b981 !important;
    background: #2d3748 !important;
  }

  .subscribe-form-inline input::placeholder {
    color: #718096 !important;
  }

  .btn-subscribe-submit {
    background: #059669 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25) !important;
  }

  .btn-subscribe-submit:hover {
    background: #047857 !important;
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35) !important;
  }

  /* ========== 侧边栏相关 ========== */
  .sidebar {
    background: rgba(26, 32, 44, 0.95) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .sidebar-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .sidebar-logo img {
    border-color: rgba(250, 140, 50, 0.3) !important;
  }

  .nav-list a {
    color: #cbd5e0 !important;
  }

  .nav-list a:hover,
  .nav-list a.active {
    color: #fa8c32 !important;
    background: rgba(250, 140, 50, 0.1) !important;
  }

  .group-header {
    color: #e2e8f0 !important;
  }

  .group-header.collapsible {
    background: rgba(55, 65, 81, 0.5) !important;
  }

  .group-header.collapsible:hover {
    background: rgba(75, 85, 99, 0.5) !important;
  }

  .sub-list {
    background: transparent !important;
  }

  .sub-list a {
    color: #a0aec0 !important;
  }

  .sub-list a:hover {
    color: #fa8c32 !important;
    background: rgba(250, 140, 50, 0.1) !important;
  }

  /* ========== 遮罩层 ========== */
  .overlay,
  .modal-backdrop {
    background: rgba(0, 0, 0, 0.7) !important;
  }

  /* ========== 语言切换按钮 ========== */
  .lang-toggle {
    background: #374151 !important; /* 改为更深的灰色 */
    border: 2px solid rgba(250, 140, 50, 0.4) !important; /* 橙色边框更明显 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  }

  .lang-toggle button {
    background: transparent !important;
    color: #ffffff !important; /* 改为纯白色 */
    font-weight: 600 !important; /* 加粗 */
    min-height: 36px !important; /* 增加最小高度 */
  }

  .lang-toggle button.active {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
    font-weight: 700 !important;
    box-shadow: 0 0 8px rgba(250, 140, 50, 0.6) !important; /* 发光效果 */
  }

  .lang-toggle button:not(.active):hover {
    background: rgba(250, 140, 50, 0.3) !important; /* 增强hover背景 */
    color: #ffffff !important;
  }

  .lang-toggle .divider {
    color: #9ca3af !important; /* 改为更亮的灰色 */
    font-weight: 300 !important;
  }

  /* ========== SVTR原生聊天组件暗色主题 ========== */
  /* SVTR Chat容器 */
  .svtr-chat-container {
    background: #1a202c !important;
  }

  /* SVTR 聊天消息区域 - 强制应用暗色背景 */
  .svtr-chat-messages,
  #svtr-chat-messages {
    background: #2d3748 !important;
    background-color: #2d3748 !important;
  }

  /* 确保所有聊天消息容器都是暗色 - 使用通配符 */
  .svtr-chat-container > div,
  .svtr-chat-container > *,
  .svtr-chat-wrapper,
  .svtr-chat-messages > *:not(.svtr-message) {
    background: #2d3748 !important;
    background-color: #2d3748 !important;
  }

  /* 强制聊天区域所有子元素继承暗色背景 */
  .svtr-chat-container *:not(.svtr-message):not(.svtr-action-btn):not(button):not(textarea) {
    background-color: transparent !important;
  }

  /* SVTR 聊天消息 */
  .svtr-message {
    background: #374151 !important;
    color: #ffffff !important; /* 改为纯白色,提高对比度 */
    border: 1px solid rgba(255, 255, 255, 0.15) !important; /* 增强边框可见度 */
  }

  .svtr-message.user {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
    border: none !important;
  }

  .svtr-message.assistant {
    background: #374151 !important;
    color: #ffffff !important; /* 改为纯白色 */
  }

  .svtr-message.loading {
    background: #374151 !important;
  }

  /* SVTR 消息头部 */
  .message-header {
    color: #f3f4f6 !important; /* 改为更亮的灰白色 */
  }

  .message-avatar {
    background: #4a5568 !important;
    color: #fbbf24 !important; /* 使用更亮的橙黄色 */
    font-weight: 600 !important;
  }

  .svtr-message.user .message-avatar {
    background: rgba(255, 255, 255, 0.25) !important; /* 增加不透明度 */
    color: white !important;
  }

  .message-name {
    color: #f3f4f6 !important; /* 改为更亮的灰白色 */
    font-weight: 500 !important;
  }

  .svtr-message.user .message-name {
    color: white !important;
  }

  .message-time {
    color: #9ca3af !important; /* 改为更亮的灰色 */
  }

  .message-content {
    color: #ffffff !important; /* 改为纯白色 */
    line-height: 1.6 !important; /* 增加行高提高可读性 */
  }

  .svtr-message.user .message-content {
    color: white !important;
  }

  /* SVTR 加载状态 */
  .loading-dots {
    color: #f3f4f6 !important; /* 改为更亮的灰白色 */
  }

  .thinking-emoji {
    color: #fbbf24 !important; /* 使用更亮的橙黄色 */
  }

  .animated-dots span {
    color: #f3f4f6 !important; /* 改为更亮的灰白色 */
  }

  /* SVTR 输入区域 */
  .svtr-chat-input-area {
    background: #2d3748 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .svtr-chat-input-container {
    background: #2d3748 !important;
  }

  /* SVTR 输入框 */
  #svtr-chat-input,
  textarea#svtr-chat-input {
    background: #374151 !important;
    color: #ffffff !important; /* 改为纯白色 */
    border: 1px solid rgba(255, 255, 255, 0.2) !important; /* 增强边框可见度 */
  }

  #svtr-chat-input:focus {
    border-color: #fa8c32 !important;
    box-shadow: 0 0 0 3px rgba(250, 140, 50, 0.3) !important; /* 增强焦点效果 */
  }

  #svtr-chat-input::placeholder {
    color: #9ca3af !important; /* 改为更亮的灰色 */
  }

  /* SVTR 发送按钮 */
  .svtr-chat-send-btn,
  #svtr-chat-send {
    background: linear-gradient(135deg, #fa8c32, #ff9f40) !important;
    color: white !important;
    border: none !important;
  }

  .svtr-chat-send-btn:hover {
    background: linear-gradient(135deg, #ff9f40, #ffb366) !important;
    box-shadow: 0 4px 12px rgba(250, 140, 50, 0.4) !important;
  }

  .svtr-chat-send-btn:disabled {
    background: #4a5568 !important;
    color: #718096 !important;
  }

  .send-icon,
  .loading-spinner {
    color: white !important;
  }

  /* SVTR 操作按钮 */
  .svtr-chat-actions {
    background: transparent !important;
  }

  .svtr-action-btn,
  #svtr-share-btn,
  #svtr-clear-btn {
    background: #374151 !important;
    color: #cbd5e0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .svtr-action-btn:hover {
    background: #4a5568 !important;
    color: #fa8c32 !important;
  }

  /* SVTR 分享对话框 */
  .svtr-share-dialog {
    background: rgba(0, 0, 0, 0.8) !important;
  }

  .share-dialog-content {
    background: #2d3748 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .share-dialog-content h4 {
    color: #e2e8f0 !important;
  }

  .share-dialog-content textarea {
    background: #374151 !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .share-actions button {
    background: #374151 !important;
    color: #cbd5e0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .share-actions button:hover {
    background: #4a5568 !important;
  }

  /* SVTR Toast提示 */
  .svtr-toast {
    background: #374151 !important;
    color: #e2e8f0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
}

/* ========== 全局字体设置(所有屏幕尺寸) ========== */
/* 网站表头 - 硅谷科技评论标题使用黑体 */
.banner-title {
  font-family: "PingFang SC", "Microsoft YaHei", "STHeiti", "SimHei", "Heiti SC", sans-serif !important;
  font-weight: 700 !important;
}

/* Silicon Valley Tech Review 英文标题也使用相应的黑体 */
.banner-title[lang="en"],
.banner-title:lang(en) {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: 900 !important;
}
