/* ============================================================
   macOS 风格首页主题（仅作用于首页 hero + 九宫格卡片）
   不影响其他页面、不改任何功能逻辑
   ============================================================ */

/* 全局字体（仅首页卡片与标题继承） */
.home-hero, .home-cards {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ---------- Hero 标题区 ---------- */
.home-hero {
  padding: 56px 24px 12px !important;
  text-align: center;
}
.home-title {
  font-size: clamp(34px, 4.6vw, 54px) !important;
  font-weight: 700 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.025em !important;
  background: linear-gradient(115deg, #0A84FF 0%, #64D2FF 55%, #BF5AF2 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}
.home-desc {
  font-size: 17px !important;
  font-weight: 400 !important;
  letter-spacing: 0.005em !important;
  margin-top: 16px !important;
  opacity: 0.62;
}

/* ---------- 卡片网格 ---------- */
.home-cards {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 18px !important;
  max-width: 1080px !important;
  margin: 28px auto 80px !important;
  padding: 0 24px !important;
}
@media (max-width: 860px) {
  .home-cards { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---------- 单张卡片：macOS 毛玻璃 ---------- */
.home-card {
  position: relative;
  border-radius: 18px !important;
  border: 1px solid rgba(128, 128, 128, 0.14) !important;
  background: rgba(255, 255, 255, 0.055) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    0 8px 28px rgba(0, 0, 0, 0.10) !important;
  padding: 22px 22px 20px !important;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.3s ease,
              background 0.3s ease,
              border-color 0.3s ease !important;
  cursor: pointer;
}
.home-card:hover {
  transform: translateY(-4px) scale(1.01);
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(10, 132, 255, 0.35) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 18px 44px rgba(10, 132, 255, 0.18) !important;
}

/* ---------- 图标：macOS 应用图标小底托 ---------- */
.home-card-icon {
  width: 52px !important;
  height: 52px !important;
  border-radius: 13px !important;
  background: rgba(255, 255, 255, 0.09) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12) inset, 0 1px 0 rgba(255,255,255,0.08);
  font-size: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin-bottom: 14px !important;
}

/* ---------- 卡片文字 ---------- */
.home-card-body h3 {
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
  margin: 0 0 6px 0 !important;
}
.home-card-body p {
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  opacity: 0.58;
  margin: 0 !important;
}

/* ---------- 浅色模式下的卡片反色 ---------- */
/* body.theme-dark 时走上面的半透明白；body 无 theme-dark 才是浅色 */
body:not(.theme-dark) .home-card {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(0, 0, 0, 0.05) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 8px 28px rgba(0, 0, 0, 0.06) !important;
}
body:not(.theme-dark) .home-card:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow:
    0 1px 0 rgba(255,255,255,1) inset,
    0 18px 44px rgba(10, 132, 255, 0.14) !important;
}
body:not(.theme-dark) .home-card-icon {
  background: rgba(0, 0, 0, 0.045) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

/* ============================================================
   v3: 导航栏毛玻璃 + 按钮胶囊化 + 智能生图内页
   ============================================================ */

/* ---------- 导航栏毛玻璃 ---------- */
header.topbar {
  background: rgba(18, 22, 38, 0.72) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei UI", sans-serif;
}
body:not(.theme-dark) header.topbar {
  background: rgba(255, 255, 255, 0.75) !important;
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

/* 导航项胶囊 */
.topbar .nav-btn {
  border-radius: 8px !important;
  padding: 6px 12px !important;
  font-weight: 500 !important;
  transition: background 0.2s ease, color 0.2s ease !important;
}
.topbar .nav-btn.active {
  background: rgba(255, 255, 255, 0.12) !important;
}
body:not(.theme-dark) .topbar .nav-btn.active {
  background: rgba(0, 0, 0, 0.06) !important;
}

/* ---------- 右上角按钮统一胶囊 ---------- */
.topbar .top-recharge-btn,
.topbar .btn-login-register,
.topbar .user-menu-trigger,
.topbar .theme-toggle {
  border-radius: 999px !important;
  font-weight: 500 !important;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease !important;
}
.topbar .top-recharge-btn:hover,
.topbar .btn-login-register:hover,
.topbar .user-menu-trigger:hover {
  transform: scale(1.03);
}

/* 充值：次要按钮（半透明灰，不再橙红抢戏） */
.topbar .top-recharge-btn {
  background: rgba(255, 255, 255, 0.1) !important;
  color: inherit !important;
  border: none !important;
}
body:not(.theme-dark) .topbar .top-recharge-btn {
  background: rgba(0, 0, 0, 0.06) !important;
}

/* 登录/注册：macOS 系统蓝主按钮 */
.topbar .btn-login-register {
  background: #0A84FF !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 10px rgba(10, 132, 255, 0.35) !important;
}
.topbar .btn-login-register:hover {
  background: #1a8fff !important;
}

/* 已登录用户菜单：半透明胶囊 */
.topbar .user-menu-trigger {
  background: rgba(255, 255, 255, 0.1) !important;
  border: none !important;
}
body:not(.theme-dark) .topbar .user-menu-trigger {
  background: rgba(0, 0, 0, 0.06) !important;
}

/* ---------- 智能生图内页：任务条 ---------- */
.gen-task-tabs {
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.055) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(128, 128, 128, 0.14) !important;
  padding: 6px !important;
}
body:not(.theme-dark) .gen-task-tabs {
  background: rgba(255, 255, 255, 0.7) !important;
  border-color: rgba(0, 0, 0, 0.06) !important;
}
.gen-task-tabs .gen-task-tab {
  border-radius: 8px !important;
  font-weight: 500 !important;
}

/* ---------- 智能生图内页：预设 chip 胶囊化 ---------- */
.mode-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}
.mode-item {
  border-radius: 999px !important;
  border: 1px solid rgba(128, 128, 128, 0.18) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 9px 18px !important;
  text-align: center !important;
  transition: all 0.2s ease !important;
}
.mode-item:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  transform: translateY(-1px);
}
.mode-item.active {
  background: #0A84FF !important;
  color: #fff !important;
  border-color: #0A84FF !important;
  box-shadow: 0 2px 12px rgba(10, 132, 255, 0.35) !important;
}
body:not(.theme-dark) .mode-item {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
}
body:not(.theme-dark) .mode-item:hover {
  background: rgba(255, 255, 255, 1) !important;
}

/* ---------- 输入框统一圆角 ---------- */
.input, textarea.input, input[type="text"].input, input[type="number"].input {
  border-radius: 12px !important;
  border: 1px solid rgba(128, 128, 128, 0.22) !important;
}

/* 全局字体（所有页面顶栏继承） */
.topbar, .topbar * {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei UI", sans-serif !important;
}
