/**
 * 老陈AutoZIP - 主样式文件
 * 页面布局与区块样式
 */

/* ========================================
   基础重置与全局样式
   ======================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body), var(--font-zh);
  font-size: var(--text-body);
  line-height: var(--leading-loose);
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

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

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

button {
  font-family: inherit;
}

/* 选中文本样式 */
::selection {
  background: var(--primary-200);
  color: var(--primary-900);
}

/* ========================================
   布局容器
   ======================================== */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section {
  padding: var(--space-20) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section-title {
  font-size: var(--text-h1);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-4);
  line-height: var(--leading-snug);
}

.section-subtitle {
  font-size: var(--text-body-lg);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   导航栏
   ======================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: var(--z-fixed);
  border-bottom: 1px solid transparent;
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-h4);
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-link {
  font-size: var(--text-body);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-500);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-link:hover::after {
  width: 100%;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* 移动端菜单按钮 */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--duration-normal) var(--ease-out);
}

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

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

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

/* ========================================
   Hero 首屏区域
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-height);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

/* 动态背景效果 */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 80%, rgba(33, 150, 243, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(0, 217, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* 网格纹理 */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

.hero-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  color: var(--white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: var(--font-medium);
  color: var(--te-cyan);
  margin-bottom: var(--space-6);
  backdrop-filter: blur(10px);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, var(--text-display));
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--white) 0%, var(--gray-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-h3);
  font-weight: var(--font-normal);
  color: var(--te-orange);
  margin-bottom: var(--space-4);
}

.hero-description {
  font-size: var(--text-body-lg);
  color: var(--gray-400);
  line-height: var(--leading-loose);
  margin-bottom: var(--space-8);
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-10);
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
  text-align: left;
}

.stat-value {
  font-size: var(--text-h2);
  font-weight: var(--font-bold);
  color: var(--white);
}

.stat-label {
  font-size: var(--text-caption);
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Hero 预览区域 */
.hero-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* 装饰性光晕 */
.hero-preview::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-500) 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(60px);
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.1); opacity: 0.3; }
}

/* ========================================
   Features 功能特点
   ======================================== */

.features {
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* ========================================
   Tutorial 使用教程
   ======================================== */

.tutorial {
  background: var(--bg-primary);
}

.tutorial-steps {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.tutorial-steps::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-200), var(--primary-500), var(--primary-200));
  z-index: 0;
}

.tutorial-step {
  flex: 1;
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-icon-wrapper {
  width: 48px;
  height: 48px;
  background: var(--white);
  border: 2px solid var(--primary-500);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-4);
  color: var(--primary-500);
  font-weight: var(--font-bold);
  box-shadow: var(--shadow-md);
}

.tutorial-step h3 {
  font-size: var(--text-h4);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.tutorial-step p {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* ========================================
   Use Cases 适用场景
   ======================================== */

.use-cases {
  background: var(--bg-secondary);
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

/* ========================================
   Download 下载区域
   ======================================== */

.download {
  background: linear-gradient(135deg, var(--gray-900) 0%, #1a1a2e 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.download::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 30% 20%, rgba(255, 107, 53, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0, 217, 255, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.download-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.download-content h2 {
  font-size: var(--text-h1);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-4);
}

.download-content p {
  font-size: var(--text-body-lg);
  color: var(--gray-400);
  margin-bottom: var(--space-8);
}

.requirements {
  margin-bottom: var(--space-8);
}

.requirements h3 {
  font-size: var(--text-h4);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-4);
  color: var(--white);
}

.requirements-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.requirements-list li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--gray-400);
}

.requirements-list li svg {
  color: var(--success);
  flex-shrink: 0;
}

.download-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-6);
}

.download-note {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  font-size: var(--text-body-sm);
  color: var(--gray-400);
}

.version-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--te-orange);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: var(--text-caption);
  font-weight: var(--font-bold);
  font-family: var(--font-mono);
}

.download-links {
  display: flex;
  gap: var(--space-6);
}

.download-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--gray-400);
  font-size: var(--text-body-sm);
  transition: color var(--duration-fast) var(--ease-out);
}

.download-link:hover {
  color: var(--white);
}

/* ========================================
   Footer 页脚
   ======================================== */

.footer {
  background: var(--dark-bg);
  color: var(--gray-400);
  padding: var(--space-16) 0 var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer-brand {
  max-width: 300px;
}

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-h4);
  font-weight: var(--font-bold);
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer-brand p {
  line-height: var(--leading-loose);
  margin-bottom: var(--space-4);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--dark-card);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: all var(--duration-normal) var(--ease-out);
}

.social-link:hover {
  background: var(--primary-600);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-column h4 {
  font-size: var(--text-body);
  font-weight: var(--font-semibold);
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  color: var(--gray-500);
  transition: color var(--duration-fast) var(--ease-out);
}

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

.footer-bottom {
  padding-top: var(--space-6);
  border-top: 1px solid var(--dark-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-body-sm);
}

.footer-bottom a {
  color: var(--primary-400);
}

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

/* ========================================
   动画效果
   ======================================== */

/* 淡入动画 - 默认可见 */
.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* 缩放弹入 - 默认可见 */
.scale-in {
  opacity: 1;
  transform: scale(1);
}

/* 滑入动画 - 默认可见 */
.slide-in-left,
.slide-in-right {
  opacity: 1;
  transform: translateX(0);
}

/* ========================================
   工具类
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 回到顶部按钮 */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-500);
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal) var(--ease-out);
  z-index: var(--z-fixed);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-600);
  transform: translateY(-4px) scale(1.1);
  box-shadow: var(--glow-primary);
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}
