/* ========================================
   花迹 Official Website - Style Sheet
   ======================================== */

/* --- CSS Variables --- */
:root {
  --primary: #2E7D32;
  --primary-dark: #1B5E20;
  --primary-light: #A5D6A7;
  --accent: #8D6E63;
  --text: #2C2C2C;
  --text-light: #6B6B6B;
  --bg: #FFFDF8;
  --bg-gray: #F5F2EC;
  --border: #E2DDD5;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

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

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  display: flex;
  align-items: center;
  z-index: 1000;
  background: rgba(255, 253, 248, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 253, 248, 0.95);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

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

.navbar-brand {
  font-size: 1.4em;
  font-weight: bold;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-brand .brand-icon {
  font-size: 1.2em;
}

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

.nav-links a {
  font-size: 0.95em;
  color: var(--text-light);
  transition: color 0.2s ease;
  position: relative;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  font-size: 0.95em;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
  text-align: center;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* --- Section Common --- */
.section-title {
  text-align: center;
  font-size: 2em;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 1.05em;
  margin-bottom: 48px;
}

/* --- Hero Section --- */
#hero {
  min-height: calc(100vh - 60px);
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 60px 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  background: linear-gradient(135deg, var(--bg) 0%, #f0f7f0 100%);
}

.hero-content h1 {
  font-size: 2.6em;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}

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

.hero-content p {
  font-size: 1.1em;
  color: var(--text-light);
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hero-platforms {
  font-size: 0.85em;
  color: var(--text-light);
}

.hero-mockup {
  display: flex;
  justify-content: center;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  background: #1a1a2e;
  border-radius: 30px;
  padding: 16px 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mock-statusbar {
  text-align: center;
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.6);
  padding: 4px 0 8px;
}

.mock-header {
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  padding: 4px 8px 12px;
}

.mock-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 4px;
  overflow: hidden;
}

.mock-item {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mock-item-icon {
  font-size: 1.6em;
  flex-shrink: 0;
}

.mock-item-info {
  flex: 1;
}

.mock-item-name {
  color: #fff;
  font-size: 0.9em;
  font-weight: 500;
}

.mock-item-desc {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75em;
  margin-top: 2px;
}

.mock-item-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.65em;
  padding: 3px 8px;
  border-radius: 10px;
  flex-shrink: 0;
}

/* --- Features Section --- */
#features {
  background: var(--bg-gray);
  padding: 80px 20px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: #fff;
  padding: 32px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  font-size: 2.5em;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15em;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 0.92em;
  color: var(--text-light);
  line-height: 1.6;
}

/* --- Screenshots Section --- */
#screenshots {
  padding: 80px 20px;
}

.tab-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 0.95em;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}

.tab-btn:hover {
  color: var(--primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.screenshot-panel {
  display: none;
  justify-content: center;
}

.screenshot-panel.active {
  display: flex;
}

.screenshot-phone {
  width: 280px;
  height: 520px;
  background: #1a1a2e;
  border-radius: 28px;
  padding: 20px 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.screenshot-phone .screen-title {
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  margin-bottom: 16px;
  text-align: center;
}

.screen-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.screen-item {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85em;
}

.screen-item .item-label {
  font-size: 0.75em;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 4px;
}

/* --- Download Section --- */
#download {
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
}

#download .section-title {
  color: #fff;
}

#download .section-subtitle {
  color: rgba(255, 255, 255, 0.8);
}

.download-btns {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.download-btns .btn {
  min-width: 180px;
  padding: 14px 28px;
  font-size: 1em;
}

.btn-download {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 600;
}

.btn-download:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-download.disabled {
  background: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

/* --- Footer --- */
.footer {
  background: #1a1a2e;
  color: rgba(255, 255, 255, 0.8);
  padding: 60px 20px 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 1.3em;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-desc {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
}

.footer-col h4 {
  color: #fff;
  font-size: 1em;
  margin-bottom: 16px;
  font-weight: 600;
}

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

.footer-col ul li a {
  font-size: 0.9em;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85em;
  color: rgba(255, 255, 255, 0.35);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Legal Pages (Privacy / Terms) --- */
.legal-page {
  margin-top: 60px;
  padding: 60px 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.legal-page .back-link {
  display: inline-block;
  color: var(--primary);
  margin-bottom: 24px;
  font-size: 0.95em;
}

.legal-page .back-link:hover {
  text-decoration: underline;
}

.legal-page h1 {
  font-size: 2em;
  margin-bottom: 8px;
}

.legal-page .update-date {
  color: var(--text-light);
  font-size: 0.9em;
  margin-bottom: 36px;
}

.legal-page h2 {
  font-size: 1.3em;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-page p,
.legal-page ul {
  font-size: 0.95em;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 20px;
  list-style: disc;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background: rgba(255, 253, 248, 0.98);
    backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.open {
    max-height: 300px;
    padding: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .nav-links a {
    padding: 10px 20px;
    width: 100%;
    text-align: center;
  }

  #hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 20px;
    min-height: auto;
  }

  .hero-content h1 {
    font-size: 1.8em;
  }

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

  .hero-mockup {
    order: -1;
  }

  .phone-mockup {
    width: 240px;
    height: 480px;
  }

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

  .screenshot-phone {
    width: 260px;
    height: 480px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .section-title {
    font-size: 1.6em;
  }

  .download-btns {
    flex-direction: column;
    align-items: center;
  }
}
