:root {
  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --fg: #f5f5f7;
  --fg-muted: #8a8a9a;
  --accent: #FF1F5D;
  --accent-dim: #D91A50;
  --accent-glow: #FF3366;
  --card: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --glow: rgba(255,31,93,0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--fg);
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
}

.font-display {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
}

#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.35;
  animation: float 25s ease-in-out infinite;
  pointer-events: none;
}

.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation-delay: 0s;
}

.glow-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #6B2D8B 0%, transparent 70%);
  bottom: 10%;
  left: -150px;
  animation-delay: -8s;
}

.glow-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #FF6B35 0%, transparent 70%);
  top: 40%;
  right: 5%;
  animation-delay: -16s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -40px) scale(1.08); }
  50% { transform: translate(-30px, 30px) scale(0.92); }
  75% { transform: translate(30px, 15px) scale(1.04); }
}

.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.9s 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; }
.reveal-delay-5 { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .glow-orb { animation: none; }
  .phone-mockup { animation: none; }
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #fff;
  font-weight: 600;
  padding: 16px 32px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--glow);
}

.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.6s ease;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px var(--glow);
}

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

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

.btn-secondary {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--fg);
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

.phone-mockup {
  position: relative;
  width: 280px;
  height: 580px;
  background: linear-gradient(145deg, #1a1a24 0%, #0d0d12 100%);
  border-radius: 40px;
  padding: 12px;
  box-shadow: 
    0 50px 100px -20px rgba(0,0,0,0.6),
    0 0 0 1px rgba(255,255,255,0.1),
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 0 60px -20px var(--glow);
  animation: phone-float 6s ease-in-out infinite;
}

@keyframes phone-float {
  0%, 100% { transform: translateY(0) rotateY(0deg); }
  50% { transform: translateY(-20px) rotateY(3deg); }
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  background: #0f0f1a;
}

.hero-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #0a0a0f;
  border-radius: 0 0 20px 20px;
  z-index: 10;
}

.phone-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 44px;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 100%);
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 24px 0;
}

.phone-status-bar span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top center, var(--glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-color: rgba(255,31,93,0.4);
  box-shadow: 0 25px 60px -20px var(--glow);
}

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

.feature-card:hover::after {
  opacity: 0.5;
}

.screenshot-track {
  display: flex;
  gap: 24px;
  animation: scroll 40s linear infinite;
  width: max-content;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.screenshot-track:hover {
  animation-play-state: paused;
}

.screenshot-item {
  flex-shrink: 0;
  width: 220px;
  height: 440px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s ease;
  position: relative;
  background: #15151d;
}

.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.screenshot-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,31,93,0.4), transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.screenshot-item:hover {
  transform: scale(1.05);
  box-shadow: 0 30px 60px -15px var(--glow);
}

.screenshot-item:hover::before {
  opacity: 1;
}

.screenshot-container {
  position: relative;
  overflow: hidden;
}

.screenshot-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 16px;
  margin: 0 -16px;
  width: calc(100% + 32px);
  max-width: calc(100vw - 32px);
}

.screenshot-scroll::-webkit-scrollbar {
  display: none;
}

.screenshot-scroll .screenshot-item {
  scroll-snap-align: center;
  flex-shrink: 0;
}

.screenshot-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.screenshot-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.screenshot-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .screenshot-track {
    animation: none;
    flex-wrap: nowrap;
  }
  
  .screenshot-item {
    width: 180px;
    height: 360px;
    border-radius: 16px;
  }
  
  .screenshot-item::before {
    border-radius: 16px;
  }
  
  .screenshot-dots {
    display: flex;
  }
}

@media (max-width: 480px) {
  .screenshot-item {
    width: 160px;
    height: 320px;
    border-radius: 12px;
  }
  
  .screenshot-item::before {
    border-radius: 12px;
  }
  
  .screenshot-scroll {
    gap: 12px;
    padding: 12px;
    margin: 0 -12px;
    width: calc(100% + 24px);
    max-width: calc(100vw - 24px);
  }
}

.star {
  color: var(--accent);
}

.stat-number {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--fg) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-dim);
}

.film-strip {
  position: absolute;
  width: 50px;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 6px,
    rgba(255,31,93,0.03) 6px,
    rgba(255,31,93,0.03) 12px
  );
  pointer-events: none;
}

.film-strip-left { left: 20px; }
.film-strip-right { right: 20px; }

.gradient-title {
  background: linear-gradient(135deg, var(--accent) 0%, #FF6B9D 50%, #FF8FA3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cta-card {
  border-color: rgba(255,31,93,0.3);
  background: linear-gradient(180deg, rgba(255,31,93,0.08) 0%, transparent 100%);
}

@media (max-width: 768px) {
  .phone-mockup {
    width: 240px;
    height: 500px;
    border-radius: 32px;
  }
  
  .phone-screen {
    border-radius: 24px;
  }
  
  .phone-notch {
    width: 100px;
    height: 24px;
    border-radius: 0 0 16px 16px;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .stat-number {
    font-size: 36px;
  }
  
  .feature-card {
    padding: 24px;
    border-radius: 16px;
  }
  
  .glow-orb-1 {
    width: 400px;
    height: 400px;
  }
  
  .glow-orb-2 {
    width: 300px;
    height: 300px;
  }
  
  .glow-orb-3 {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 480px) {
  .phone-mockup {
    width: 200px;
    height: 420px;
    border-radius: 28px;
    padding: 10px;
  }
  
  .phone-screen {
    border-radius: 20px;
  }
  
  .phone-notch {
    width: 80px;
    height: 20px;
    border-radius: 0 0 14px 14px;
  }
  
  .phone-status-bar {
    height: 36px;
    padding: 8px 16px 0;
  }
  
  .phone-status-bar span {
    font-size: 10px;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 10px;
  }
  
  .stat-number {
    font-size: 28px;
  }
  
  .feature-card {
    padding: 20px;
    border-radius: 14px;
  }
}

.wechat-guide-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
}

.wechat-guide-overlay.show {
  display: flex;
}

.wechat-guide-content {
  text-align: center;
  animation: guideFadeIn 0.3s ease;
}

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

.wechat-guide-arrow {
  color: #fff;
  margin-bottom: 20px;
  animation: arrowBounce 1s ease-in-out infinite;
}

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

.wechat-guide-text {
  color: #fff;
}

.wechat-guide-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--accent);
}

.wechat-guide-desc {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.wechat-guide-dot {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 2px;
  margin: 0 4px;
}

/* ========================================
   移动端全面优化 (Mobile Optimization)
   ======================================== */

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }
  
  body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
  }
  
  .glow-orb {
    opacity: 0.2;
  }
  
  .glow-orb-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -100px;
  }
  
  .glow-orb-2 {
    width: 250px;
    height: 250px;
    bottom: 5%;
    left: -100px;
  }
  
  .glow-orb-3 {
    width: 180px;
    height: 180px;
  }
  
  nav {
    padding: 12px 16px;
  }
  
  nav .max-w-7xl {
    padding: 0;
  }
  
  .phone-mockup {
    width: 260px;
    height: 540px;
    border-radius: 32px;
    padding: 10px;
    margin: 0 auto;
  }
  
  .phone-screen {
    border-radius: 24px;
  }
  
  .phone-notch {
    width: 100px;
    height: 24px;
    border-radius: 0 0 16px 16px;
  }
  
  .phone-status-bar {
    height: 44px;
    padding: 12px 16px 0;
  }
  
  .phone-status-bar span {
    font-size: 12px;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 14px 24px;
    font-size: 14px;
    border-radius: 12px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  .btn-primary svg,
  .btn-secondary svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }
  
  .stat-number {
    font-size: 32px;
  }
  
  .feature-card {
    padding: 20px;
    border-radius: 16px;
  }
  
  .feature-card h3 {
    font-size: 18px;
  }
  
  .feature-card p {
    font-size: 13px;
  }
  
  .feature-card .w-14 {
    width: 48px;
    height: 48px;
  }
  
  .feature-card svg {
    width: 24px;
    height: 24px;
  }
  
  .screenshot-item {
    width: 200px;
    height: 400px;
    border-radius: 16px;
  }
  
  .screenshot-item::before {
    border-radius: 16px;
  }
  
  .screenshot-scroll {
    gap: 12px;
    padding: 16px;
    margin: 0 -16px;
    width: calc(100% + 32px);
    max-width: calc(100vw - 32px);
    scroll-padding: 16px;
  }
  
  .screenshot-dots {
    margin-top: 16px;
  }
  
  .wechat-guide-overlay {
    padding-top: 40px;
  }
  
  .wechat-guide-title {
    font-size: 20px;
  }
  
  .wechat-guide-desc {
    font-size: 14px;
    padding: 0 20px;
  }
  
  .wechat-guide-arrow svg {
    width: 50px;
    height: 70px;
  }
  
  .film-strip {
    display: none;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  nav {
    padding: 10px 12px;
  }
  
  nav img {
    width: 36px;
    height: 36px;
  }
  
  nav .font-display {
    font-size: 20px;
  }
  
  #menu-btn {
    padding: 8px;
  }
  
  #menu-btn svg {
    width: 22px;
    height: 22px;
  }
  
  .phone-mockup {
    width: 220px;
    height: 460px;
    border-radius: 28px;
    padding: 8px;
  }
  
  .phone-screen {
    border-radius: 22px;
  }
  
  .phone-notch {
    width: 85px;
    height: 20px;
    border-radius: 0 0 14px 14px;
  }
  
  .phone-status-bar {
    height: 32px;
    padding: 8px 10px 0;
  }
  
  .phone-status-bar span {
    font-size: 9px;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 12px 18px;
    font-size: 13px;
    border-radius: 10px;
    min-height: 48px;
    gap: 8px;
  }
  
  .btn-primary svg,
  .btn-secondary svg {
    width: 18px;
    height: 18px;
  }
  
  .stat-number {
    font-size: 26px;
  }
  
  .feature-card {
    padding: 16px;
    border-radius: 14px;
  }
  
  .feature-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
  }
  
  .feature-card p {
    font-size: 12px;
    line-height: 1.5;
  }
  
  .feature-card .w-14 {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
  }
  
  .feature-card svg {
    width: 20px;
    height: 20px;
  }
  
  .screenshot-item {
    width: 160px;
    height: 320px;
    border-radius: 12px;
  }
  
  .screenshot-item::before {
    border-radius: 12px;
  }
  
  .screenshot-scroll {
    gap: 10px;
    padding: 12px;
    margin: 0 -12px;
    width: calc(100% + 24px);
    max-width: calc(100vw - 24px);
    scroll-padding: 12px;
  }
  
  .screenshot-dot {
    width: 6px;
    height: 6px;
  }
  
  .screenshot-dot.active {
    width: 18px;
  }
  
  .wechat-guide-overlay {
    padding-top: 30px;
  }
  
  .wechat-guide-title {
    font-size: 18px;
    margin-bottom: 12px;
  }
  
  .wechat-guide-desc {
    font-size: 13px;
    padding: 0 16px;
  }
  
  .wechat-guide-dot {
    padding: 3px 10px;
    font-size: 13px;
  }
  
  .wechat-guide-arrow {
    margin-bottom: 16px;
  }
  
  .wechat-guide-arrow svg {
    width: 40px;
    height: 56px;
  }
}

@media (max-width: 360px) {
  html {
    font-size: 13px;
  }
  
  .phone-mockup {
    width: 190px;
    height: 400px;
    border-radius: 24px;
    padding: 7px;
  }
  
  .phone-screen {
    border-radius: 18px;
  }
  
  .phone-notch {
    width: 75px;
    height: 18px;
    border-radius: 0 0 10px 10px;
  }
  
  .btn-primary,
  .btn-secondary {
    padding: 10px 14px;
    font-size: 12px;
    min-height: 44px;
  }
  
  .stat-number {
    font-size: 22px;
  }
  
  .feature-card {
    padding: 14px;
  }
  
  .screenshot-item {
    width: 140px;
    height: 280px;
  }
}

/* 触摸优化 */
@media (hover: none) and (pointer: coarse) {
  .btn-primary:hover,
  .btn-secondary:hover,
  .feature-card:hover,
  .screenshot-item:hover {
    transform: none;
    box-shadow: inherit;
  }
  
  .btn-primary:active {
    transform: scale(0.97);
  }
  
  .btn-secondary:active {
    transform: scale(0.97);
    background: rgba(255,255,255,0.08);
  }
  
  .feature-card:active {
    transform: scale(0.98);
  }
  
  .screenshot-item:active {
    transform: scale(1.02);
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* 安全区域适配 (iPhone X+) */
@supports (padding-top: env(safe-area-inset-top)) {
  nav {
    padding-top: max(12px, env(safe-area-inset-top));
  }
  
  footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
  
  .wechat-guide-overlay {
    padding-top: max(40px, env(safe-area-inset-top));
  }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
  .phone-mockup {
    width: 140px;
    height: 300px;
  }
  
  .wechat-guide-overlay {
    padding-top: 20px;
  }
  
  .wechat-guide-arrow {
    margin-bottom: 10px;
  }
  
  .wechat-guide-arrow svg {
    width: 36px;
    height: 50px;
  }
}

/* 防止水平滚动 */
section {
  max-width: 100vw;
  overflow-x: hidden;
}
