/* 基础重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header */
header {
  background-color: #fff;
  padding: 2rem 1rem;
  text-align: center;
  color: #519af5;
  border-bottom: 1px solid #e5e5e5;
}

.header-box {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-box .logo {
  width: 60px;
  height: 60px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 400;
  line-height: 60px;
}

/* Swiper */
.swiper-list {
  position: relative;
  margin-bottom: 6rem;
}

.swiper-slide {
  height: 400px;
  background-size: cover;
  background-position: center;
}

.blue-slide {
  background: url("./swiper1.jpg") no-repeat center/cover;
}
.red-slide {
  background: url("./swiper2.jpg") no-repeat center/cover;
}
.orange-slide {
  background: url("./swiper3.jpg") no-repeat center/cover;
}

.pagination {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: center;
  z-index: 2;
}
.swiper-pagination-switch {
  display: inline-block;
  width: 15px;
  height: 8px;
  border-radius: 8px;
  background: #555;
  margin: 0 5px;
  opacity: 0.8;
  border: 1px solid #fff;
  cursor: pointer;
}
.swiper-active-switch {
  background: #fff;
}

/* Container 内容区 */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.container h1 {
  font-size: 1.5rem;
  color: #333;
  margin: 4rem 0 1rem;
  border-left: 4px solid #519af5;
  padding-left: 0.5rem;
}

.container p {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #515151;
  line-height: 3rem;
}

.container img {
  vertical-align: middle;
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
}

/* 游戏列表 */
main.game-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.game-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease;
}

.game-card:hover {
  transform: translateY(-5px);
}

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

.game-card h2 {
  font-size: 1.2rem;
  margin: 0.5rem 1rem 0;
}

.game-card p {
  margin: 0.5rem 1rem 1rem;
  font-size: 0.95rem;
  color: #666;
}

/* Footer */
footer {
  text-align: center;
  font-size: 0.9rem;
  padding: 1rem;
  background-color: #f1f1f1;
  color: #888;
}

/* 响应式适配移动端 */
@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .header-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  header h1 {
    font-size: 1.25rem;
    line-height: normal;
  }

  .swiper-slide {
    height: 220px;
  }

  .container h1 {
    font-size: 1.25rem;
  }

  .container p {
    font-size: 0.95rem;
  }

  .game-card h2 {
    font-size: 1rem;
  }

  .game-card p {
    font-size: 0.9rem;
  }
}
