:root {
  --primary-color: #f0f0f0;
  --secondary-color: #333;
  --accent-color: #ff6b6b;
  --text-color: #333;
  --link-hover-color: #ff6b6b;
  --nav-bg: rgba(255, 255, 255, 0.9);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
}

/* 导航栏样式 */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--secondary-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--link-hover-color);
}

.hamburger {
  display: none;
  cursor: pointer;
}

/* 卡片容器样式 */
.cards-container {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  padding: 2rem;
  margin-top: 60px;
  gap: 2rem;
}

.card {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-title {
  padding: 1rem;
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--secondary-color);
  background: white;
}

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

/* 关于我部分 */
.about {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.about .content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: center;
}

.about img {
  width: 100%;
  border-radius: 50%;
}

.about .text {
  font-size: 1.1rem;
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 2rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: opacity 0.3s ease;
}

.btn:hover {
  opacity: 0.9;
}

/* 页脚样式 */
footer {
  background: var(--secondary-color);
  color: white;
  padding: 2rem;
  text-align: center;
}

.wechat img {
  width: 150px;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.wechat img:hover {
  transform: scale(1.1);
}

.social {
  margin: 1rem 0;
}

.social img {
  width: 32px;
  margin: 0 0.5rem;
  transition: transform 0.3s ease;
}

.social img:hover {
  transform: scale(1.2);
}

.copyright {
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    right: -100%;
    height: calc(100vh - 60px);
    width: 100%;
    flex-direction: column;
    background: var(--nav-bg);
    transition: right 0.3s ease;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 1rem 0;
    text-align: center;
  }

  .about .content {
    grid-template-columns: 1fr;
  }

  .wechat img {
    width: 120px;
  }
}

/* 文章列表样式 */
.articles {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  animation: fadeIn 1s ease;
}

.articles h1 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--secondary-color);
}

.article-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

article {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

article h2 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

article h2 a {
  color: var(--secondary-color);
  text-decoration: none;
}

article h2 a:hover {
  color: var(--link-hover-color);
}

article p {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

article time {
  font-size: 0.9rem;
  color: #666;
}

/* 动画效果 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.banner,
.about,
.articles {
  animation: fadeIn 1s ease;
}

.about .content {
  animation: slideUp 1s ease;
}