/* ============================================
   xxmanhua 漫画APP官网 - 样式文件
   主题：蓝紫科技风
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --secondary: #8b5cf6;
  --accent: #06b6d4;
  --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --gradient-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  --text-main: #1e293b;
  --text-sub: #64748b;
  --text-light: #94a3b8;
  --bg-white: #ffffff;
  --bg-light: #f8fafc;
  --bg-gray: #f1f5f9;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(99, 102, 241, 0.12);
  --shadow-lg: 0 12px 40px rgba(99, 102, 241, 0.18);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 重置与基础 ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  color: var(--text-main);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

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

/* ---------- 通用容器 ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 56px;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-title p {
  font-size: 17px;
  color: var(--text-sub);
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}

.nav-logo span {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-sub);
  position: relative;
}

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

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.3s ease;
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  background: var(--gradient);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
  transition: var(--transition);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.nav-cta::after {
  display: none !important;
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition);
}

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

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

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

/* ---------- Hero 区 ---------- */
.hero {
  position: relative;
  padding: 140px 0 90px;
  background: var(--gradient-soft);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-content .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.hero-content .badge .dot {
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-content h1 {
  font-size: 52px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
  color: var(--text-main);
}

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

.hero-content .subtitle {
  font-size: 19px;
  color: var(--text-sub);
  margin-bottom: 36px;
  max-width: 480px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--gradient);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.5);
}

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

.btn-primary svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 30px;
  background: var(--bg-white);
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  transition: var(--transition);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item .num {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-item .label {
  font-size: 14px;
  color: var(--text-sub);
  margin-top: 2px;
}

/* Hero 右侧手机展示 */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual .phone-frame {
  position: relative;
  width: 300px;
  border-radius: 40px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
  transition: transform 0.5s ease;
  background: #fff;
  border: 6px solid #1e293b;
}

.hero-visual .phone-frame:hover {
  transform: rotate(0deg) scale(1.03);
}

.hero-visual .phone-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.hero-visual .float-card {
  position: absolute;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: float 3s ease-in-out infinite;
}

.hero-visual .float-card.card-1 {
  top: 15%;
  left: -10px;
  animation-delay: 0s;
}

.hero-visual .float-card.card-2 {
  bottom: 20%;
  right: -10px;
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.float-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.float-card.card-1 .icon {
  background: rgba(99, 102, 241, 0.12);
}

.float-card.card-2 .icon {
  background: rgba(6, 182, 212, 0.12);
}

.float-card .text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.float-card .text span {
  font-size: 12px;
  color: var(--text-sub);
}

/* ---------- 功能展示轮播 ---------- */
.showcase {
  background: var(--bg-white);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.showcase-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg-white);
}

.showcase-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 9 / 16;
  transition: transform 0.5s ease;
}

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

.showcase-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 18px 18px;
  background: linear-gradient(transparent, rgba(30, 41, 59, 0.85));
  color: #fff;
  transform: translateY(10px);
  opacity: 0;
  transition: var(--transition);
}

.showcase-card:hover .overlay {
  transform: translateY(0);
  opacity: 1;
}

.showcase-card .overlay h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
}

.showcase-card .overlay p {
  font-size: 13px;
  opacity: 0.85;
}

/* ---------- 特色功能 ---------- */
.features {
  background: var(--bg-light);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.1);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 22px;
  background: var(--gradient-soft);
}

.feature-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.feature-card p {
  font-size: 15px;
  color: var(--text-sub);
  line-height: 1.7;
}

/* ---------- 数据统计 ---------- */
.stats-band {
  background: var(--gradient);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}

.stats-band::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.stats-band::after {
  content: "";
  position: absolute;
  bottom: -50%;
  right: -5%;
  width: 350px;
  height: 350px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.stats-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}

.stat-box .num {
  font-size: 44px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.stat-box .num .suffix {
  font-size: 24px;
  font-weight: 700;
}

.stat-box .label {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

/* ---------- 下载 CTA ---------- */
.download-cta {
  padding: 100px 0;
  text-align: center;
  background: var(--bg-white);
  position: relative;
}

.download-cta .cta-inner {
  max-width: 640px;
  margin: 0 auto;
}

.download-cta h2 {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 18px;
  letter-spacing: -1px;
  color: var(--text-main);
}

.download-cta h2 .highlight {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.download-cta p {
  font-size: 18px;
  color: var(--text-sub);
  margin-bottom: 40px;
  line-height: 1.7;
}

.download-cta .btn-primary {
  padding: 20px 52px;
  font-size: 19px;
}

.download-cta .note {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.download-cta .note span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* ---------- 页脚 ---------- */
.footer {
  background: #0f172a;
  color: rgba(255, 255, 255, 0.6);
  padding: 50px 0 30px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.footer-logo span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  transition: var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
  border: none;
}

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

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 26px rgba(99, 102, 241, 0.5);
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* ---------- 滚动动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 50px;
  }

  .hero-content .subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual .phone-frame {
    width: 260px;
  }

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

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 56px 0;
  }

  .section-title h2 {
    font-size: 28px;
  }

  .section-title p {
    font-size: 15px;
  }

  .nav-links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
  }

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

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 110px 0 60px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-content .subtitle {
    font-size: 16px;
  }

  .btn-primary {
    padding: 14px 28px;
    font-size: 15px;
  }

  .btn-secondary {
    padding: 14px 24px;
    font-size: 14px;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-item .num {
    font-size: 22px;
  }

  .hero-visual .float-card {
    display: none;
  }

  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

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

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

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

  .stat-box .num {
    font-size: 32px;
  }

  .download-cta {
    padding: 60px 0;
  }

  .download-cta h2 {
    font-size: 28px;
  }

  .download-cta p {
    font-size: 16px;
  }

  .download-cta .btn-primary {
    padding: 16px 36px;
    font-size: 16px;
  }

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

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 30px;
  }

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

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    justify-content: center;
  }
}
