/* Polu 官网 - 与客户端配色一致 */
:root {
  /* 主色调 - 与 app_colors.dart 一致 */
  --primary: #E0274E;
  --primary-light: #E84D6B;
  --primary-dark: #C01E3D;
  --secondary: #6366F1;
  --accent: #FF6B9D;

  /* 背景色 */
  --bg: #0F0F1E;
  --card-bg: #1A1A2E;
  --card-bg-light: #252540;
  --divider: #2A2A3E;

  /* 文字颜色 */
  --text-primary: #FFFFFF;
  --text-secondary: #B4B4C8;
  --text-tertiary: #6B6B7F;

  /* 功能色 */
  --success: #10B981;
  --vip: #FFD700;

  /* 间距 */
  --container-max: 1200px;
  --section-padding: 80px;
  --section-padding-mobile: 48px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 背景装饰 */
.page-wrapper {
  position: relative;
  min-height: 100vh;
}

.bg-gradient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(224, 39, 78, 0.15), transparent),
              radial-gradient(ellipse 60% 40% at 80% 50%, rgba(99, 102, 241, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}

.bg-pattern {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* 导航栏 */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(15, 15, 30, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--divider);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.nav-desktop {
  display: none;
}

.nav-desktop a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 32px;
  font-size: 0.95rem;
  line-height: 1;
  transition: color 0.2s;
}

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

/* 语言切换 - PC 端下拉 */
.lang-switcher {
  position: relative;
  margin-left: 20px;
}

.lang-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.lang-trigger:hover {
  border-color: var(--primary);
  background: var(--card-bg-light);
}

.lang-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
}

.lang-current {
  font-weight: 500;
}

.lang-arrow {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: transform 0.2s;
}

.lang-trigger[aria-expanded="true"] .lang-arrow {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 140px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 50;
}

.lang-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.lang-option:hover {
  color: var(--text-primary);
  background: var(--card-bg-light);
}

.lang-option.active {
  color: var(--primary);
  font-weight: 600;
}

/* 语言切换 - 移动端按钮组 */
.lang-options-mobile {
  padding: 20px 0;
  border-top: 1px solid var(--divider);
  margin-top: 12px;
}

.lang-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

.lang-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.lang-btn {
  padding: 10px 18px;
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

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

.lang-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: transform 0.3s;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 24px;
  background: var(--card-bg);
  border-top: 1px solid var(--divider);
}

.nav-mobile.open {
  display: flex;
}

.nav-mobile a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 12px 0;
  font-size: 1rem;
  border-bottom: 1px solid var(--divider);
  transition: color 0.2s;
}

.nav-mobile a:last-child {
  border-bottom: none;
}

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

/* 主视觉区 */
.main {
  padding-top: 64px;
}

.hero {
  padding: var(--section-padding-mobile) 0;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 48px;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.title-line {
  display: block;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-sub {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

/* 下载按钮 */
.download-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

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

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: transform 0.2s, box-shadow 0.2s;
  min-width: 200px;
  justify-content: center;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(224, 39, 78, 0.3);
}

.btn-apple {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--divider);
}

.btn-apple:hover {
  background: var(--card-bg-light);
  border-color: var(--primary);
}

.btn-google {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
}

.btn-google:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.btn-icon-img {
  object-fit: contain;
}

.btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
}

.btn-text small {
  font-size: 0.7rem;
  opacity: 0.9;
}

.btn-text strong {
  font-size: 1.1rem;
}

/* 手机 mockup - 一前一后重叠效果 */
.hero-visual {
  position: relative;
  width: 220px;
  height: 400px;
  margin: 0 auto;
}

.phone-mockup {
  position: absolute;
  width: 160px;
  height: 320px;
  background: var(--card-bg);
  border-radius: 28px;
  padding: 10px;
  border: 3px solid var(--divider);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  bottom: 0;
}

.phone-mockup-back {
  left: 0;
  transform: scale(0.88);
  z-index: 1;
  opacity: 0.9;
}

.phone-mockup-front {
  right: 0;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.phone-app-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* 功能特色 */
.features {
  padding: var(--section-padding-mobile) 0;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-primary);
}

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

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

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

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

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

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 下载区域 */
.download-section {
  padding: var(--section-padding-mobile) 0;
}

.download-desc {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1rem;
}

/* 页脚 */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--divider);
  margin-top: 48px;
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.footer-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-copy {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* PC 端适配 */
@media (min-width: 768px) {
  .nav-desktop {
    display: flex;
    align-items: center;
  }

  .nav-toggle {
    display: none;
  }

  .nav-mobile {
    display: none !important;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 64px;
  }

  .hero-content {
    flex: 1;
  }

  .hero-visual {
    width: 320px;
    height: 500px;
    margin: 0;
    flex: 0 0 auto;
  }

  .hero-title {
    font-size: 3rem;
  }

  .title-sub {
    font-size: 1.25rem;
  }

  .hero-desc {
    margin: 0 0 32px;
    font-size: 1.1rem;
  }

  .download-buttons {
    flex-direction: row;
    justify-content: flex-start;
  }

  .phone-mockup {
    width: 220px;
    height: 440px;
    border-radius: 36px;
    padding: 14px;
  }

  .phone-mockup-back {
    transform: scale(0.88);
  }

  .phone-screen {
    border-radius: 24px;
  }

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

  .features,
  .download-section {
    padding: var(--section-padding) 0;
  }

  .section-title {
    font-size: 2.25rem;
    margin-bottom: 48px;
  }

  .download-buttons-center {
    flex-direction: row;
    justify-content: center;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .hero-visual {
    width: 380px;
    height: 580px;
  }

  .phone-mockup {
    width: 260px;
    height: 520px;
    border-radius: 40px;
    padding: 16px;
  }

  .phone-mockup-back {
    transform: scale(0.88);
  }

  .phone-screen {
    border-radius: 28px;
  }
}

@media (min-width: 1200px) {
  .features-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
