/* ============================================
   红展AI - AI 视频生成工具官网
   设计系统：深色蓝紫科技主题
   ============================================ */

/* ================= CSS Variables ================= */
:root {
  /* 主色调 */
  --bg-primary: #07070f;
  --bg-secondary: #0c0c1a;
  --bg-card: #12122a;
  --bg-card-hover: #18183a;
  --bg-elevated: #1a1a35;
  --bg-input: #0e0e22;

  /* 边框 */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-mid: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.15);

  /* 文字 */
  --text-primary: #ffffff;
  --text-secondary: #a8a8c0;
  --text-tertiary: #6b6b88;
  --text-disabled: #4a4a60;

  /* 强调色 */
  --accent-green: #00e676;
  --accent-green-glow: rgba(0, 230, 118, 0.25);
  --accent-purple: #7c3aed;
  --accent-purple-glow: rgba(124, 58, 237, 0.3);
  --accent-blue: #3b82f6;
  --accent-blue-glow: rgba(59, 130, 246, 0.25);
  --accent-orange: #f97316;
  --accent-pink: #ec4899;
  --accent-teal: #14b8a6;

  /* 状态色 */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  /* 渐变 */
  --gradient-hero-1: radial-gradient(ellipse 80% 60% at 20% 30%, rgba(124, 58, 237, 0.25), transparent 60%);
  --gradient-hero-2: radial-gradient(ellipse 60% 80% at 80% 70%, rgba(59, 130, 246, 0.2), transparent 60%);
  --gradient-card-accent: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(59, 130, 246, 0.4));
  --gradient-cta: radial-gradient(ellipse 100% 100% at 50% 50%, rgba(124, 58, 237, 0.15), transparent 50%);

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 0 0 1px rgba(124, 58, 237, 0.2), 0 8px 40px rgba(124, 58, 237, 0.15);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* 动画 */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* 字体 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', monospace;

  /* 布局 */
  --header-height: 64px;
  --max-width: 1280px;
  --content-padding: 24px;
}

/* ================= Reset & Base ================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-blue);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: rgba(124, 58, 237, 0.4);
  color: white;
}

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  color: white;
  box-shadow: 0 2px 12px var(--accent-purple-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-mid);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-xl {
  padding: 18px 40px;
  font-size: 18px;
  border-radius: var(--radius-xl);
  font-weight: 600;
}

.btn-block {
  width: 100%;
}

.btn-feature {
  background: transparent;
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.25);
  padding: 8px 18px;
  font-size: 13px;
  border-radius: var(--radius-full);
}

.btn-feature:hover {
  background: rgba(0, 230, 118, 0.1);
  border-color: var(--accent-green);
}

/* ================= Header ================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(7, 7, 15, 0.95);
  border-bottom-color: var(--border-mid);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-icon {
  transition: transform var(--transition-smooth);
}
.logo-img {
  transition: transform var(--transition-smooth);
  border-radius: 6px;
}
.logo:hover .logo-img {
  transform: scale(1.05);
}

.logo:hover .logo-icon {
  transform: rotate(-10deg) scale(1.05);
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop Nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  line-height: 1.2;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

.nav-en {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-link.active .nav-en {
  color: var(--accent-purple);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: var(--bg-secondary);
  padding: var(--space-lg);
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
}

.mobile-nav.open {
  transform: translateX(0);
  display: block;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  height: 100%;
}

.mobile-nav-link {
  display: block;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.mobile-nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
}

.mobile-nav-link.active {
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-purple);
}

.mobile-nav-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

/* ================= Hero ================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 40px) var(--content-padding) 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: heroGlowPulse 8s ease-in-out infinite alternate;
}

.hero-glow--1 {
  width: 600px;
  height: 600px;
  background: var(--accent-purple);
  top: -200px;
  left: -100px;
}

.hero-glow--2 {
  width: 500px;
  height: 500px;
  background: var(--accent-blue);
  bottom: -150px;
  right: -100px;
  animation-delay: -4s;
}

@keyframes heroGlowPulse {
  0% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.15); }
  100% { opacity: 0.35; transform: scale(1.05); }
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

/* Hero Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  animation: badgeFadeIn 0.8s var(--transition-smooth) backwards;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green-glow);
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 8px var(--accent-green-glow); }
  50% { box-shadow: 0 0 16px var(--accent-green-glow), 0 0 24px var(--accent-green-glow); }
}

.badge-separator {
  color: var(--text-tertiary);
  opacity: 0.5;
}

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

/* Hero Title */
.hero-title {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: titleReveal 1s 0.15s var(--transition-smooth) backwards;
}

.title-line {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.title-accent {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue), var(--accent-teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-sub {
  font-size: clamp(20px, 3.5vw, 36px);
  font-weight: 500;
  color: var(--text-secondary);
}

@keyframes titleReveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Desc */
.hero-desc {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 620px;
  animation: titleReveal 1s 0.3s var(--transition-smooth) backwards;
}

.desc-en {
  display: block;
  font-size: 0.85em;
  color: var(--text-tertiary);
  margin-top: 6px;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
  animation: titleReveal 1s 0.45s var(--transition-smooth) backwards;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  animation: titleReveal 1s 0.6s var(--transition-smooth) backwards;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-plus {
  font-size: 18px;
  font-weight: 600;
}

.stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
  animation: scrollFade 3s ease-in-out infinite;
}

.scroll-indicator svg {
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollFade {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ================= Section Header ================= */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-3xl);
}

.section-badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-purple);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.title-light {
  font-weight: 400;
  color: var(--text-tertiary);
  font-size: 0.9em;
}

.section-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ================= Features ================= */
.features {
  padding: var(--space-4xl) var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
  display: flex;
  flex-direction: column;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-mid);
  box-shadow: var(--shadow-card-hover);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card-visual {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.feature-icon-wrap {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
}

.feature-icon {
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.feature-preview {
  position: absolute;
  inset: 0;
}

/* Preview animations */
.preview-anim {
  position: absolute;
  inset: 0;
}

.preview-anim--pulse {
  background: radial-gradient(ellipse at 50% 50%, rgba(249, 115, 22, 0.15), transparent 70%);
  animation: previewPulse 3s ease-in-out infinite;
}

@keyframes previewPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.1); }
}

.preview-anim--draw {
  background:
    radial-gradient(circle at 30% 40%, rgba(139, 92, 246, 0.12), transparent 50%),
    radial-gradient(circle at 70% 60%, rgba(236, 72, 153, 0.1), transparent 50%);
}

.preview-anim--film {
  background:
    linear-gradient(180deg,
      transparent 0%,
      transparent 45%,
      rgba(59, 130, 246, 0.08) 45%,
      rgba(59, 130, 246, 0.12) 55%,
      transparent 55%
    );
  animation: filmScan 4s linear infinite;
}

@keyframes filmScan {
  0% { background-position-y: -100%; }
  100% { background-position-y: 200%; }
}

.preview-anim--reverse {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(16, 185, 129, 0.12), transparent 60%),
    linear-gradient(180deg, transparent 40%, rgba(16, 185, 129, 0.05) 40%, rgba(16, 185, 129, 0.08) 60%, transparent 60%);
  animation: reverseScan 5s ease-in-out infinite;
}

@keyframes reverseScan {
  0%, 100% { background-position-y: 0; }
  50% { background-position-y: 30px; }
}

.feature-card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex: 1;
}

.feature-card-title {
  font-size: 18px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-card-en {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.feature-card-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

/* ================= Showcase ================= */
.showcase {
  padding: var(--space-4xl) var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.showcase-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 200px;
  gap: var(--space-md);
}

.showcase-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.showcase-item:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
.showcase-item:nth-child(4) { grid-row: 3 / 5; }
.showcase-item:nth-child(6) { grid-column: 2 / 4; }

.showcase-img {
  position: absolute;
  inset: 0;
  transition: transform var(--transition-smooth);
}

.showcase-item:hover .showcase-img {
  transform: scale(1.05);
}

.showcase-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-lg);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.showcase-item:hover .showcase-overlay {
  opacity: 1;
}

.showcase-tag {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(124, 58, 237, 0.7);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  width: fit-content;
}

.showcase-overlay h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 2px;
}

.showcase-overlay p {
  font-size: 12px;
  color: var(--text-secondary);
}

.showcase-more {
  text-align: center;
  margin-top: var(--space-2xl);
}

/* ================= Products ================= */
.products {
  padding: var(--space-4xl) var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
  max-width: 900px;
  margin: 0 auto;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  position: relative;
  transition: all var(--transition-base);
}

.product-card:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.product-card--featured {
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 0 40px rgba(124, 58, 237, 0.08);
  background: linear-gradient(180deg, var(--bg-card), rgba(124, 58, 237, 0.04));
}

.product-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 20px;
  background: linear-gradient(135deg, var(--accent-purple), #6d28d9);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px var(--accent-purple-glow);
}

.product-header {
  text-align: center;
}

.product-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.product-name {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.product-name-pro {
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.product-price {
  text-align: center;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.price-symbol {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-secondary);
  vertical-align: top;
}

.price-num {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.price-period {
  font-size: 16px;
  color: var(--text-tertiary);
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.product-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  color: var(--text-secondary);
}

/* ================= Advantages ================= */
.advantages {
  padding: var(--space-4xl) var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.advantage-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
}

.advantage-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.advantage-icon {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.advantage-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.adv-en {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.advantage-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ================= CTA Section ================= */
.cta-section {
  position: relative;
  padding: var(--space-4xl) var(--content-padding);
  text-align: center;
  overflow: hidden;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

.cta-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.cta-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.cta-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
}

.cta-glow--1 {
  width: 400px;
  height: 400px;
  background: var(--accent-purple);
  top: -100px;
  left: 20%;
}

.cta-glow--2 {
  width: 300px;
  height: 300px;
  background: var(--accent-blue);
  bottom: -50px;
  right: 20%;
}

/* ================= Footer ================= */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-3xl) var(--content-padding) var(--space-xl);
}

.footer-main {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 2fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-subtle);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.footer-logo-text {
  font-size: 20px;
  font-weight: 700;
}

.footer-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: rgba(124, 58, 237, 0.15);
  color: var(--accent-purple);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-lg) auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-copyright {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.footer-divider {
  opacity: 0.4;
}

.footer-icp {
  color: var(--text-tertiary);
  font-size: 12px;
}

.footer-icp:hover {
  color: var(--text-secondary);
}

/* ================= Back to Top ================= */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 500;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  color: white;
  box-shadow: 0 4px 16px var(--accent-purple-glow);
  transform: translateY(-2px);
}

/* ================= Scroll Reveal ================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ================= Responsive ================= */

/* Tablet - 1024px */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-links {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-stats {
    gap: var(--space-xl);
  }
}

/* Tablet - 768px */
@media (max-width: 768px) {
  .nav-desktop, .header-actions {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .features-grid {
    grid-template-columns: 1fr;
    max-width: 450px;
    margin: 0 auto;
  }

  .showcase-masonry {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }

  .showcase-item:nth-child(1),
  .showcase-item:nth-child(4),
  .showcase-item:nth-child(6) {
    grid-column: auto;
    grid-row: auto;
  }

  .hero-stats {
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-copyright {
    justify-content: center;
  }
}

/* Mobile - 480px */
@media (max-width: 480px) {
  :root {
    --content-padding: 16px;
    --header-height: 56px;
  }

  .hero {
    padding-top: calc(var(--header-height) + 24px);
    padding-bottom: 60px;
  }

  .showcase-masonry {
    grid-template-columns: 1fr;
    grid-auto-rows: 200px;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
  }

  .features,
  .showcase,
  .products,
  .advantages,
  .cta-section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .cta-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-actions .btn {
    width: 100%;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* ================= Reduced Motion ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ================= Print ================= */
@media print {
  .header,
  .mobile-nav,
  .back-to-top,
  .scroll-indicator {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .hero,
  .features,
  .showcase,
  .products,
  .advantages,
  .cta-section,
  .footer {
    padding: 20px 0;
  }
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-2xl);
  padding: var(--space-2xl);
  width: 90%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-smooth);
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}
.modal-title {
  font-size: 22px;
  font-weight: 700;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}
.modal-close:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.modal-footer {
  margin-top: var(--space-lg);
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ============ FORM ============ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: all var(--transition-fast);
  outline: none;
}
.form-input:focus {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}
.form-input::placeholder {
  color: var(--text-disabled);
}
.form-hint {
  font-size: 12px;
  color: var(--text-tertiary);
}
.form-error {
  font-size: 12px;
  color: var(--error);
}
.form-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-switch-row a {
  color: var(--accent-purple);
  font-size: 13px;
}
.form-switch-row a:hover {
  text-decoration: underline;
}
.form-select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b6b88' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 20000;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(120%);
  transition: transform var(--transition-smooth);
  box-shadow: var(--shadow-lg);
  max-width: 360px;
}
.toast--show { transform: translateX(0); }
.toast--info { background: var(--accent-blue); color: white; }
.toast--success { background: var(--success); color: white; }
.toast--error { background: var(--error); color: white; }
.toast--warning { background: var(--warning); color: black; }
.toast-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

/* ============ USER MENU (登录后) ============ */
.user-menu-wrap {
  position: relative;
}
.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.user-menu-btn:hover { border-color: var(--border-mid); }
.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.user-credits {
  font-size: 11px;
  color: var(--accent-green);
  margin-left: 4px;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xl);
}
.user-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.user-dropdown-item:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
}
.user-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-xs) 0;
}

/* ============ LAYOUT: Dashboard ============ */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--header-height);
}
.dashboard-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-subtle);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}
.sidebar-section {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-md) var(--space-sm) var(--space-xs);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}
.sidebar-link:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.sidebar-link.active { background: rgba(124,58,237,0.12); color: var(--accent-purple); font-weight: 600; }
.sidebar-link .sidebar-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  background: var(--accent-purple);
  color: white;
}
.dashboard-main {
  flex: 1;
  padding: var(--space-xl);
  min-width: 0;
}

/* ============ PAGE: Dashboard Tab Content ============ */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Credits Bar */
.credits-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}
.credits-info { display: flex; align-items: center; gap: var(--space-md); }
.credits-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}
.credits-value { font-size: 28px; font-weight: 800; }
.credits-label { font-size: 12px; color: var(--text-tertiary); }
.credits-actions { display: flex; gap: var(--space-sm); }

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.stat-card-value { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.stat-card-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; }

/* Tool Card */
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
}
.tool-card:hover {
  border-color: var(--border-mid);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.tool-card-preview {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.tool-card-preview svg { opacity: 0.7; }
.tool-card-body { padding: var(--space-lg); }
.tool-card-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.tool-card-desc { font-size: 13px; color: var(--text-secondary); }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* ============ AI TOOL INTERFACE ============ */
.tool-interface {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}
.tool-params {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}
.tool-preview-area {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}
.tool-preview-empty {
  text-align: center;
  color: var(--text-tertiary);
}
.tool-preview-empty svg { margin-bottom: var(--space-md); opacity: 0.3; }
.tool-preview-result { width: 100%; text-align: center; }
.tool-preview-result img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}
.tool-result-info {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}
.tool-result-badge {
  padding: 4px 12px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--success);
}
.tool-loading {
  position: absolute;
  inset: 0;
  background: rgba(7,7,15,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}
.tool-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.tool-loading-text { color: var(--text-secondary); font-size: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ History List ============ */
.history-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.history-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.history-item:hover { border-color: var(--border-mid); }
.history-thumb {
  width: 60px; height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-info { flex: 1; min-width: 0; }
.history-info-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-info-meta { font-size: 12px; color: var(--text-tertiary); }
.history-type {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}
.history-type--video { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.history-type--drawing { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.history-type--reverse { background: rgba(16,185,129,0.15); color: var(--success); }
.history-type--scene { background: rgba(249,115,22,0.15); color: var(--accent-orange); }

/* ============ Admin Dashboard ============ */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}
.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}
.admin-card-value { font-size: 32px; font-weight: 800; }
.admin-card-label { font-size: 12px; color: var(--text-tertiary); text-transform: uppercase; }
.admin-card-trend {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}
.admin-card-trend--up { background: rgba(16,185,129,0.1); color: var(--success); }
.admin-card-trend--neutral { background: rgba(255,255,255,0.05); color: var(--text-secondary); }

.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th,
.admin-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}
.admin-table th {
  background: rgba(255,255,255,0.02);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.015); }
.admin-table td { color: var(--text-secondary); }

.admin-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}
.admin-badge--free { background: rgba(255,255,255,0.05); color: var(--text-secondary); }
.admin-badge--basic { background: rgba(99,102,241,0.15); color: #818cf8; }
.admin-badge--pro { background: rgba(124,58,237,0.15); color: #a78bfa; }
.admin-badge--enterprise { background: rgba(245,158,11,0.15); color: #fbbf24; }

.admin-actions {
  display: flex;
  gap: var(--space-sm);
}
.admin-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}
.admin-btn:hover { border-color: var(--border-mid); color: var(--text-primary); }
.admin-btn--add { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); color: var(--success); }
.admin-btn--add:hover { background: rgba(16,185,129,0.2); }

/* ============ Payment Flow ============ */
.payment-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.payment-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  transition: all var(--transition-base);
  position: relative;
}
.payment-plan-card:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.payment-plan-card--featured {
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 0 40px rgba(124,58,237,0.1);
}
.payment-plan-header { text-align: center; }
.payment-plan-name { font-size: 20px; font-weight: 700; }
.payment-plan-price { text-align: center; }
.payment-plan-price-num { font-size: 40px; font-weight: 800; }
.payment-plan-price-unit { font-size: 14px; color: var(--text-tertiary); }
.payment-plan-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}
.payment-plan-features li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-secondary);
}
.payment-summary {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-top: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.payment-methods {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.payment-method {
  padding: 14px 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.payment-method:hover { border-color: var(--border-mid); }
.payment-method.active {
  border-color: var(--accent-purple);
  background: rgba(124,58,237,0.1);
  color: var(--accent-purple);
}

/* ============ Prompt Builder ============ */
.prompt-params {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.prompt-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}
.canvas-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.canvas-container canvas {
  width: 100%;
  display: block;
}

/* ============ Responsive Additions ============ */
@media (max-width: 1024px) {
  .dashboard-sidebar { width: 200px; font-size: 13px; }
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .payment-plan-grid { grid-template-columns: 1fr; max-width: 450px; margin: 0 auto; }
  .tool-interface { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .dashboard-layout { flex-direction: column; }
  .dashboard-sidebar {
    position: relative;
    width: 100%;
    height: auto;
    top: 0;
    flex-direction: row;
    flex-wrap: wrap;
    padding: var(--space-sm);
    gap: 4px;
  }
  .dashboard-sidebar .sidebar-section { display: none; }
  .dashboard-sidebar .sidebar-link { padding: 8px 12px; font-size: 12px; }
  .dashboard-main { padding: var(--space-md); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .tool-interface { grid-template-columns: 1fr; }
  .prompt-row { grid-template-columns: 1fr; }
  .credits-bar { flex-direction: column; align-items: stretch; }
  .credits-actions { width: 100%; }
  .credits-actions .btn { flex: 1; }
}
@media (max-width: 480px) {
  .tools-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .payment-plan-grid { max-width: 100%; }
}

/* ============ PROGRESS BAR ============ */
.tool-progress {
  width: 200px;
  height: 4px;
  background: var(--border-subtle);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}
.tool-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-blue));
  border-radius: 2px;
  transition: width 0.6s ease;
}
.tool-loading-step {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 8px;
}

/* ============ SEARCH BAR ============ */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 8px 16px;
  transition: all var(--transition-fast);
}
.search-bar:focus-within {
  border-color: var(--accent-purple);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  padding: 4px 0;
}
.search-input::placeholder { color: var(--text-disabled); }
.search-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.search-btn:hover { color: var(--text-primary); }
.search-results {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  margin-top: 8px;
  display: none;
}
.search-results.show { display: block; }
.search-result-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  transition: all var(--transition-fast);
}
.search-result-item:hover { background: rgba(255,255,255,0.04); }

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: 8px;
}
.theme-toggle:hover { border-color: var(--border-mid); color: var(--text-primary); }

/* Light theme overrides */
body.light {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-input: #f1f5f9;
  --border-subtle: rgba(0,0,0,0.06);
  --border-mid: rgba(0,0,0,0.1);
  --border-strong: rgba(0,0,0,0.15);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --text-disabled: #cbd5e1;
}
body.light .header { background: rgba(255,255,255,0.85); }
body.light .modal-overlay { background: rgba(0,0,0,0.4); }
body.light .hero-glow { opacity: 0.2; }
body.light .tool-loading { background: rgba(248,250,252,0.85); }
