/* 紫色优雅风格CSS */
:root {
  --primary: #7c3aed;
  --secondary: #6b7280;
  --background: #fafafa;
  --surface: #ffffff;
  --text: #111827;
  --text-light: #6b7280;
  --accent: #a855f7;
  --border: #e5e7eb;
  --hover: #8b5cf6;
  --gradient: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
}

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

/* 导航栏样式 */
.navbar {
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.nav-logo a {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.3s ease;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 3px 0;
  transition: 0.3s;
}

/* 首屏样式 */
.hero-section {
  background: var(--gradient);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

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

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 3rem;
  opacity: 0.9;
}

.hero-game h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.game-container {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  display: inline-block;
  backdrop-filter: blur(10px);
}

.game-container iframe {
  border-radius: 10px;
  max-width: 100%;
  height: auto;
}

/* 按钮样式 */
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--hover);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(124, 58, 237, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  padding: 12px 30px;
  border: 2px solid var(--primary);
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

/* 卡片样式 */
.project-card, .tool-card, .category-card, .community-card {
  background: var(--surface);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 5px 20px rgba(124, 58, 237, 0.1);
  transition: all 0.3s ease;
  height: 100%;
}

.project-card:hover, .tool-card:hover, .category-card:hover, .community-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

.project-card img, .community-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 1rem;
}

.project-card h3, .tool-card h3, .category-card h3, .community-card h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.project-card p, .tool-card p, .category-card p, .community-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* 网格布局 */
.projects-grid, .tools-grid, .categories-grid, .community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* 章节样式 */
section {
  padding: 5rem 0;
}

section h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* 特色项目 */
.featured-projects {
  background: var(--surface);
}

/* 工具区域 */
.tools-section {
  background: var(--background);
}

/* 分类区域 */
.categories-section {
  background: var(--surface);
}

.category-card ul {
  list-style: none;
  padding: 0;
}

.category-card li {
  margin: 0.5rem 0;
}

.category-card a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* 灵感区域 */
.inspiration-section {
  background: var(--background);
}

.inspiration-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-top: 3rem;
}

.inspiration-text h3 {
  color: var(--primary);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.inspiration-text p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
  line-height: 1.8;
}

.inspiration-image img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.2);
}

/* 社区区域 */
.community-section {
  background: var(--surface);
}

/* 页脚 */
.footer {
  background: var(--text);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--accent);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.footer-section h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin: 0.5rem 0;
}

.footer-section a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.social-links a:hover {
  transform: scale(1.2);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  color: #d1d5db;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    display: none;
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .game-container iframe {
    width: 100%;
    height: 300px;
  }
  
  .projects-grid, .tools-grid, .categories-grid, .community-grid {
    grid-template-columns: 1fr;
  }
  
  .inspiration-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }
  
  .hero-section {
    padding: 2rem 0;
  }
  
  .hero-content h1 {
    font-size: 2rem;
  }
  
  section {
    padding: 3rem 0;
  }
  
  section h2 {
    font-size: 2rem;
  }
  
  .game-container {
    padding: 10px;
  }
  
  .game-container iframe {
    height: 250px;
  }
}