/* ============================================
   锦玥图像引擎 - 语言切换器样式 v2.0
   参考头部产品（TinyPNG/iLoveIMG）设计
   ============================================ */

/* 语言切换器容器 */
.lang-switcher-wrapper {
  position: relative;
  display: inline-block;
}

/* 语言切换按钮 */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.lang-switcher:hover {
  background: #fff;
  border-color: #10B981;
  color: #10B981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
  transform: translateY(-1px);
}

.lang-switcher[aria-expanded="true"] {
  background: #fff;
  border-color: #10B981;
  color: #10B981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

/* 国旗图标 */
.lang-flag {
  font-size: 16px;
  line-height: 1;
}

/* 语言名称 */
.lang-name {
  white-space: nowrap;
}

/* 下拉箭头 */
.lang-arrow {
  font-size: 10px;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.lang-switcher[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}

/* 下拉菜单 */
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  overflow: hidden;
  animation: langDropdownIn 0.2s ease;
}

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

/* 语言选项 */
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #334155;
  text-align: left;
  transition: all 0.15s ease;
}

.lang-option:hover {
  background: #f8fafc;
  color: #10B981;
}

.lang-option.active {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #059669;
  font-weight: 600;
}

/* 语言选项国旗 */
.lang-option-flag {
  font-size: 18px;
  line-height: 1;
}

/* 语言选项名称 */
.lang-option-name {
  flex: 1;
}

/* 选中标记 */
.lang-option-check {
  color: #10B981;
  font-weight: bold;
}

/* 语言切换动画 */
.i18n-switching {
  animation: i18nFade 0.3s ease;
}

@keyframes i18nFade {
  0% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .lang-switcher {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .lang-name {
    display: none; /* 移动端只显示国旗 */
  }
  
  .lang-dropdown {
    min-width: 140px;
    right: 0;
  }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .lang-switcher {
    background: rgba(30, 41, 59, 0.9);
    border-color: #475569;
    color: #e2e8f0;
  }
  
  .lang-switcher:hover {
    background: #1e293b;
    border-color: #10B981;
  }
  
  .lang-dropdown {
    background: #1e293b;
    border-color: #475569;
  }
  
  .lang-option {
    color: #e2e8f0;
  }
  
  .lang-option:hover {
    background: #334155;
  }
}

/* ============================================
   隐藏云同步状态浮标（手机端界面优化）
   ============================================ */
.sync-status {
  display: none !important;
}

#syncStatus {
  display: none !important;
}
