/* ========================================
   AI工业化 - 即梦风格主样式
   Inspired by: jimeng.jianying.com
   ======================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
  /* Colors */
  --bg-primary: #0a0a0f;
  --bg-card: #1a1a2e;
  --bg-card-hover: #1f1f3a;
  --bg-nav: rgba(10, 10, 15, 0.85);
  --bg-glass: rgba(26, 26, 46, 0.6);

  /* Brand Gradient */
  --brand-purple: #7C3AED;
  --brand-cyan: #1DB954;
  --brand-blue: #2563EB;
  --gradient-primary: linear-gradient(135deg, #7C3AED, #2563EB, #1DB954);
  --gradient-btn: linear-gradient(135deg, #7C3AED, #2563EB);
  --gradient-btn-hover: linear-gradient(135deg, #9333ea, #3b82f6);
  --gradient-text: linear-gradient(135deg, #7C3AED, #1DB954);

  /* Borders */
  --border-card: 1px solid rgba(124, 58, 237, 0.2);
  --border-card-hover: 1px solid rgba(124, 58, 237, 0.5);
  --border-glow: 0 0 20px rgba(124, 58, 237, 0.15);

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-tertiary: #6b6b80;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-card: 0 4px 30px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.2);
  --shadow-btn: 0 4px 15px rgba(124, 58, 237, 0.3);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Nav */
  --nav-height: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-nav);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav.scrolled {
  background: rgba(10, 10, 15, 0.95);
  border-bottom-color: rgba(124, 58, 237, 0.2);
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
}

.nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
}

.nav-logo .logo-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-links a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
  border-radius: 1px;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: rgba(26, 26, 46, 0.5);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  border-color: rgba(124, 58, 237, 0.5);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.2);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.3rem;
  align-items: center;
  justify-content: center;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-height) 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -20%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 60%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -15%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1), transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.08);
  font-size: 0.85rem;
  color: var(--brand-purple);
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease both;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

/* --- Video Showcase --- */
.video-showcase {
  margin-top: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease 0.4s both;
}

.video-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: var(--border-card);
  background: var(--bg-card);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-placeholder:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: var(--shadow-glow);
}

.video-placeholder .bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08), transparent 60%);
  pointer-events: none;
}

.video-placeholder .play-btn {
  position: relative;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient-btn);
  border: none;
  color: white;
  font-size: 1.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-btn);
}

.video-placeholder .play-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(124, 58, 237, 0.4);
}

.video-placeholder .play-label {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  color: var(--text-tertiary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-btn);
  color: white;
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.4);
  background: var(--gradient-btn-hover);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(26, 26, 46, 0.6);
  color: var(--text-primary);
  border: 1px solid rgba(124, 58, 237, 0.3);
}

.btn-secondary:hover {
  border-color: rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.1);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.btn-large {
  padding: 16px 40px;
  font-size: 1.05rem;
}

/* --- Section Base --- */
.section {
  padding: 100px 0;
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124, 58, 237, 0.2), transparent);
}

/* --- Function Cards (3 核心功能) --- */
.function-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.function-card {
  background: var(--bg-card);
  border: var(--border-card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.function-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.function-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-8px);
  box-shadow: var(--shadow-glow);
  background: var(--bg-card-hover);
}

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

.function-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
  transition: all var(--transition-normal);
}

.function-card:hover .function-icon {
  border-color: rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.15);
  transform: scale(1.05);
}

.function-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.function-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.function-card .btn {
  font-size: 0.9rem;
  padding: 10px 24px;
}

/* --- Feature Sections (AI绘画 & 智能画布) --- */
.feature-section {
  padding: 80px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.feature-visual {
  position: relative;
}

.feature-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  border: var(--border-card);
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-normal);
}

.feature-image:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: var(--shadow-glow);
}

.feature-image .icon-overlay {
  font-size: 3rem;
  opacity: 0.5;
}

.feature-image .feature-label {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  letter-spacing: 1px;
}

/* Feature info side */
.feature-info h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.feature-info h3 .highlight {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-info p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.feature-tag {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  border: 1px solid rgba(124, 58, 237, 0.2);
  color: var(--text-secondary);
  background: rgba(124, 58, 237, 0.05);
  transition: all var(--transition-fast);
}

.feature-tag:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.1);
}

/* Reverse layout for alternating */
.feature-grid.reverse {
  direction: rtl;
}

.feature-grid.reverse > * {
  direction: ltr;
}

/* --- Community Showcase --- */
.community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.community-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--bg-card);
  border: var(--border-card);
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.community-item:nth-child(1),
.community-item:nth-child(4),
.community-item:nth-child(6),
.community-item:nth-child(7) {
  aspect-ratio: 3 / 4;
}

.community-item:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: scale(1.02);
  box-shadow: var(--shadow-glow);
  z-index: 2;
}

.community-item .item-icon {
  font-size: 2.5rem;
  opacity: 0.3;
  transition: all var(--transition-normal);
}

.community-item:hover .item-icon {
  opacity: 0.6;
  transform: scale(1.1);
}

.community-item .item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 16px 16px;
  background: linear-gradient(transparent, rgba(10, 10, 15, 0.9));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.community-item .item-overlay span {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.community-cta {
  text-align: center;
  margin-top: 40px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid rgba(124, 58, 237, 0.1);
  padding: 48px 0 32px;
  margin-top: 40px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  transition: color var(--transition-fast);
}

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

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  border-color: rgba(124, 58, 237, 0.3);
  color: var(--text-primary);
  background: rgba(124, 58, 237, 0.08);
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(124, 58, 237, 0.1);
  }
  50% {
    box-shadow: 0 0 40px rgba(124, 58, 237, 0.25);
  }
}

/* Floating particles background (subtle) */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(124, 58, 237, 0.3);
  border-radius: 50%;
  animation: float linear infinite;
}

@keyframes float {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) scale(1);
    opacity: 0;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* --- Responsive Design --- */

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

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

  .community-item:nth-child(1),
  .community-item:nth-child(4),
  .community-item:nth-child(6),
  .community-item:nth-child(7) {
    aspect-ratio: 1;
  }

  .feature-grid {
    gap: 40px;
  }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
  :root {
    --nav-height: 60px;
  }

  .container {
    padding: 0 16px;
  }

  /* Mobile nav */
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px 24px;
    gap: 0;
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(124, 58, 237, 0.06);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  /* Hero */
  .hero {
    padding: var(--nav-height) 0 60px;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
    width: 100%;
  }

  .video-showcase {
    margin-top: 40px;
  }

  /* Sections */
  .section {
    padding: 60px 0;
  }

  /* Function cards */
  .function-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .function-card {
    padding: 28px 24px;
  }

  /* Feature sections */
  .feature-section {
    padding: 50px 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-grid.reverse {
    direction: ltr;
  }

  /* Community */
  .community-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .community-item {
    aspect-ratio: 1 !important;
  }

  /* Footer */
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

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

/* Small mobile (max 480px) */
@media (max-width: 480px) {
  .community-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title {
    font-size: 1.5rem;
  }

  .btn-large {
    padding: 14px 32px;
    font-size: 0.95rem;
  }
}

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

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.2);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(124, 58, 237, 0.4);
}
