/* ==========================================================================
   全站主样式表 (main.css)
   基于原生现代 CSS，完全去除第三方库，零依赖即推即用
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

/* 容器与版心 */
.container {
  width: 100%;
  max-width: var(--max-content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ==========================================================================
   导航栏 (Header & Navbar)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.15rem;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

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

/* 下拉菜单 */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 200px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  z-index: 110;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: block;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.dropdown-link:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.dropdown-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 14px 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 移动端汉堡包按钮 */
.mobile-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}

.mobile-toggle-btn svg {
  width: 24px;
  height: 24px;
}

/* ==========================================================================
   首页组件：Hero 区域
   ========================================================================== */
.hero-section {
  padding: 64px 0 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(229, 61, 42, 0.1);
  color: var(--primary);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.25;
}

.hero-description {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 按钮规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary-gradient);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(229, 61, 42, 0.35);
}

.btn-primary:hover {
  color: var(--text-inverse);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(229, 61, 42, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   首页组件：核心特性 (Features)
   ========================================================================== */
.features-section {
  padding: 60px 0;
}

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

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(229, 61, 42, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

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

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

/* ==========================================================================
   首页组件：APP 截图画廊 (Screenshots)
   ========================================================================== */
.showcase-section {
  padding: 50px 0 70px;
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.screenshots-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 12px 4px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

@media (min-width: 980px) {
  .screenshots-scroll {
    justify-content: center;
  }
}

.screenshot-item {
  flex: 0 0 auto;
  width: 210px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--bg-surface);
  scroll-snap-align: center;
  transition: transform var(--transition-fast);
  background: var(--bg-surface);
}

.screenshot-item:hover {
  transform: translateY(-4px) scale(1.02);
}

.screenshot-item img {
  width: 100%;
  display: block;
}

/* ==========================================================================
   首页组件：更新动态与合规反馈 (Updates & Feedback)
   ========================================================================== */
.info-section {
  padding: 60px 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.info-box {
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.info-box h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.version-badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.update-list {
  list-style: none;
}

.update-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.update-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--primary);
  font-size: 1.2rem;
  line-height: 1;
}

/* 反馈与客服 */
.service-content {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.service-qr {
  text-align: center;
  flex: 0 0 130px;
}

.service-qr img {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.service-qr span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.service-rules {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.service-rules p {
  margin-bottom: 8px;
}

.report-phones {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.phone-tag {
  display: inline-block;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-right: 8px;
  margin-top: 4px;
  font-family: var(--font-mono);
}

/* ==========================================================================
   页脚 (Site Footer)
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
}

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

.footer-icp {
  color: var(--text-muted);
}

.footer-icp a {
  color: var(--text-muted);
}

.footer-icp a:hover {
  color: var(--primary);
}

/* ==========================================================================
   响应式断点 (Responsive Media Queries)
   ========================================================================== */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }

  .service-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .service-qr {
    flex: none;
  }
}

@media (max-width: 860px) {
  .site-header {
    background: var(--bg-surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 1000;
  }

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

  .hero-description {
    font-size: 1.05rem;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    background: var(--bg-surface);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 48px;
    gap: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1001;
    box-shadow: var(--shadow-xl);
  }

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

  .mobile-toggle-btn {
    display: block;
  }

  .nav-menu .nav-link {
    padding: 12px 14px;
    font-size: 1.02rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .nav-menu .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 6px 0 10px 12px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nav-menu .dropdown-link {
    padding: 10px 14px;
    font-size: 0.94rem;
    border-radius: var(--radius-sm);
    background: var(--bg-page);
    border: 1px solid var(--border-subtle);
  }

  .nav-menu .dropdown-link:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-color: rgba(229, 61, 42, 0.2);
  }

  .screenshot-item {
    width: 170px;
  }
}
