/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background-color: #fafafa;
  color: #333333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Design Tokens */
:root {
  --primary-text: #333333;
  --secondary-text: #666666;
  --background-primary: #fafafa;
  --background-secondary: #fefefe;
  --accent-color: #8d7b6a;
  --border-color: #e5e5e5;
  --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(250, 250, 250, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-text);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-link {
  color: var(--primary-text);
  text-decoration: none;
  font-size: 1rem;
  position: relative;
  transition: var(--transition-base);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--primary-text);
  transition: var(--transition-base);
}

/* Hero Section */
.hero {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-content {
  text-align: center;
  color: white;
  padding: 60px 20px;
  max-width: 800px;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 40px;
  opacity: 0.9;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  opacity: 0.85;
}

/* Section Styles */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 60px;
  color: var(--primary-text);
}

.section-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
  color: var(--secondary-text);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Grid Layout */
.grid {
  display: grid;
  gap: 30px;
  margin-bottom: 60px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Card Styles */
.card {
  background: var(--background-secondary);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-base);
  box-shadow: var(--shadow-light);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.card-image {
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

.card:hover .card-image img {
  transform: scale(1.03);
}

.card-content {
  padding: 30px;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 15px;
  color: var(--primary-text);
}

.card-description {
  color: var(--secondary-text);
  line-height: 1.6;
}

/* Tutorial Styles */
.tutorial {
  display: grid;
  gap: 60px;
  margin-bottom: 60px;
}

.tutorial-item {
  background: var(--background-secondary);
  border-radius: 8px;
  padding: 40px;
  box-shadow: var(--shadow-light);
}

.tutorial-title {
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 30px;
  color: var(--primary-text);
}

.tutorial-steps {
  display: grid;
  gap: 30px;
}

.step {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  flex-shrink: 0;
}

.step-image {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.step-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-content {
  flex: 1;
}

.step-description {
  color: var(--secondary-text);
  line-height: 1.6;
}

/* Article Styles */
.article {
  max-width: 800px;
  margin: 0 auto;
  background: var(--background-secondary);
  padding: 60px;
  border-radius: 8px;
  box-shadow: var(--shadow-light);
}

.article-title {
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 40px;
  color: var(--primary-text);
  text-align: center;
}

.article-content {
  color: var(--secondary-text);
  line-height: 1.8;
  font-size: 1.1rem;
}

.article-content p {
  margin-bottom: 20px;
}

/* Footer */
.footer {
  background: var(--primary-text);
  color: white;
  text-align: center;
  padding: 30px 0;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--background-secondary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 60px;
    gap: 30px;
    transition: left 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

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

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

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

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

  .hero-subtitle {
    font-size: 1.2rem;
  }

  .section {
    padding: 60px 0;
  }

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

  .step {
    flex-direction: column;
    text-align: center;
  }

  .article {
    padding: 40px 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

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

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .section {
    padding: 40px 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .card-content {
    padding: 20px;
  }

  .tutorial-item {
    padding: 30px 20px;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-60 {
  margin-bottom: 60px;
}

.mt-60 {
  margin-top: 60px;
}