/**
 * 主题下拉菜单样式
 */

.theme-menu-wrapper {
  position: relative;
  display: inline-block;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card, #12161b);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 8px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.theme-menu.hidden {
  display: none;
}

.theme-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.theme-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text, #e5e9f0);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.theme-menu-item:hover {
  background: var(--card-hover, rgba(255, 255, 255, 0.06));
}

.theme-menu-item:active {
  transform: scale(0.98);
}

.theme-menu-item .menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.theme-menu-item .menu-text {
  flex: 1;
}

.theme-menu-item.active {
  background: rgba(88, 204, 2, 0.1);
  color: var(--brand, #58CC02);
}

.theme-menu-divider {
  height: 1px;
  background: var(--border, rgba(255, 255, 255, 0.08));
  margin: 6px 0;
}

/* 浅色主题 */
[data-theme="light"] .theme-menu {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .theme-menu-item {
  color: #1a1a2e;
}

[data-theme="light"] .theme-menu-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .theme-menu-item.active {
  background: rgba(88, 204, 2, 0.08);
  color: #3d9600;
}

[data-theme="light"] .theme-menu-divider {
  background: rgba(0, 0, 0, 0.08);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .theme-menu {
    min-width: 160px;
    right: -8px;
  }
  
  .theme-menu-item {
    padding: 12px;
    font-size: 15px;
  }
  
  .theme-menu-item .menu-icon {
    font-size: 18px;
  }
}

/* 动画优化 */
@media (prefers-reduced-motion: reduce) {
  .theme-menu {
    transition: none;
  }
  
  .theme-menu-item {
    transition: none;
  }
}
