@charset "UTF-8";

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

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

header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: white;
}

.logo:hover {
  color: #60a5fa;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s;
}

nav a:hover {
  color: #60a5fa;
}

main {
  padding: 40px 0;
  min-height: 70vh;
}

.page-title {
  font-size: 2rem;
  color: #1e293b;
  margin-bottom: 10px;
}

.page-subtitle {
  color: #64748b;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.tutorial-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: all 0.3s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tutorial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.tutorial-number {
  display: inline-block;
  background: #3b82f6;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  font-weight: bold;
  margin-bottom: 15px;
}

.tutorial-card h3 {
  color: #1e293b;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.tutorial-card p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.tutorial-meta {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.read-time {
  font-size: 0.85rem;
  color: #94a3b8;
  display: inline-block;
}

.tutorial-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.tutorial-content h2 {
  color: #1e293b;
  margin: 30px 0 15px;
  font-size: 1.5rem;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.tutorial-content h2:first-child {
  margin-top: 0;
}

.tutorial-content p {
  margin-bottom: 15px;
  font-size: 1.05rem;
}

.tutorial-content ol,
.tutorial-content ul {
  margin: 15px 0 15px 30px;
}

.tutorial-content li {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

.tutorial-content strong {
  color: #3b82f6;
}

.tip-box {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  padding: 20px;
  margin: 20px 0;
  border-radius: 0 8px 8px 0;
}

.tip-box h4 {
  color: #1e40af;
  margin-bottom: 10px;
}

.breadcrumb {
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #3b82f6;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: #64748b;
}

.back-btn {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 24px;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s;
}

.back-btn:hover {
  background: #2563eb;
}

footer {
  background: #1e293b;
  color: #94a3b8;
  padding: 30px 0;
  margin-top: 50px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.3s;
}

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

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

  .header-content {
    flex-direction: column;
    gap: 10px;
  }

  nav a {
    margin: 0 8px;
    font-size: 0.9rem;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .page-subtitle {
    font-size: 1rem;
  }

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

  .tutorial-card {
    padding: 20px;
  }

  .tutorial-content {
    padding: 20px;
  }

  .tutorial-content h2 {
    font-size: 1.3rem;
  }

  .tutorial-content p,
  .tutorial-content li {
    font-size: 1rem;
    line-height: 1.6;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }

  .footer-links a {
    margin: 0 8px;
    font-size: 0.9rem;
  }
}

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

  .header-content {
    flex-direction: column;
    gap: 15px;
  }

  nav a {
    margin: 0 10px;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .tutorial-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-content {
    padding: 25px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-links a {
    margin: 0 10px;
  }
}

@media (min-width: 769px) and (max-width: 1200px) {
  .container {
    padding: 0 30px;
  }

  .tutorial-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 图片响应式处理 */
.tutorial-content img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 8px;
  display: block;
}

/* 确保按钮尺寸符合移动端要求 */
nav a,
.back-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 确保移动端文字大小 */
@media (max-width: 768px) {
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  .tutorial-content p,
  .tutorial-content li {
    font-size: 14px;
    line-height: 1.5;
  }
}
