/* ==================== 变量定义 ==================== */
:root {
  --color-primary: #3b82f6;
  --color-bg: #ffffff;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --header-height: 70px;
  --transition-base: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow: hidden;
}

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

button {
  font-family: inherit;
}

/* ==================== Header ==================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
}

.header__logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* PC 导航 */
.header__nav-desktop {
  display: none;
}

@media (min-width: 768px) {
  .header__nav-desktop {
    display: flex;
    gap: 32px;
  }
}

.nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

/* 汉堡按钮 */
.header__menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

@media (min-width: 768px) {
  .header__menu-toggle {
    display: none;
  }
}

.menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: background var(--transition-base);
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  transition: transform var(--transition-base);
}

.menu-icon::before {
  top: -7px;
}

.menu-icon::after {
  bottom: -7px;
}

/* 汉堡动画 - 打开状态 */
.header__menu-toggle.is-open .menu-icon {
  background: transparent;
}

.header__menu-toggle.is-open .menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.header__menu-toggle.is-open .menu-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* ==================== 移动端抽屉 ==================== */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  background: var(--color-bg);
  z-index: 999;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  padding-top: var(--header-height);
}

.mobile-drawer.is-open {
  transform: translateX(0);
}

.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.drawer-link {
  padding: 16px 0;
  color: var(--color-text);
  text-decoration: none;
  font-size: 1.125rem;
  border-bottom: 1px solid #eee;
  transition: color var(--transition-base);
}

.drawer-link:hover {
  color: var(--color-primary);
}

.mobile-drawer__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base);
}

.mobile-drawer__overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ==================== 整屏滚动容器 ==================== */
.snap-container {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
  scrollbar-width: none;
}

.snap-container::-webkit-scrollbar {
  display: none;
}

.snap-section {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 20px) 24px 24px;
}

/* ==================== Hero Section ==================== */
.section--hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.5rem);
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero__cta {
  display: inline-block;
  padding: 14px 32px;
  background: white;
  color: var(--color-primary);
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ==================== Apps Section ==================== */
.section--apps {
  background: #f9fafb;
  flex-direction: column;
}

.section__heading {
  font-size: 2rem;
  margin-bottom: 40px;
  text-align: center;
}

/* ==================== 轮播组件 ==================== */
.carousel {
  position: relative;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel__slide {
  flex: 0 0 100%;
  padding: 0 10px;
}

.app-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  .app-card {
    flex-direction: row;
    height: 300px;
  }
}

.app-card__image {
  flex: 1;
  min-height: 200px;
  background: linear-gradient(45deg, #667eea, #764ba2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

@media (min-width: 768px) {
  .app-card__image {
    min-height: auto;
  }
}

.app-card__info {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-card__info h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.app-card__info p {
  color: var(--color-text-light);
  margin-bottom: 16px;
}

.app-card__link {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 500;
  transition: opacity var(--transition-base);
}

.app-card__link:hover {
  opacity: 0.8;
}

/* 轮播按钮 */
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: white;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-text);
  transition: background var(--transition-base);
  z-index: 10;
}

.carousel__btn:hover {
  background: var(--color-primary);
  color: white;
}

.carousel__btn--prev {
  left: 10px;
}

.carousel__btn--next {
  right: 10px;
}

/* 轮播圆点 */
.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: background var(--transition-base);
}

.dot.active {
  background: var(--color-primary);
}

/* ==================== About Section ==================== */
.section--about {
  background: white;
}

.about__content {
  max-width: 600px;
  text-align: center;
}

.about__content h2 {
  font-size: 2rem;
  margin-bottom: 24px;
}

/* ==================== Contact Section ==================== */
.section--contact {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: white;
}

.contact__content {
  text-align: center;
}

.contact__content h2 {
  font-size: 2rem;
  margin-bottom: 24px;
}

.contact__socials {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 24px;
}

.contact__socials a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition-base);
}

.contact__socials a:hover {
  opacity: 1;
}

/* ==================== 侧边圆点导航 ==================== */
.section-indicator {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 100;
}

@media (max-width: 767px) {
  .section-indicator {
    display: none;
  }
}

.indicator-dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d1d5db;
  transition: background var(--transition-base), transform 0.2s;
}

.indicator-dot:hover {
  transform: scale(1.3);
}

.indicator-dot.active {
  background: var(--color-primary);
}

/* ==================== 响应式优化 ==================== */
@media (max-width: 767px) {
  .snap-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero__title {
    font-size: 2rem;
  }

  .carousel__btn {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
}
