/* ===== 全局樣式 ===== */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #0b0e1b;
  color: #fff;
}

header {
  background: #111;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 24px;
  color: #ffcc00;
}

nav a {
  margin-left: 20px;
  color: #ccc;
  text-decoration: none;
}

nav a:hover {
  color: #fff;
}

/* ===== Hero 區塊（主視覺）===== */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: url('https://images.unsplash.com/photo-1591017402822-fd07d09dd20f?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 20px;
}

.hero button {
  padding: 12px 24px;
  font-size: 16px;
  background-color: #ffcc00;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* ===== 標題區塊 ===== */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1600px;
  margin: 40px auto 20px;
  padding: 0 20px;
}

.section-title h2 {
  font-size: 28px;
  color: #ffcc00;
}

.section-title a {
  color: #ffcc00;
  text-decoration: none;
}

/* ===== 圖片卡片區塊（排行/遊戲）===== */
.grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px 40px;
  box-sizing: border-box;
}

.game-card {
  background: #1a1a2e;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.game-card:hover {
  transform: scale(1.05);
}

.game-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.info {
  padding: 10px;
  text-align: center;
}

.info h3 {
  margin: 10px 0;
  font-size: 16px;
  color: #ffcc00;
}

.stars {
  color: #ffd700;
}

/* ===== 頁尾區 ===== */
footer {
  text-align: center;
  padding: 20px;
  background: #111;
  color: #aaa;
}

/* ===== RWD 響應式調整 ===== */
@media (max-width: 1400px) {
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 1000px) {
  .grid-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 700px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}
