/* ========================================
   花良AI代聊 - 全局样式
   ======================================== */

/* --- CSS Variables --- */
:root {
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --secondary: #EC4899;
  --secondary-light: #F472B6;
  --accent: #06B6D4;
  --dark: #0F172A;
  --dark-light: #1E293B;
  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50: #F9FAFB;
  --white: #FFFFFF;
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.3s ease;
}

/* --- Reset & Base --- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.2; font-weight: 700; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }

/* --- Utility --- */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px; font-size: 16px; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
}
.btn-primary {
  background: var(--gradient-primary); color: var(--white);
  box-shadow: 0 4px 15px rgba(124,58,237,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,58,237,0.5); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-secondary {
  background: var(--white); color: var(--primary);
  box-shadow: var(--shadow-md);
}
.btn-secondary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header .tag {
  display: inline-block; padding: 6px 18px; border-radius: 50px;
  background: rgba(124,58,237,0.08); color: var(--primary);
  font-size: 14px; font-weight: 600; margin-bottom: 16px;
}
.section-header h2 { font-size: 36px; color: var(--dark); margin-bottom: 16px; }
.section-header p { font-size: 18px; color: var(--gray-500); max-width: 640px; margin: 0 auto; }

/* ========================================
   Navigation
   ======================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0; transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(15,23,42,0.95); backdrop-filter: blur(12px);
  padding: 10px 0; box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo .logo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--gradient-primary); display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--white);
}
.nav-logo span { font-size: 22px; font-weight: 700; color: var(--white); }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a { color: rgba(255,255,255,0.8); font-size: 15px; font-weight: 500; position: relative; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
  height: 2px; background: var(--gradient-primary); border-radius: 1px;
}
.nav-cta .btn { padding: 10px 24px; font-size: 14px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--white); transition: var(--transition); border-radius: 2px; }

/* ========================================
   Hero Section
   ======================================== */
.hero {
  min-height: 100vh; background: var(--gradient-hero);
  display: flex; align-items: center; position: relative; overflow: hidden;
  padding-top: 80px;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
}
.hero::after {
  content: ''; position: absolute; bottom: -30%; left: -10%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,0.1) 0%, transparent 70%);
}
.hero .container { position: relative; z-index: 1; display: flex; align-items: center; gap: 60px; }
.hero-content { flex: 1; }
.hero-content .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px;
  background: rgba(124,58,237,0.2); border: 1px solid rgba(124,58,237,0.3);
  color: var(--primary-light); font-size: 14px; font-weight: 500; margin-bottom: 24px;
}
.hero-content .badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34D399; animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; } 50% { opacity: 0.5; }
}
.hero-content h1 { font-size: 52px; color: var(--white); line-height: 1.15; margin-bottom: 20px; }
.hero-content h1 .highlight { color: var(--primary-light); }
.hero-content p { font-size: 18px; color: rgba(255,255,255,0.7); margin-bottom: 36px; max-width: 520px; line-height: 1.7; }
.hero-buttons { display: flex; align-items: center; gap: 16px; margin-bottom: 48px; }
.hero-stats { display: flex; gap: 48px; }
.hero-stats .stat-item { text-align: center; }
.hero-stats .stat-num { font-size: 32px; font-weight: 800; color: var(--white); }
.hero-stats .stat-label { font-size: 14px; color: rgba(255,255,255,0.5); margin-top: 4px; }
.hero-visual { flex: 0 0 420px; position: relative; }
.hero-phone {
  width: 280px; height: 560px; margin: 0 auto;
  background: var(--dark-light); border-radius: 36px; border: 3px solid rgba(255,255,255,0.1);
  position: relative; overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.05);
}
.hero-phone .phone-screen {
  position: absolute; top: 12px; left: 12px; right: 12px; bottom: 12px;
  border-radius: 28px; overflow: hidden;
  background: linear-gradient(180deg, #1a1040 0%, #2d1b69 50%, #1a1040 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px;
}
.phone-screen .app-logo-big { font-size: 48px; margin-bottom: 12px; }
.phone-screen .app-name { color: var(--white); font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.phone-screen .app-slogan { color: rgba(255,255,255,0.6); font-size: 13px; }
.phone-screen .chat-preview {
  width: 100%; margin-top: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-preview .msg {
  padding: 10px 14px; border-radius: 16px; font-size: 12px; max-width: 85%;
  animation: fadeInUp 0.6s ease forwards; opacity: 0;
}
.chat-preview .msg-left {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8); align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-preview .msg-right {
  background: var(--gradient-primary); color: var(--white); align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-preview .msg:nth-child(1) { animation-delay: 0.3s; }
.chat-preview .msg:nth-child(2) { animation-delay: 0.8s; }
.chat-preview .msg:nth-child(3) { animation-delay: 1.3s; }
.chat-preview .msg:nth-child(4) { animation-delay: 1.8s; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-qr {
  position: absolute; bottom: -20px; right: -20px;
  width: 130px; padding: 12px; background: var(--white);
  border-radius: var(--radius-md); box-shadow: var(--shadow-xl);
  text-align: center;
}
.hero-qr .qr-placeholder {
  width: 106px; height: 106px; margin: 0 auto;
  background: var(--gray-100); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--gray-400); border: 2px dashed var(--gray-300);
}
.hero-qr p { font-size: 11px; color: var(--gray-500); margin-top: 8px; font-weight: 500; }

/* ========================================
   Features Highlight (Homepage)
   ======================================== */
.features-highlight { background: var(--gray-50); }
.features-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.feature-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 36px 28px;
  text-align: center; transition: var(--transition); border: 1px solid var(--gray-200);
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: transparent; }
.feature-card .icon {
  width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center; font-size: 32px;
}
.feature-card:nth-child(1) .icon { background: rgba(124,58,237,0.1); }
.feature-card:nth-child(2) .icon { background: rgba(236,72,153,0.1); }
.feature-card:nth-child(3) .icon { background: rgba(6,182,212,0.1); }
.feature-card:nth-child(4) .icon { background: rgba(245,158,11,0.1); }
.feature-card h3 { font-size: 20px; color: var(--dark); margin-bottom: 12px; }
.feature-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* ========================================
   How It Works
   ======================================== */
.how-it-works-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.step-card { text-align: center; position: relative; }
.step-card .step-num {
  width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 50%;
  background: var(--gradient-primary); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800;
}
.step-card h3 { font-size: 20px; color: var(--dark); margin-bottom: 10px; }
.step-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

/* ========================================
   Feature Showcase (alternating)
   ======================================== */
.showcase-item {
  display: flex; align-items: center; gap: 80px; margin-bottom: 80px;
}
.showcase-item:last-child { margin-bottom: 0; }
.showcase-item.reverse { flex-direction: row-reverse; }
.showcase-text { flex: 1; }
.showcase-text .tag {
  display: inline-block; padding: 6px 16px; border-radius: 50px;
  background: rgba(124,58,237,0.08); color: var(--primary);
  font-size: 13px; font-weight: 600; margin-bottom: 16px;
}
.showcase-text h3 { font-size: 30px; color: var(--dark); margin-bottom: 16px; }
.showcase-text p { font-size: 16px; color: var(--gray-500); line-height: 1.8; margin-bottom: 24px; }
.showcase-text ul { display: flex; flex-direction: column; gap: 12px; }
.showcase-text li {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--gray-700);
}
.showcase-text li .check {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: rgba(52,211,153,0.15); color: #059669;
  display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.showcase-visual { flex: 0 0 480px; }
.showcase-visual .showcase-img {
  width: 100%; border-radius: var(--radius-lg);
  background: var(--gradient-hero); min-height: 360px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3); font-size: 48px;
}

/* ========================================
   Stats Counter
   ======================================== */
.stats-section { background: var(--gradient-hero); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.stats-item { text-align: center; }
.stats-item .num { font-size: 48px; font-weight: 800; color: var(--white); }
.stats-item .num span { font-size: 28px; }
.stats-item .label { font-size: 16px; color: rgba(255,255,255,0.6); margin-top: 8px; }

/* ========================================
   Download CTA
   ======================================== */
.download-cta {
  background: var(--gray-50);
}
.cta-box {
  background: var(--gradient-primary); border-radius: var(--radius-xl); padding: 60px;
  display: flex; align-items: center; justify-content: space-between;
  position: relative; overflow: hidden;
}
.cta-box::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.cta-content h2 { font-size: 32px; color: var(--white); margin-bottom: 12px; }
.cta-content p { font-size: 16px; color: rgba(255,255,255,0.8); margin-bottom: 24px; }
.cta-buttons { display: flex; gap: 12px; }
.cta-qr-group { display: flex; gap: 20px; position: relative; z-index: 1; }
.cta-qr-item { text-align: center; }
.cta-qr-item .qr-box {
  width: 120px; height: 120px; background: var(--white);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.cta-qr-item .qr-box .qr-placeholder {
  width: 100px; height: 100px; background: var(--gray-100);
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--gray-400); border: 2px dashed var(--gray-300);
}
.cta-qr-item span { font-size: 13px; color: rgba(255,255,255,0.9); font-weight: 500; }

/* ========================================
   Footer
   ======================================== */
.footer { background: var(--dark); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--gray-400); font-size: 14px; line-height: 1.8; margin-top: 16px; }
.footer-col h4 { color: var(--white); font-size: 16px; margin-bottom: 20px; }
.footer-col a { display: block; color: var(--gray-400); font-size: 14px; margin-bottom: 12px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding: 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p { color: var(--gray-500); font-size: 13px; }
.footer-bottom .footer-links { display: flex; gap: 24px; }
.footer-bottom .footer-links a { color: var(--gray-500); font-size: 13px; }
.footer-bottom .footer-links a:hover { color: var(--white); }

/* ========================================
   Features Page
   ======================================== */
.page-hero {
  background: var(--gradient-hero); padding: 160px 0 80px;
  text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
}
.page-hero h1 { font-size: 44px; color: var(--white); margin-bottom: 16px; position: relative; }
.page-hero p { font-size: 18px; color: rgba(255,255,255,0.6); max-width: 560px; margin: 0 auto; position: relative; }

.feature-detail-section:nth-child(even) { background: var(--gray-50); }
.feature-detail { display: flex; align-items: center; gap: 80px; }
.feature-detail.reverse { flex-direction: row-reverse; }
.feature-detail-text { flex: 1; }
.feature-detail-text h2 { font-size: 30px; color: var(--dark); margin-bottom: 16px; }
.feature-detail-text p { font-size: 16px; color: var(--gray-500); line-height: 1.8; margin-bottom: 20px; }
.feature-detail-text .feature-list { display: flex; flex-direction: column; gap: 14px; }
.feature-detail-text .feature-list li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 15px; color: var(--gray-700); line-height: 1.6;
}
.feature-detail-text .feature-list li .icon-check {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(124,58,237,0.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 13px; margin-top: 2px;
}
.feature-detail-visual { flex: 0 0 460px; }
.feature-detail-visual .visual-box {
  width: 100%; min-height: 340px; border-radius: var(--radius-lg);
  background: var(--gradient-hero); display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}

/* ========================================
   Download Page
   ======================================== */
.download-hero {
  background: var(--gradient-hero); min-height: 80vh;
  display: flex; align-items: center; padding-top: 80px;
  position: relative; overflow: hidden;
}
.download-hero::before {
  content: ''; position: absolute; top: -30%; right: -15%;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.12) 0%, transparent 70%);
}
.download-center { text-align: center; position: relative; z-index: 1; }
.download-center h1 { font-size: 44px; color: var(--white); margin-bottom: 16px; }
.download-center .subtitle { font-size: 18px; color: rgba(255,255,255,0.6); margin-bottom: 48px; }
.download-qr-area {
  display: flex; justify-content: center; gap: 60px; margin-bottom: 48px;
}
.download-qr-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
  transition: var(--transition);
}
.download-qr-card:hover { background: rgba(255,255,255,0.1); transform: translateY(-4px); }
.download-qr-card .platform-icon { font-size: 36px; margin-bottom: 12px; }
.download-qr-card h3 { font-size: 18px; color: var(--white); margin-bottom: 16px; }
.download-qr-card .qr-placeholder {
  width: 180px; height: 180px; margin: 0 auto 16px;
  background: var(--white); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--gray-400);
}
.download-qr-card .qr-placeholder .qr-inner {
  width: 160px; height: 160px;
  background: var(--gray-100); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--gray-400); border: 2px dashed var(--gray-300);
}
.download-qr-card .btn { width: 100%; justify-content: center; }
.download-buttons { display: flex; justify-content: center; gap: 16px; }
.app-screenshots { background: var(--gray-50); }
.screenshots-scroll {
  display: flex; gap: 24px; overflow-x: auto; padding: 20px 0;
  scroll-snap-type: x mandatory;
}
.screenshot-item {
  flex: 0 0 240px; height: 420px;
  background: var(--gray-200); border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); font-size: 14px;
  scroll-snap-align: start;
}
.system-requirements { text-align: center; }
.req-grid { display: flex; justify-content: center; gap: 60px; margin-top: 32px; }
.req-item h4 { font-size: 18px; color: var(--dark); margin-bottom: 8px; }
.req-item p { font-size: 14px; color: var(--gray-500); }

/* ========================================
   About Page
   ======================================== */
.about-story { background: var(--gray-50); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-text h2 { font-size: 30px; color: var(--dark); margin-bottom: 16px; }
.about-text p { font-size: 16px; color: var(--gray-500); line-height: 1.8; margin-bottom: 16px; }
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card {
  background: var(--white); border-radius: var(--radius-md); padding: 32px 24px;
  text-align: center; border: 1px solid var(--gray-200); transition: var(--transition);
}
.value-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.value-card .value-icon { font-size: 40px; margin-bottom: 16px; }
.value-card h3 { font-size: 18px; color: var(--dark); margin-bottom: 10px; }
.value-card p { font-size: 14px; color: var(--gray-500); line-height: 1.7; }
.about-visual .visual-placeholder {
  width: 100%; min-height: 400px; border-radius: var(--radius-lg);
  background: var(--gradient-hero); display: flex; align-items: center; justify-content: center;
  font-size: 64px;
}

/* Contact Section */
.contact-section { background: var(--gray-50); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h2 { font-size: 28px; color: var(--dark); margin-bottom: 16px; }
.contact-info > p { font-size: 15px; color: var(--gray-500); margin-bottom: 32px; }
.contact-methods { display: flex; flex-direction: column; gap: 20px; }
.contact-method {
  display: flex; align-items: center; gap: 16px;
}
.contact-method .method-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: rgba(124,58,237,0.1); display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.contact-method .method-text h4 { font-size: 15px; color: var(--dark); margin-bottom: 2px; }
.contact-method .method-text p { font-size: 14px; color: var(--gray-500); }
.contact-form { background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-lg); }
.contact-form h3 { font-size: 22px; color: var(--dark); margin-bottom: 24px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; color: var(--gray-700); font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 16px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); font-size: 15px; transition: var(--transition);
  font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-submit .btn { width: 100%; justify-content: center; }
