/* ========== 主题切换按钮样式 ========== */

/* 桌面端按钮 */
.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
  vertical-align: middle;
  position: relative;
}
.theme-toggle-btn:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

/* 移动端按钮 */
.theme-toggle-mobile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
  vertical-align: middle;
  margin-right: 2px;
}
.theme-toggle-mobile:hover {
  background: rgba(255,255,255,0.1);
  color: #ffffff;
}

/* 响应式 */
@media (min-width: 768px) {
  .theme-toggle-mobile { display: none !important; }
}
@media (max-width: 767px) {
  .theme-toggle-btn { display: none !important; }
}

/* 图标默认显示规则（深色模式下：显示太阳，隐藏月亮） */
.icon-sun { display: block; }
.icon-moon { display: none; }

/* ===== 浅色主题覆盖 ===== */

/* 浅色模式：导航栏内按钮 */
[data-theme=light] nav .theme-toggle-btn,
[data-theme=light] nav .theme-toggle-mobile {
  background: #FFFFFF !important;
  border: 1px solid #E2E6EF !important;
  color: #4b5563 !important;
}
[data-theme=light] nav .theme-toggle-btn:hover,
[data-theme=light] nav .theme-toggle-mobile:hover {
  background: #EBF0FB !important;
  border-color: #3B6FE8 !important;
  color: #3B6FE8 !important;
}

/* 浅色模式：图标切换（显示月亮，隐藏太阳） */
[data-theme=light] .icon-sun { display: none !important; }
[data-theme=light] .icon-moon { display: block !important; }

/* 浅色模式：非导航栏内的按钮（页面其他位置） */
[data-theme=light] .theme-toggle-btn:not(nav *),
[data-theme=light] .theme-toggle-mobile:not(nav *) {
  background: #F1F3F7 !important;
  border: 1px solid #E2E6ED !important;
  color: #4b5563 !important;
}

/* ===== 导航栏 浅色模式 ===== */
[data-theme=light] nav {
  background: #ffffff !important;
  border-bottom: 1px solid #E2E6ED !important;
}

/* ===== Hero区域浅色模式 ===== */
[data-theme=light] .hero h1 {
  color: #1A1D26 !important;
  -webkit-text-fill-color: #1A1D26 !important;
}
[data-theme=light] .hero .hero-subtitle,
[data-theme=light] .hero p {
  color: #5A6478 !important;
}

/* ===== Logo文字 浅色模式 ===== */
[data-theme=light] nav span.text-white,
[data-theme=light] nav .logo-text,
[data-theme=light] nav a span {
  color: #1A1D26 !important;
}
[data-theme=light] nav span {
  color: #1A1D26 !important;
}

/* ===== Hero CTA按钮 浅色模式 ===== */
[data-theme=light] nav a[href=/register].text-white {
  color: #ffffff !important;
}

/* ===== Hero其他文字 ===== */
[data-theme=light] .text-white {
  color: #1A1D26 !important;
}


/* ===== 免费试用按钮文字：最高优先级，确保白字可见 ===== */
[data-theme=light] nav .flex-shrink-0 a[href=/register] {
  color: #ffffff !important;
}
[data-theme=light] .flex-shrink-0 > a[href=/register] {
  color: #ffffff !important;
}

/* ===== 免费试用按钮（通用规则）：覆盖所有父级结构 ===== */
[data-theme=light] body a[href="/register"].bg-gradient-to-r,
[data-theme=light] body a[href="/register"].text-white {
  color: #ffffff !important;
}

/* ===== 移动端汉堡菜单免费试用：浅色模式浅蓝渐变+白字 ===== */
[data-theme=light] #mobileNav a[href="/register"],
[data-theme=light] .mobile-nav a[href="/register"],
[data-theme=light] [id*="mobile"][id*="Nav"] a[href="/register"],
[data-theme=light] .nav-mobile a[href="/register"] {
  background: linear-gradient(135deg, #3775F5, #5B8DEF) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(55, 117, 245, 0.4) !important;
  border: none !important;
}
