/* ==========================================================================
   ez-to-ai 官网设计系统 - Stitch 风格动态顶栏与状态导航 (Dynamic Island Header)
   Aligned with Google Stitch Header Design
   ========================================================================== */

.header-island-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: var(--z-header);
  padding: 14px 20px;
  pointer-events: none;
}

.dynamic-island-navbar {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

/* 品牌区 (Stitch BETA 标志风格) */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  transition: opacity var(--duration-fast) var(--transition-stitch);
  flex-shrink: 0;
}

.nav-brand:hover {
  opacity: 0.88;
}

.nav-brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  font-family: var(--font-family-base);
  transition: color 150ms ease;
}

.nav-version-tag {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #e2e8f0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 150ms ease;
}

/* 导航链接居中胶囊 (Liquid Glass Capsule) - 视口绝对居中 */
.nav-links-capsule {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(18, 20, 29, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-tertiary);
  transition: all var(--duration-fast) var(--transition-stitch);
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 600;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.25);
}

/* 动态岛右侧控制组 (与创作中心 WebAccountBar 视觉与右上角对齐) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ---- 1. 黑夜白天切换组件 (ThemeSwitcher) ---- */
.ThemeSwitcher {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(28px, auto));
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(20, 23, 34, 0.85);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ThemeSwitcher-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
  transition: all 120ms ease;
}

.ThemeSwitcher-option[aria-pressed='true'] {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.ThemeSwitcher-option[aria-pressed='false']:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ThemeSwitcher-option:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 1px;
}

/* ---- 2. 中英切换分段胶囊组件 (LanguageSwitcher) ---- */
.LanguageSwitcher {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(36px, auto));
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(20, 23, 34, 0.85);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.LanguageSwitcher-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 24px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 120ms ease;
}

.LanguageSwitcher-option[aria-pressed='true'] {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

.LanguageSwitcher-option[aria-pressed='false']:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.LanguageSwitcher-option:focus-visible {
  outline: 2px solid #4f46e5;
  outline-offset: 1px;
}

/* ---- 3. 创作中心按键 (WebsiteHomeButton 视觉家族) ---- */
.WebsiteHomeButton {
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(20, 23, 34, 0.85);
  color: #94a3b8;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.WebsiteHomeButton:hover {
  background: rgba(99, 102, 241, 0.16);
  color: #a5b4fc;
}

/* ---- 4. 登录按键 (WebAccountBar-signIn) ---- */
.WebAccountBar-signIn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(20, 23, 34, 0.85);
  color: #f1f3f4;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  height: 28px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 120ms ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.WebAccountBar-signIn:hover {
  background: rgba(30, 34, 50, 0.95);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

/* ---- 5. 日间浅色主题适配 (Light Mode: Scheme C Frost) ---- */
[data-theme='light'] body,
.theme-light body {
  background-color: #f8fafc;
  color: #0f172a;
}

[data-theme='light'] #aurora-canvas,
.theme-light #aurora-canvas {
  opacity: 1;
  filter: none;
}

[data-theme='light'] .ambient-grid,
.theme-light .ambient-grid {
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(251, 146, 60, 0.08) 0%, transparent 65%),
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
}

[data-theme='light'] .scrolly-hint-container,
.theme-light .scrolly-hint-container {
  color: #64748b;
}

[data-theme='light'] .mouse-wheel-icon,
.theme-light .mouse-wheel-icon {
  border-color: rgba(15, 23, 42, 0.25);
}

[data-theme='light'] .mouse-wheel-dot,
.theme-light .mouse-wheel-dot {
  background: #64748b;
}

[data-theme='light'] .btn-scene-step,
.theme-light .btn-scene-step {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #475569;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

[data-theme='light'] .btn-scene-step:hover:not(:disabled),
.theme-light .btn-scene-step:hover:not(:disabled) {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.25);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
}

[data-theme='light'] .nav-brand-title,
.theme-light .nav-brand-title {
  color: #0f172a;
}

[data-theme='light'] .nav-version-tag,
.theme-light .nav-version-tag {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.15);
  color: #475569;
}

[data-theme='light'] .nav-links-capsule,
.theme-light .nav-links-capsule {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

[data-theme='light'] .nav-link,
.theme-light .nav-link {
  color: #64748b;
}

[data-theme='light'] .nav-link:hover,
.theme-light .nav-link:hover {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.06);
}

[data-theme='light'] .nav-link.active,
.theme-light .nav-link.active {
  color: #0f172a;
  background: rgba(15, 23, 42, 0.1);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06);
}

[data-theme='light'] .ThemeSwitcher,
.theme-light .ThemeSwitcher,
[data-theme='light'] .LanguageSwitcher,
.theme-light .LanguageSwitcher {
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

[data-theme='light'] .ThemeSwitcher-option,
.theme-light .ThemeSwitcher-option,
[data-theme='light'] .LanguageSwitcher-option,
.theme-light .LanguageSwitcher-option {
  color: #64748b;
}

[data-theme='light'] .ThemeSwitcher-option[aria-pressed='true'],
.theme-light .ThemeSwitcher-option[aria-pressed='true'],
[data-theme='light'] .LanguageSwitcher-option[aria-pressed='true'],
.theme-light .LanguageSwitcher-option[aria-pressed='true'] {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

[data-theme='light'] .ThemeSwitcher-option[aria-pressed='false']:hover,
.theme-light .ThemeSwitcher-option[aria-pressed='false']:hover,
[data-theme='light'] .LanguageSwitcher-option[aria-pressed='false']:hover,
.theme-light .LanguageSwitcher-option[aria-pressed='false']:hover {
  background: transparent;
  color: #0f172a;
}

[data-theme='light'] .WebsiteHomeButton,
.theme-light .WebsiteHomeButton {
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  color: #64748b;
}

[data-theme='light'] .WebsiteHomeButton:hover,
.theme-light .WebsiteHomeButton:hover {
  background: #ffffff;
  color: #4f46e5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

[data-theme='light'] .WebAccountBar-signIn,
.theme-light .WebAccountBar-signIn {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

[data-theme='light'] .WebAccountBar-signIn:hover,
.theme-light .WebAccountBar-signIn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #4f46e5;
}

[data-theme='light'] .stitch-hero-title,
.theme-light .stitch-hero-title {
  color: #0f172a;
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
}

[data-theme='light'] .stitch-hero-subtitle,
.theme-light .stitch-hero-subtitle {
  color: #475569;
}

[data-theme='light'] .stitch-hero-price-line,
.theme-light .stitch-hero-price-line {
  color: #047857;
}

/* ---- 5.1 日间浅色主题：场景标题与正文文字翻转 (Light Mode text flip) ----
   白天模式下极光画布是暖白底，黑夜模式的白色场景标题/描述直接叠在上面
   不可读（操作员反馈 2026-09-20），统一翻转为深色。 */
[data-theme='light'] .scene-title,
.theme-light .scene-title {
  color: #0f172a;
  text-shadow: none;
}

[data-theme='light'] .scene-description,
.theme-light .scene-description {
  color: #475569;
}

[data-theme='light'] .scene-category,
.theme-light .scene-category {
  color: #0369a1;
}

/* 下拉抽屉卡片 */
.dynamic-island-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  background: rgba(15, 17, 26, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 16px;
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all var(--duration-normal) var(--transition-spring);
  pointer-events: none;
}

.dynamic-island-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.island-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.island-card-row:last-child {
  border-bottom: none;
}

.island-card-label {
  color: var(--text-tertiary);
}

.island-card-value {
  font-weight: 600;
  color: var(--text-primary);
}

.nav-mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
}
