:root {
  --primary-color: #3b82f6;
  --primary-hover: #2563eb;
  --bg-light: #f9fafb;
  --bg-dark: #1f2937;
  --text-light: #374151;
  --text-dark: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

/* 深色模式变量 */
[data-theme="dark"] {
  --background-color: var(--bg-dark);
  --text-color: var(--text-dark);
  --border-color: #374151;
  --card-bg: #2d3748;
  --input-bg: #1a202c;
  --hover-bg: #4a5568;
  --shadow-color: rgba(0, 0, 0, 0.4);
}

/* 浅色模式变量 */
[data-theme="light"] {
  --background-color: var(--bg-light);
  --text-color: var(--text-light);
  --border-color: #e5e7eb;
  --card-bg: #ffffff;
  --input-bg: #f9fafb;
  --hover-bg: #f3f4f6;
  --shadow-color: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  transition: var(--transition);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.logo {
  margin-right: 0.75rem;
  color: var(--primary-color);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 1.875rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

h2 svg {
  margin-right: 0.5rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.subtitle {
  color: var(--text-color);
  opacity: 0.8;
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
  justify-content: center;
}

.tab {
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: flex;
  align-items: center;
  transition: var(--transition);
  margin: 0 0.5rem;
}

.tab svg {
  margin-right: 0.5rem;
}

.tab:hover {
  color: var(--primary-color);
}

.tab.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  font-weight: 500;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

.card {
  background-color: var(--card-bg);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.input-card {
  border-top: 3px solid var(--primary-color);
}

.output-card {
  border-top: 3px solid #10b981; /* 绿色 */
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dropzone {
  border: 2px dashed var(--border-color);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.dropzone svg {
  margin-bottom: 1rem;
  color: var(--primary-color);
  opacity: 0.7;
}

.dropzone:hover {
  border-color: var(--primary-color);
  background-color: var(--hover-bg);
}

.dropzone.dragover {
  border-color: var(--primary-color);
  background-color: var(--hover-bg);
}

.dropzone-hint {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-family: inherit;
  transition: var(--transition);
}

textarea {
  height: 200px;
  resize: vertical;
  margin-bottom: 1.5rem;
}

textarea:focus, input[type="text"]:focus, input[type="number"]:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.form-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.options-group {
  background-color: var(--input-bg);
  padding: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1rem;
}

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

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.checkbox-group:last-child {
  margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 0.25rem;
}

.checkbox-group label {
  margin-bottom: 0;
  font-weight: 400;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button svg {
  margin-right: 0.5rem;
}

button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

button:active {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-block {
  display: block;
  width: 100%;
}

.output-table {
  overflow-x: auto;
  margin-bottom: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.output-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.output-table thead {
  background-color: var(--hover-bg);
}

.output-table th, .output-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  word-break: break-word;
  line-height: 1.4;
}

.output-table th {
  font-weight: 600;
  color: var(--primary-color);
}

.output-table tr:hover {
  background-color: rgba(59, 130, 246, 0.05);
}

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

/* 暗色模式下的表格样式 */
[data-theme="dark"] .output-table thead {
  background-color: #2d3748;
}

[data-theme="dark"] .output-table tr:hover {
  background-color: rgba(59, 130, 246, 0.1);
}

.btn-group {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.btn-group button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.btn-group button svg {
  margin-right: 0.5rem;
}

.btn-group button:hover {
  background-color: var(--primary-hover);
}

.mt-4 {
  margin-top: 1.5rem;
}

/* 主题切换按钮 */
.theme-switch {
  position: fixed !important;
  bottom: 1.5rem !important;
  right: 1.5rem !important;
  width: 2.8rem !important;
  height: 2.8rem !important;
  border-radius: 50% !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(59, 130, 246, 0.5) !important;
  color: var(--primary-color) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  z-index: 1001 !important;
  border: none !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.theme-switch:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* 暗色模式下按钮样式调整 */
[data-theme="dark"] .theme-switch,
[data-theme="dark"] #languageSwitchBtn.lang-switch {
  background-color: rgba(45, 55, 72, 0.9) !important;
  border: 1px solid rgba(96, 165, 250, 0.5) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .theme-switch:hover,
[data-theme="dark"] #languageSwitchBtn.lang-switch:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.theme-switch-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 50%;
}

.theme-switch::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), #4f46e5);
  opacity: 0;
  border-radius: 50%;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.theme-switch:hover::before {
  opacity: 0.15;
}

.theme-switch:active {
  transform: translateY(0) rotate(0);
}

.moon-icon, .sun-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: center;
  transition: opacity 0.3s ease, transform 0.5s ease;
  color: var(--primary-color);
}

.moon-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-30deg) scale(0.7);
}

.sun-icon {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(30deg) scale(0.7);
}

[data-theme="dark"] .moon-icon {
  opacity: 0;
}

[data-theme="dark"] .sun-icon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0) scale(1);
}

[data-theme="light"] .moon-icon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0) scale(1);
}

[data-theme="light"] .sun-icon {
  opacity: 0;
}

.hidden {
  display: none !important;
}

.instruction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  text-align: center;
  color: var(--text-color);
  opacity: 0.7;
}

.instruction svg {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* 错误和警告样式 */
.error, .warning {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.error {
  background-color: rgba(239, 68, 68, 0.1);
  border-left: 4px solid #ef4444;
  color: #ef4444;
}

.warning {
  background-color: rgba(245, 158, 11, 0.8);
  border-left: 4px solid #f59e0b;
  color: #ffffff;
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: slideDown 0.3s ease;
  font-weight: 500;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(245, 158, 11, 0.9);
}

@keyframes slideDown {
  from { transform: translate(-50%, -20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.warning.fade-out {
  animation: fadeOut 1s ease;
}

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

/* 深色模式下的警告样式 */
[data-theme="dark"] .warning {
  background-color: rgba(245, 158, 11, 0.9);
  color: #ffffff;
}

.close-button {
  margin-left: 1rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  padding: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.close-button:hover {
  background: none;
  opacity: 0.7;
}

/* 表格选项卡样式 */
.table-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
  overflow-x: auto;
  padding-bottom: 1px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.table-tabs::-webkit-scrollbar {
  height: 4px;
}

.table-tabs::-webkit-scrollbar-track {
  background: var(--input-bg);
}

.table-tabs::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 4px;
}

.table-tabs .tab {
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.2s;
  color: var(--text-color);
  opacity: 0.7;
}

.table-tabs .tab:hover {
  color: var(--primary-color);
  opacity: 1;
}

.table-tabs .tab.active {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  opacity: 1;
  font-weight: 500;
}

/* 多表格内容样式 */
.multi-tables {
  margin-bottom: 1.5rem;
}

.multi-tables .tab-content {
  display: none;
}

.multi-tables .tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* 确保多表格内容不受全局tab-content影响 */
#md2excelContent.tab-content .multi-tables .tab-content,
#excel2mdContent.tab-content .multi-tables .tab-content {
  display: none;
}

#md2excelContent.tab-content .multi-tables .tab-content.active,
#excel2mdContent.tab-content .multi-tables .tab-content.active {
  display: block;
}

/* 加载中动画 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 预览样式 */
.preview {
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  max-height: 350px;
  overflow-y: auto;
  margin-bottom: 1rem;
  position: relative;
}

.preview pre {
  font-family: 'Consolas', 'Courier New', monospace;
  white-space: pre;
  overflow-x: auto;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-color);
}

/* 自定义滚动条 */
.preview::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.preview::-webkit-scrollbar-track {
  background: var(--input-bg);
  border-radius: 4px;
}

.preview::-webkit-scrollbar-thumb {
  background-color: rgba(59, 130, 246, 0.3);
  border-radius: 4px;
}

.preview::-webkit-scrollbar-thumb:hover {
  background-color: rgba(59, 130, 246, 0.5);
}

/* Markdown表格样式增强 */
.table-enhanced pre {
  line-height: 1.6;
}

/* 暗色模式下的预览颜色调整 */
[data-theme="dark"] .preview {
  background-color: #1a202c;
  border-color: #2d3748;
}

[data-theme="dark"] .preview pre {
  color: #e2e8f0;
}

/* 移动设备下的预览高度调整 */
@media (max-width: 640px) {
  .preview {
    max-height: 250px;
  }
}

/* 页脚样式 */
footer {
  text-align: center;
  margin-top: 3rem;
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.7;
  border-top: 1px solid var(--border-color);
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.footer-links a {
  color: var(--primary-color);
  text-decoration: none;
}

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

.divider {
  color: var(--text-color);
  opacity: 0.5;
}

/* 对话框样式 */
.dialog {
  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: 1000;
}

.dialog-content {
  background-color: var(--card-bg);
  border-radius: 0.75rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-md);
  max-height: 90vh;
  overflow-y: auto;
}

.dialog h2 {
  margin-bottom: 1rem;
}

.dialog p {
  margin-bottom: 1rem;
}

.dialog ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.dialog li {
  margin-bottom: 0.5rem;
}

.dialog button {
  margin-top: 1rem;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.action-buttons button {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.action-buttons button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.action-buttons button svg {
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* 移动设备优化 */
@media (max-width: 640px) {
  .action-buttons {
    grid-template-columns: 1fr;
  }
  
  .sheet-metadata {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* 页脚链接统一样式 */
footer a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  text-decoration: underline;
  color: var(--primary-hover);
}

/* 暗色模式下的链接颜色调整 */
[data-theme="dark"] footer a {
  color: #60a5fa; /* 更明亮的蓝色 */
}

[data-theme="dark"] footer a:hover {
  color: #93c5fd; /* 悬停时更亮的蓝色 */
} 

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.excel-info {
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.excel-info h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.excel-info p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.excel-info p:last-child {
  margin-bottom: 0;
}

.excel-info strong {
  font-weight: 500;
  color: var(--primary-color);
}

.output-header {
  margin-bottom: 1rem;
}

.output-header h3 {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.sheet-info {
  margin-bottom: 1rem;
  background-color: rgba(59, 130, 246, 0.05);
  border-radius: 0.5rem;
  padding: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.1);
}

.sheet-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.sheet-metadata p {
  margin: 0;
  font-size: 0.9rem;
}

.sheet-metadata strong {
  color: var(--primary-color);
} 

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .card {
    padding: 1.25rem;
  }
  
  .dropzone {
    min-height: 150px;
    padding: 1.5rem;
  }
  
  .dropzone svg {
    width: 24px;
    height: 24px;
  }
  
  .tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .tab {
    padding: 0.5rem 1rem;
    margin: 0;
  }
  
  .preview {
    max-height: 200px;
  }
  
  .action-buttons {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  .instruction {
    height: 150px;
  }
  
  .form-controls {
    gap: 1rem;
  }
  
  .warning {
    width: 90%;
    max-width: 100%;
    padding: 0.75rem 1rem;
  }
  
  .table-tabs {
    gap: 0.3rem;
  }
  
  .output-table th, .output-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
  }
  
  .theme-switch {
    width: 2.5rem !important;
    height: 2.5rem !important;
    bottom: 1.25rem !important;
    right: 1.25rem !important;
  }
  
  #languageSwitchBtn.lang-switch {
    width: 2.5rem !important;
    height: 2.5rem !important;
    bottom: 1.25rem !important;
    right: 4.25rem !important;
  }
}

/* 增加额外的小屏幕优化 */
@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }
  
  .dropzone {
    min-height: 120px;
    padding: 1rem;
  }
  
  .dropzone p {
    font-size: 0.9rem;
  }
  
  .dropzone-hint {
    font-size: 0.75rem;
  }
  
  h1 {
    font-size: 1.3rem;
  }
  
  h2 {
    font-size: 1.1rem;
  }
  
  .subtitle {
    font-size: 0.9rem;
  }
  
  .btn-group button {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  
  .action-buttons button {
    padding: 0.5rem;
    font-size: 0.85rem;
  }
  
  textarea {
    height: 150px;
  }
  
  .sheet-metadata p {
    font-size: 0.8rem;
  }
  
  .theme-switch {
    width: 2.5rem !important;
    height: 2.5rem !important;
    bottom: 1.25rem !important;
    right: 1.25rem !important;
  }
  
  #languageSwitchBtn.lang-switch {
    width: 2.5rem !important;
    height: 2.5rem !important;
    bottom: 1.25rem !important;
    right: 4.25rem !important;
  }
}

/* 语言切换按钮样式 - 重新定义并增强按钮可见性 */
#languageSwitchBtn.lang-switch {
  position: fixed !important;
  bottom: 1.5rem !important;
  right: 5rem !important; 
  width: 2.8rem !important;
  height: 2.8rem !important;
  border-radius: 50% !important;
  background-color: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(59, 130, 246, 0.5) !important;
  color: var(--primary-color) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  z-index: 9999 !important; /* 最高层级 */
  overflow: visible !important;
  padding: 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

#languageSwitchBtn.lang-switch:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

#languageSwitchBtn.lang-switch:active {
  transform: translateY(0) !important;
}

#languageSwitchBtn.lang-switch svg {
  position: absolute !important;
  top: 45% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  color: var(--primary-color) !important;
  width: 16px !important;
  height: 16px !important;
}

#languageSwitchBtn .lang-indicator {
  position: absolute !important;
  bottom: 0.45rem !important;
  font-size: 0.65rem !important;
  font-weight: bold !important;
  color: var(--primary-color) !important;
  line-height: 1 !important;
}

/* 防止与主题切换按钮重叠 */
.theme-switch {
  bottom: 1.5rem !important;
  right: 1.5rem !important;
}

/* 语言切换通知 */
.language-notification {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: notification-slide-in 0.5s ease;
}

@keyframes notification-slide-in {
  from { 
    transform: translate(-50%, -100%); 
    opacity: 0; 
  }
  to { 
    transform: translate(-50%, 0); 
    opacity: 1; 
  }
}

.notification-fade-out {
  animation: notification-fade-out 0.8s ease forwards;
}

@keyframes notification-fade-out {
  from { 
    transform: translate(-50%, 0); 
    opacity: 1; 
  }
  to { 
    transform: translate(-50%, -20px); 
    opacity: 0; 
  }
}