/* ===== Landing Page Styles ===== */

:root {
  --primary: #62B85E;
  --primary-light: #88CF85;
  --primary-dark: #4C9948;
  --warm-accent: #E76F51;
  --text: #1a1a1a;
  --text-muted: #3A3A3A;
  --bg: #ffffff;
  --bg-light: #f8f9fa;
  --bg-card: #ffffff;
  --bg-hover: #f3f4f6;
  --bg-input: #f9fafb;
  --border: #dee2e6;
  --link: #62B85E;
  --link-hover: #1B4332;
  --cta-bg: #62B85E;
  --cta-hover: #1B4332;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e5e5e5;
    --text-muted: #8A8A8A;
    --bg: #111827;
    --bg-light: #1f2937;
    --bg-card: #1a1a2e;
    --bg-hover: #2d2d44;
    --bg-input: #2d2d44;
    --border: #374151;
    --link: #52B788;
    --link-hover: #74C69D;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans', 'Noto Sans SC', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* ===== Language Toggle ===== */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: border-color 0.15s;
}
.lang-toggle:hover {
  border-color: var(--primary);
}
.lang-toggle span {
  padding: 4px 10px;
  border-radius: 16px;
  transition: background 0.15s, color 0.15s;
}
.lang-toggle span.active {
  background: var(--primary);
  color: #fff;
}
.lang-toggle span:not(.active) {
  color: var(--text-muted);
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  text-align: center;
  padding: 80px 20px 60px;
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(82, 183, 136, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(82, 183, 136, 0.12);
  color: var(--primary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(82, 183, 136, 0.2);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text);
}

.hero h1 .accent {
  color: var(--primary);
}

.hero p.subheadline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 36px;
  line-height: 1.5;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero search bar */
.hero-search {
  display: flex;
  align-items: center;
  max-width: 520px;
  margin: 0 auto 16px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 28px;
  padding: 4px;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.12), var(--shadow-md);
}

.hero-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 16px 12px 20px;
  font-size: 1.05rem;
  outline: none;
  color: var(--text);
  border-radius: 24px;
}
.hero-search input::placeholder {
  color: var(--text-muted);
}

.hero-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.hero-search button:hover {
  background: var(--primary-dark);
}

.hero-search-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.hero-lang-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
}

/* ===== Features Section ===== */
.features {
  padding: 64px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}
.section-title h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  color: var(--text);
}
.section-title p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: rgba(82, 183, 136, 0.1);
  border-radius: 14px;
  margin: 0 auto 20px;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.feature-card .feature-tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(82, 183, 136, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
}

/* ===== CTA Section ===== */
.cta-section {
  padding: 56px 20px;
  text-align: center;
  background: var(--bg-light);
}

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

.cta-section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 28px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 2px solid transparent;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cta-btn.primary {
  background: var(--primary);
  color: #fff;
}
.cta-btn.primary:hover {
  background: var(--primary-dark);
}

.cta-btn.secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.cta-btn.secondary:hover {
  background: rgba(82, 183, 136, 0.08);
}

/* ===== App Download Section ===== */
.app-download {
  padding: 64px 20px;
  text-align: center;
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 100%);
  color: #fff;
}

.app-download h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.app-download p {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.app-store-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  padding: 12px 28px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: transform 0.15s, opacity 0.15s;
  border: 1px solid rgba(255,255,255,0.15);
}
.app-store-btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.app-store-btn .store-icon {
  font-size: 1.6rem;
}

.app-store-btn .store-label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.app-store-btn .store-label small {
  font-size: 0.68rem;
  opacity: 0.75;
}
.app-store-btn .store-label strong {
  font-size: 1.05rem;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border);
  padding: 48px 20px 24px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 0.15s;
}
.footer-col a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-icp {
  font-size: 0.82rem;
}
.footer-icp a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-icp a:hover {
  color: var(--primary);
}

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

@media (max-width: 700px) {
  .hero {
    padding: 56px 16px 44px;
  }
  .hero-lang-toggle {
    top: 12px;
    right: 12px;
  }
  .features {
    padding: 48px 16px;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .feature-card {
    padding: 24px 20px;
  }
  .cta-section {
    padding: 44px 16px;
  }
  .app-download {
    padding: 48px 16px;
  }
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-btn {
    justify-content: center;
    padding: 14px 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }
  .hero p.subheadline {
    font-size: 0.95rem;
  }
  .hero-search {
    flex-direction: column;
    border-radius: 16px;
    padding: 8px;
  }
  .hero-search input {
    width: 100%;
    padding: 10px 14px;
    text-align: center;
  }
  .hero-search button {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .app-store-buttons {
    flex-direction: column;
    align-items: center;
  }
  .app-store-btn {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }
}

/* ===== CN Language Support ===== */
html[lang="zh"] .lang-en { display: none; }
html[lang="en"] .lang-zh { display: none; }