:root {
  --bg: #0b1020;
  --card: #121a2b;
  --text: #e6edf3;
  --muted: #94a3b8;
  --primary: #5b9cff;
  --user: #1f6feb;
  --assistant: #2ea043;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  overflow-x: hidden;
}

.hidden { display: none !important; }

.container {
  max-width: 1200px; /* PC端更宽 */
  margin: 0 auto;
  padding: 16px;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .container {
    max-width: 100%;
    padding: 12px;
  }
}

.header { display: flex; flex-direction: column; gap: 8px; }
.header h1 { font-size: 20px; margin: 0; font-weight: 600; text-align: center; }

.controls { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px; 
  flex-wrap: wrap;
}

/* Navigation Styles */
.nav {
  background: rgba(18, 26, 43, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(94, 163, 255, 0.15);
  padding: 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  flex-wrap: nowrap;
}

.logo h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.logo a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.logo a:hover {
  opacity: 0.8;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(91, 156, 255, 0.15);
  color: var(--primary);
}

.btn-login {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background: #4a8ce7;
  transform: translateY(-1px);
}

.user-info {
  display: inline-block;
  font-size: 13px;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1;
}

.user-email {
  display: none; /* 隐藏邮箱 */
}

.remaining-time {
  display: none; /* 从导航栏移除 */
}

.btn-logout {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline;
  vertical-align: middle;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Translation Interface Styles */
.app {
  min-height: 100vh;
  background: var(--bg);
}

.translation-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.translation-header {
  text-align: center;
  margin-bottom: 40px;
}

.translation-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--primary), var(--assistant));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.translation-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 32px;
}

/* Privacy Commitment Styles */
.privacy-commitment-section {
  padding: 40px 20px;
  background: rgba(11, 16, 32, 0.3);
  border-top: 1px solid rgba(91, 156, 255, 0.1);
}

.privacy-commitment {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
}

.privacy-badge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 800px;
  width: 100%;
  transition: all 0.3s ease;
}

.privacy-badge:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
}

.privacy-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 2px;
}

.privacy-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  font-weight: 500;
}

/* Mobile optimization for privacy commitment */
@media (max-width: 768px) {
  .privacy-badge {
    padding: 14px 16px;
    margin: 0 10px;
  }
  
  .privacy-text {
    font-size: 13px;
    line-height: 1.5;
  }
  
  .privacy-icon {
    font-size: 18px;
  }
}

.translation-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.btn-start,
.btn-stop {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  justify-content: center;
}

.btn-start {
  background: linear-gradient(135deg, var(--assistant), #22c55e);
  color: white;
}

.btn-start:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.btn-stop {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.btn-stop:disabled {
  background: rgba(239, 68, 68, 0.5);
  cursor: not-allowed;
  transform: none;
}

.btn-stop:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.btn-icon {
  font-size: 18px;
}

.status-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.translation-status {
  text-align: center;
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

.remaining-time-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 160, 67, 0.15);
  border: 1px solid rgba(46, 160, 67, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.time-icon {
  font-size: 16px;
}

.remaining-time-text {
  color: var(--assistant);
  font-weight: 600;
}

/* Visualizer Section */
.visualizer-section {
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid rgba(91, 156, 255, 0.15);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}

.visualizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.visualizer-header h3 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--text);
}

.visualizer-info {
  display: flex;
  gap: 16px;
}

.info-item {
  font-size: 14px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.visualizer {
  width: 100%;
  height: 120px;
  background: rgba(11, 16, 32, 0.8);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wave {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Translation Results */
.translation-results {
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid rgba(91, 156, 255, 0.15);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.results-header h3 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--text);
}

.results-info {
  display: flex;
  gap: 16px;
}

.chat {
  min-height: 300px;
  max-height: 500px;
  overflow-y: auto;
  background: rgba(11, 16, 32, 0.5);
  border-radius: 12px;
  padding: 20px;
}

/* Feature Highlights */
.feature-highlights {
  margin-top: 48px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.feature-item {
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid rgba(91, 156, 255, 0.15);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(91, 156, 255, 0.3);
  box-shadow: 0 8px 25px rgba(91, 156, 255, 0.1);
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.feature-item h4 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: var(--text);
}

.feature-item p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .nav-container {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  
  .logo h1 {
    font-size: 18px;
  }
  
  .nav-actions {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .nav-link {
    font-size: 14px;
    padding: 6px 12px;
  }
  
  .user-info {
    gap: 8px;
    font-size: 12px;
  }
  
  .user-info #userEmail {
    display: none; /* 移动端隐藏邮箱，只显示时间和登出 */
  }
  
  .btn-login, .btn-logout {
    font-size: 13px;
    padding: 6px 12px;
  }
  
  .remaining-time {
    padding: 3px 6px;
    font-size: 12px;
  }
  
  .btn-logout {
    padding: 4px 8px;
    font-size: 11px;
  }
  
  .nav-link {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .translation-container {
    padding: 24px 16px;
  }
  
  .translation-title {
    font-size: 2rem;
  }
  
  .translation-subtitle {
    font-size: 1rem;
  }
  
  .translation-controls {
    flex-direction: column;
    gap: 16px;
  }
  
  .btn-start,
  .btn-stop {
    width: 100%;
    max-width: 280px;
  }
  
  .visualizer-section,
  .translation-results {
    padding: 20px;
  }
  
  .visualizer-header,
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .visualizer-info,
  .results-info {
    flex-wrap: wrap;
  }
  
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* 移动端控制按钮优化 */
@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    gap: 12px;
  }
  
  .controls button {
    width: 100%;
    max-width: 280px;
    padding: 12px 16px;
    font-size: 16px;
  }
}

.context-info { 
  display: flex; 
  justify-content: center; 
  align-items: center;
}

.context-status { 
  font-size: 12px; 
  color: var(--muted); 
  background: var(--card);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #23304d;
}
button {
  background: var(--primary);
  color: white;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
button[disabled] { opacity: 0.6; cursor: not-allowed; }
.status { color: var(--muted); font-size: 13px; }

.visualizer {
  margin-top: 12px;
  background: var(--card);
  border: 1px solid #23304d;
  border-radius: 12px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#wave {
  width: 100%;
  height: 100%;
  display: block;
}

.chat {
  margin-top: 16px;
  background: var(--card);
  border-radius: 12px;
  padding: 16px;
  height: calc(100vh - 280px); /* PC端高度优化 */
  overflow: auto;
}

/* 移动端聊天区域优化 */
@media (max-width: 768px) {
  .chat {
    padding: 12px;
    height: calc(100vh - 200px); /* 移动端更多空间给内容 */
    margin-top: 12px;
  }
}

.msg { 
  display: flex; 
  margin: 10px 0; 
  flex-direction: column; /* 默认垂直布局 */
}
.msg.system { justify-content: center; }
.msg.user { justify-content: flex-end; }
.msg.assistant { justify-content: flex-start; }

/* PC端优化：原文和翻译并排显示 */
@media (min-width: 769px) {
  .msg.assistant .content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
  }
  
  /* 源语言文本容器样式 - 向后兼容 */
  .msg.assistant .jp,
  .msg.assistant .source {
    flex: 1;
    min-width: 0;
  }
  
  /* 目标语言文本容器样式 - 向后兼容 */
  .msg.assistant .zh,
  .msg.assistant .target {
    flex: 1;
    min-width: 0;
  }
}

/* WS字幕时间与源/目标语言区分样式 */
.msg.assistant .time { color: #94a3b8; font-size: 12px; margin-bottom: 8px; }
/* 源语言文本样式 - 向后兼容 */
.msg.assistant .jp,
.msg.assistant .source { 
  color: #5b9cff; 
  margin-bottom: 8px;
  padding: 8px 12px;
  background: rgba(91, 156, 255, 0.08);
  border-radius: 8px;
}
/* 目标语言文本样式 - 向后兼容 */
.msg.assistant .zh,
.msg.assistant .target { 
  color: #2ea043; 
  padding: 8px 12px;
  background: rgba(46, 160, 67, 0.08);
  border-radius: 8px;
  font-weight: 500;
}

/* 历史记录样式：与实时翻译完全一致，无视觉区分 */

/* 加载指示器 */
.loading-indicator {
  text-align: center;
  color: #64748b;
  font-size: 12px;
  padding: 10px;
  margin: 10px 0;
}

/* 移动端：垂直布局，更好的可读性 */
@media (max-width: 768px) {
  .msg.assistant .jp {
    font-size: 14px;
    line-height: 1.4;
  }
  
  /* 移动端目标语言样式 - 向后兼容 */
  .msg.assistant .zh,
  .msg.assistant .target {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 6px;
  }
}

.bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 12px;
  background: #19233a;
  border: 1px solid #23304d;
}
.msg.user .bubble { background: #10203f; border-color: #1d3669; }
.msg.assistant .bubble { background: #0f2a1b; border-color: #1a4d33; }
.msg.system .bubble { background: #1a2235; border-color: #253251; }

.content { white-space: pre-wrap; line-height: 1.5; }
.sub { margin-top: 6px; color: var(--muted); font-size: 12px; }

/* 时间戳样式 */
.timestamp {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  display: block;
  background: rgba(148, 163, 184, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
  white-space: nowrap;
  font-weight: 500;
}

/* 原文和翻译区分 */
.content.original {
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 4px;
}

.content.translation {
  color: var(--text);
  font-weight: 500;
}

/* 处理中的消息样式 */
.msg.processing .bubble {
  background: #1a2332;
  border-color: var(--primary);
}

.processing-text {
  color: var(--primary);
}

/* 已确认文本和部分文本的样式 */
.confirmed-text {
  color: var(--primary);
  opacity: 1;
}

.partial-text {
  color: var(--primary);
  opacity: 0.6;
  background: rgba(91, 156, 255, 0.1);
  padding: 2px 4px;
  border-radius: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

/* 处理中的动画点 */
.dots {
  animation: dots 1.5s infinite;
}

@keyframes dots {
  0%, 20% { opacity: 0; }
  50% { opacity: 1; }
  80%, 100% { opacity: 0; }
}

/* 完成的消息样式 */
.msg.completed .bubble {
  background: #0f2a1b;
  border-color: #1a4d33;
}

/* 错误消息样式 */
.msg.error .bubble {
  background: #2a1a1a;
  border-color: #4d1a1a;
}

.msg.error .content {
  color: #ff6b6b;
}

.tips { color: var(--muted); font-size: 12px; margin-top: 10px; }

/* 翻译状态样式 - 向后兼容 */
.zh.waiting,
.target.waiting {
  color: var(--muted);
  font-style: italic;
  opacity: 0.8;
}

.translation-status {
  display: inline-block;
  margin-right: 6px;
  font-size: 14px;
}

.translation-status.pending {
  animation: spin 1s linear infinite;
}

.translation-status.ready {
  color: var(--assistant);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 双轨翻译样式 */
.quick-translation {
  color: #94a3b8;
  font-style: italic;
  font-size: 14px;
  margin-bottom: 4px;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.3);
  padding-bottom: 4px;
}

.optimized-translation {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  margin-top: 4px;
  padding-top: 4px;
  border-left: 2px solid var(--assistant);
  padding-left: 8px;
  background: rgba(46, 160, 67, 0.05);
  border-radius: 0 4px 4px 0;
}

.translation-comparison {
  background: linear-gradient(90deg, rgba(46, 160, 67, 0.15), transparent);
  animation: comparisonHighlight 3s ease-out;
  border-left: 3px solid var(--assistant);
}

@keyframes comparisonHighlight {
  0% { 
    background: linear-gradient(90deg, rgba(46, 160, 67, 0.25), transparent);
    transform: translateX(-2px);
  }
  30% { 
    background: linear-gradient(90deg, rgba(46, 160, 67, 0.15), transparent);
  }
  100% { 
    background: transparent;
    transform: translateX(0);
  }
}

.translation-updated {
  background: linear-gradient(90deg, rgba(46, 160, 67, 0.2), transparent);
  animation: updateHighlight 2s ease-out;
  border-left: 3px solid var(--assistant);
}

@keyframes updateHighlight {
  0% { 
    background: linear-gradient(90deg, rgba(46, 160, 67, 0.3), transparent);
    transform: translateX(-2px);
  }
  50% { 
    background: linear-gradient(90deg, rgba(46, 160, 67, 0.2), transparent);
  }
  100% { 
    background: transparent;
    transform: translateX(0);
  }
}

.translation-status.quick {
  color: #5b9cff;
  animation: none;
}

.translation-status.optimized {
  color: var(--assistant);
  animation: sparkle 0.5s ease-out;
}

@keyframes sparkle {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* 双版本翻译对比样式 */
.translation-comparison-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.simple-translation, .context-translation {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid;
}

.simple-translation {
  background: rgba(91, 156, 255, 0.08);
  border-left-color: #5b9cff;
}

.context-translation {
  background: rgba(46, 160, 67, 0.08);
  border-left-color: #2ea043;
}

.translation-label {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  opacity: 0.8;
}

.simple-translation .translation-label {
  color: #5b9cff;
}

.context-translation .translation-label {
  color: #2ea043;
}

.translation-text {
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
}

/* 双引擎对比界面样式 */
.engine-panel {
  background: var(--card);
  border: 1px solid #23304d;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.engine-title {
  background: linear-gradient(135deg, var(--primary) 0%, #2ea043 100%);
  color: white;
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  border-bottom: 1px solid #23304d;
}

.engine-panel:first-child .engine-title {
  background: linear-gradient(135deg, #5b9cff 0%, #4a8ae8 100%);
}

.engine-panel:last-child .engine-title {
  background: linear-gradient(135deg, #2ea043 0%, #28a745 100%);
}

/* 对比模式下的消息样式调整 */
.comparison-container .chat {
  margin-top: 0;
  border-radius: 0;
  border: none;
  background: transparent;
}

/* ASR修正显示样式 */
.jp-correction {
  margin: 4px 0;
  padding: 6px 8px;
  background: rgba(91, 156, 255, 0.08);
  border-left: 2px solid #5b9cff;
  border-radius: 0 4px 4px 0;
  font-size: 13px;
}

.correction-label {
  color: #5b9cff;
  font-weight: 500;
  margin-right: 6px;
}

.corrected-text {
  color: var(--text);
  background: rgba(91, 156, 255, 0.15);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 自定义配置区域样式 */
#customConfig {
  background: var(--card);
  border: 1px solid #23304d;
  border-radius: 6px;
  padding: 8px;
  margin-top: 4px;
}

#customConfig input {
  background: var(--bg);
  border: 1px solid #23304d;
  color: var(--text);
  border-radius: 4px;
  padding: 2px 4px;
  margin-left: 4px;
  margin-right: 8px;
}

#customConfig button {
  font-size: 11px;
  padding: 4px 8px;
}

/* 新消息指示器淡入动画 */
@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ===== Landing Page Styles ===== */
.landing {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg) 0%, #1a2332 100%);
}

/* Navigation */
.nav {
  background: rgba(18, 26, 43, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #23304d;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo h1 {
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  color: var(--primary);
}

.btn-login {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-login:hover {
  background: #4a8ae8;
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  padding: 80px 24px;
  text-align: center;
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, var(--primary), #2ea043);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 48px 0;
  line-height: 1.6;
}

/* Demo Container */
.demo-container {
  background: var(--card);
  border: 1px solid #23304d;
  border-radius: 16px;
  margin: 48px 0;
  overflow: hidden;
}

.demo-header {
  background: linear-gradient(135deg, var(--primary), #2ea043);
  padding: 12px 20px;
  color: white;
  font-weight: 500;
}

.demo-chat {
  padding: 20px;
  height: 300px;
  overflow-y: auto;
  background: var(--bg);
}

/* Pricing Preview on Homepage */
.pricing-preview {
  margin-top: 64px;
  background: var(--card);
  border: 1px solid #23304d;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}

.pricing-preview h3 {
  font-size: 28px;
  margin: 0 0 24px 0;
  color: var(--text);
}

.pricing-highlight {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.highlight-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.highlight-value {
  font-size: 20px;
  color: var(--primary);
  font-weight: 700;
}

.pricing-cta {
  border-top: 1px solid #23304d;
  padding-top: 24px;
}

.btn-pricing {
  background: linear-gradient(135deg, var(--primary), #2ea043);
  color: white;
  text-decoration: none;
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 16px;
  display: inline-block;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.btn-pricing:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(91, 156, 255, 0.3);
}

.pricing-note {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Pricing Section */
.pricing-section {
  margin-top: 64px;
}

.pricing-section h3 {
  font-size: 32px;
  margin: 0 0 32px 0;
  color: var(--text);
}

.pricing-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.pricing-card {
  background: var(--card);
  border: 1px solid #23304d;
  border-radius: 16px;
  padding: 32px 24px;
  position: relative;
  transition: all 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(91, 156, 255, 0.2);
}

.pricing-card.featured {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(91, 156, 255, 0.1), rgba(46, 160, 67, 0.1));
}

.pricing-card.featured::before {
  content: "推荐";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.card-header {
  text-align: center;
  margin-bottom: 24px;
}

.card-header h4 {
  font-size: 24px;
  margin: 0 0 8px 0;
  color: var(--text);
}

.price {
  font-size: 36px;
  font-weight: 700;
  color: var(--primary);
}

.price span {
  font-size: 16px;
  color: var(--muted);
}

.features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.features li {
  padding: 8px 0;
  color: var(--text);
  display: flex;
  align-items: center;
}

.features li::before {
  content: "✅";
  margin-right: 8px;
}

/* App Interface */
.app .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border-bottom: 1px solid #23304d;
}

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

.header-left h1 {
  margin: 0;
  font-size: 20px;
  color: var(--primary);
}

.user-info {
  display: flex;
  flex-direction: column;
  font-size: 12px;
  color: var(--muted);
}

.remaining-time {
  color: var(--primary);
  font-weight: 600;
}

.btn-logout {
  background: #ff4757;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
}

.btn-logout:hover {
  background: #ff3838;
}

/* ===== Pricing Page Styles ===== */
.pricing-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--bg) 0%, #1a2332 100%);
}

/* Navigation Updates */
.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover {
  background: rgba(91, 156, 255, 0.1);
  color: var(--primary);
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Pricing Hero */
.pricing-hero {
  padding: 80px 24px 40px;
  text-align: center;
}

.pricing-hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.pricing-title {
  font-size: 48px;
  font-weight: 700;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, var(--primary), #2ea043);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-subtitle {
  font-size: 20px;
  color: var(--muted);
  margin: 0 0 48px 0;
  line-height: 1.6;
}

/* Billing Toggle */
.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
}

.toggle-label {
  font-size: 16px;
  color: var(--text);
  font-weight: 500;
}

.savings {
  background: #2ea043;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 32px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #34495e;
  transition: .3s;
  border-radius: 32px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(28px);
}

/* Pricing Cards */
.pricing-cards-section {
  padding: 0 24px 80px;
}

.pricing-cards-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.pricing-card {
  background: var(--card);
  border: 2px solid #23304d;
  border-radius: 20px;
  padding: 32px 24px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary);
  box-shadow: 0 20px 40px rgba(91, 156, 255, 0.15);
}

.pricing-card.featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(91, 156, 255, 0.05), rgba(46, 160, 67, 0.05));
  transform: scale(1.05);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), #2ea043);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.card-header {
  text-align: center;
  margin-bottom: 32px;
}

.plan-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.card-header h3 {
  font-size: 24px;
  margin: 0 0 16px 0;
  color: var(--text);
}

.price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin-bottom: 8px;
}

.currency {
  font-size: 20px;
  color: var(--primary);
  font-weight: 600;
}

.amount {
  font-size: 48px;
  font-weight: 700;
  color: var(--primary);
}

.period {
  font-size: 16px;
  color: var(--muted);
}

.yearly-savings {
  font-size: 14px;
  color: #2ea043;
  font-weight: 500;
}

.card-features {
  flex-grow: 1;
  margin-bottom: 32px;
}

.card-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card-features li {
  padding: 8px 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.card-cta {
  text-align: center;
}

.btn-plan {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 12px;
}

.btn-trial {
  background: linear-gradient(135deg, var(--muted), #34495e);
  color: white;
}

.btn-starter {
  background: linear-gradient(135deg, var(--primary), #4a8ae8);
  color: white;
}

.btn-professional {
  background: linear-gradient(135deg, var(--primary), #2ea043);
  color: white;
}

.btn-enterprise {
  background: linear-gradient(135deg, #2ea043, #28a745);
  color: white;
}

.btn-plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.plan-note {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* Features Comparison */
.features-comparison {
  padding: 80px 24px;
  background: var(--card);
}

.comparison-header {
  text-align: center;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.comparison-header h2 {
  font-size: 32px;
  margin: 0 0 16px 0;
  color: var(--text);
}

.comparison-header p {
  font-size: 18px;
  color: var(--muted);
  margin: 0;
}

.comparison-table-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}

.comparison-table th,
.comparison-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #23304d;
}

.comparison-table th {
  background: #23304d;
  color: var(--text);
  font-weight: 600;
}

.comparison-table td {
  color: var(--text);
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

/* FAQ Section */
.pricing-faq {
  padding: 80px 24px;
}

.faq-header {
  text-align: center;
  margin-bottom: 48px;
}

.faq-header h2 {
  font-size: 32px;
  margin: 0;
  color: var(--text);
}

.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  gap: 24px;
}

.faq-item {
  background: var(--card);
  border: 1px solid #23304d;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s;
}

.faq-item:hover {
  border-color: var(--primary);
}

.faq-item.active {
  border-color: var(--primary);
  background: rgba(91, 156, 255, 0.05);
}

.faq-item h3 {
  font-size: 18px;
  margin: 0 0 16px 0;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item h3:after {
  content: "+";
  font-size: 24px;
  color: var(--primary);
}

.faq-item.active h3:after {
  content: "−";
}

.faq-item p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s;
}

.faq-item.active p {
  max-height: 200px;
  margin-top: 16px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-title, .pricing-title {
    font-size: 36px;
  }
  
  .hero-subtitle, .pricing-subtitle {
    font-size: 18px;
  }
  
  .pricing-cards, .pricing-cards-container {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .hero, .pricing-hero {
    padding: 40px 16px;
  }
  
  .nav-container {
    padding: 0 16px;
  }
  
  .app .header {
    flex-direction: column;
    gap: 12px;
  }
  
  .controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  .pricing-card.featured {
    transform: none;
  }

  .comparison-table {
    font-size: 14px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 12px 8px;
  }

  .nav-actions {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
  }

  .billing-toggle {
    flex-direction: column;
    gap: 12px;
  }
}

/* 极小屏幕优化 */
@media (max-width: 480px) {
  .nav-container {
    padding: 10px 12px;
  }
  
  .logo h1 {
    font-size: 16px;
  }
  
  .nav-actions {
    gap: 4px;
  }
  
  .nav-link {
    font-size: 12px;
    padding: 4px 8px;
    white-space: nowrap;
  }
  
  .btn-login, .btn-logout {
    font-size: 11px;
    padding: 4px 8px;
    white-space: nowrap;
  }
  
  .user-info {
    font-size: 11px;
  }
}

/* ===== Footer Styles ===== */
.footer {
  background: rgba(18, 26, 43, 0.95);
  border-top: 1px solid rgba(91, 156, 255, 0.15);
  padding: 20px 0;
  margin-top: 40px;
  backdrop-filter: blur(10px);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.footer-link:hover {
  color: var(--primary);
  background: rgba(91, 156, 255, 0.1);
  text-decoration: none;
}

.footer-separator {
  color: var(--muted);
  font-size: 14px;
  opacity: 0.5;
}

.footer-copyright {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 768px) {
  .footer {
    padding: 15px 0;
    margin-top: 30px;
  }
  
  .footer-content {
    padding: 0 15px;
  }
  
  .footer-links {
    gap: 8px;
  }
  
  .footer-link,
  .footer-separator,
  .footer-copyright {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    gap: 5px;
  }
  
  .footer-separator {
    display: none;
  }
}

/* ===== Service Selection Styles ===== */
.service-selection {
  margin-bottom: 24px;
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid rgba(91, 156, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
}

.mode-selector {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 20px;
  border: 2px solid #23304d;
  border-radius: 12px;
  background: rgba(11, 16, 32, 0.8);
  transition: all 0.2s ease;
}

.radio-option:hover {
  border-color: var(--primary);
  background: rgba(91, 156, 255, 0.05);
}

.radio-option input[type="radio"] {
  display: none;
}

.radio-option input[type="radio"]:checked + .radio-label {
  color: var(--primary);
}

.radio-option:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: rgba(91, 156, 255, 0.1);
  box-shadow: 0 0 0 2px rgba(91, 156, 255, 0.2);
}

.radio-label {
  color: var(--text);
  font-weight: 500;
  font-size: 16px;
}

.results-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.save-records-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #3b82f6;
  background-color: rgba(11, 16, 32, 0.8);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 3px;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

.checkbox-option input[type="checkbox"]:checked {
  background-color: #3b82f6;
  border-color: #3b82f6;
}

.checkbox-option input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 1px;
  color: white;
  font-size: 10px;
  font-weight: bold;
}

.checkbox-option input[type="checkbox"]:hover {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
}

.checkbox-label {
  color: #e2e8f0;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}

.option-tooltip {
  color: #94a3b8;
  font-size: 14px;
  cursor: help;
  transition: color 0.2s ease;
  position: relative;
}

.option-tooltip:hover {
  color: #3b82f6;
}



.option-tooltip:hover::before,
.option-tooltip.tooltip-active::before {
  content: '';
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(11, 16, 32, 0.95);
  z-index: 1000;
  pointer-events: none;
}

/* 基础悬浮提示样式 */
.option-tooltip:hover::after,
.option-tooltip.tooltip-active::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(11, 16, 32, 0.95);
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: normal;
  max-width: 280px;
  width: max-content;
  z-index: 1000;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  text-align: center;
  line-height: 1.4;
}

/* 移动端悬浮提示优化 */
@media (max-width: 768px) {
  .option-tooltip:hover::after,
  .option-tooltip.tooltip-active::after {
    max-width: 250px;
    font-size: 11px;
    padding: 6px 10px;
    bottom: 130%;
  }
  
  .option-tooltip:hover::before,
  .option-tooltip.tooltip-active::before {
    bottom: 120%;
  }
}

@media (max-width: 480px) {
  .option-tooltip:hover::after,
  .option-tooltip.tooltip-active::after {
    max-width: 200px;
    font-size: 10px;
    padding: 5px 8px;
    bottom: 135%;
  }
  
  .option-tooltip:hover::before,
  .option-tooltip.tooltip-active::before {
    bottom: 125%;
  }
  
  .results-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .save-records-option {
    align-self: flex-end;
  }
}





/* ===== Language Selection Styles ===== */
.language-selection {
  margin-bottom: 24px;
  background: rgba(18, 26, 43, 0.8);
  border: 1px solid rgba(91, 156, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
}

.language-row {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.language-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
  position: relative;
  z-index: 1;
}

.language-group label {
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}

.language-select {
  background: var(--bg);
  border: 1px solid #23304d;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.language-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(91, 156, 255, 0.2);
}

.language-select:hover {
  border-color: var(--primary);
}

.language-select option {
  background: var(--bg);
  color: var(--text);
  padding: 8px;
}

/* ===== Custom Select Styles ===== */
.custom-select {
  position: relative;
  width: 100%;
}

.select-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid #23304d;
  border-radius: 8px;
  padding: 10px 35px 10px 12px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-input:focus,
.select-input:hover,
.custom-select.active .select-input {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(91, 156, 255, 0.2);
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.2s ease;
}

.custom-select.active .select-arrow {
  transform: translateY(-50%) rotate(180deg);
}

.select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #0b1020;
  border: 1px solid rgba(91, 156, 255, 0.3);
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  pointer-events: none;
}

.custom-select.active .select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* 确保激活的下拉框在最顶层，防止被其他元素遮挡 */
.custom-select.active {
  z-index: 1000000;
}

.custom-select.active .select-dropdown {
  z-index: 1000001;
}

.dropdown-search {
  padding: 8px;
  border-bottom: 1px solid #23304d;
  background: #0b1020;
}

.search-input {
  width: 100%;
  background: #121a2b;
  border: 1px solid #23304d;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(91, 156, 255, 0.1);
}

.dropdown-options {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px 0;
  background: #0b1020;
}

.option {
  padding: 8px 12px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 14px;
  border-radius: 4px;
  margin: 0 4px;
}

.option:hover {
  background: rgba(91, 156, 255, 0.1);
  color: var(--primary);
}

.option.selected {
  background: rgba(91, 156, 255, 0.15);
  color: var(--primary);
  font-weight: 500;
}

.option.hidden {
  display: none;
}

/* 滚动条样式 */
.dropdown-options::-webkit-scrollbar {
  width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background: #23304d;
  border-radius: 3px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ===== Mobile Responsiveness for New Components ===== */
@media (max-width: 768px) {
  .mode-selector {
    flex-direction: column;
    gap: 12px;
  }
  
  .radio-option {
    justify-content: center;
    padding: 16px 20px;
  }
  
  .language-row {
    flex-direction: column;
    gap: 16px;
  }
  
  .language-group {
    min-width: 100%;
  }
  
  .language-select,
  .select-input {
    width: 100%;
  }
  
  .service-selection,
  .language-selection {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .select-dropdown {
    max-height: 250px;
    /* 在移动端使用更高的z-index确保显示在顶层 */
    z-index: 1000002 !important;
  }
  
  .dropdown-options {
    max-height: 180px;
  }
  
  /* 移动端下拉框特殊处理 - 确保不被其他语言组遮挡 */
  .custom-select.active {
    z-index: 1000001 !important;
  }
  
  .custom-select.active .select-dropdown {
    z-index: 1000002 !important;
  }
  
  /* 确保语言选择容器在移动端有正确的层级关系 */
  .language-group {
    position: relative;
  }
  
  .language-group.active-dropdown {
    z-index: 1000000;
  }
}

/* ===== Animation Effects ===== */
.language-group {
  transition: opacity 0.3s ease;
}

.language-group[style*="display: none"] {
  opacity: 0;
}

.language-group:not([style*="display: none"]) {
  opacity: 1;
}

/* Cookies Consent Popup Styles */
#cookies-consent-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(18, 26, 43, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  z-index: 10000;
  transition: all 0.3s ease;
  transform: translateY(0);
  opacity: 1;
}

.consent-content {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.consent-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.consent-text {
  flex: 1;
  min-width: 0;
}

.consent-text h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.consent-text p {
  margin: 0 0 12px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.consent-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.consent-links a:hover {
  text-decoration: underline;
}

.consent-buttons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.btn-accept, .btn-decline {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-accept {
  background: var(--primary);
  color: white;
}

.btn-accept:hover {
  background: #4a85cc;
  transform: translateY(-1px);
}

.btn-decline {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-decline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .consent-content {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    gap: 16px;
  }
  
  .consent-icon {
    font-size: 24px;
  }
  
  .consent-text h3 {
    font-size: 16px;
  }
  
  .consent-text p {
    font-size: 13px;
  }
  
  .consent-buttons {
    width: 100%;
    justify-content: center;
  }
  
  .btn-accept, .btn-decline {
    flex: 1;
    max-width: 120px;
  }
}

@media (max-width: 480px) {
  .consent-content {
    padding: 12px;
  }
  
  .consent-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-accept, .btn-decline {
    max-width: none;
  }
}


