/* ========================================
   互動遊戲區塊樣式
   ======================================== */

/* 遊戲區塊容器 */
.games-section {
  background: linear-gradient(135deg, #fdfbf7 0%, #f5f0e8 100%);
  position: relative;
  overflow: hidden;
}

.games-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(139, 90, 60, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* 遊戲區塊介紹 */
.games-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.games-tagline {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 600;
  color: #6B4423;
  margin-bottom: 1rem;
  font-family: 'Noto Serif TC', serif;
}

.games-description {
  font-size: 1rem;
  color: #7d6b5a;
  line-height: 1.8;
}

/* 遊戲卡片網格 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

/* 遊戲卡片 */
.game-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(107, 68, 35, 0.08);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(139, 90, 60, 0.1);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 60px rgba(107, 68, 35, 0.15);
  border-color: rgba(139, 90, 60, 0.2);
}

/* 遊戲卡片頭部 */
.game-card-header {
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(135deg, #8B5A3C 0%, #6B4423 100%);
  position: relative;
  overflow: hidden;
}

.game-card-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.game-icon {
  font-size: 3.5rem;
  text-align: center;
  margin-bottom: 1rem;
  animation: bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.game-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  margin-bottom: 1rem;
  font-family: 'Noto Serif TC', serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 遊戲標籤 */
.game-tags {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.game-tag {
  padding: 0.4rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  font-size: 0.875rem;
  color: #ffffff;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.game-tag:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

/* 遊戲卡片內容 */
.game-card-content {
  padding: 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.game-description {
  font-size: 1rem;
  line-height: 1.8;
  color: #5a4a3a;
  margin-bottom: 1.5rem;
}

/* 遊戲特色列表 */
.game-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.game-features li {
  padding: 0.6rem 0;
  font-size: 0.95rem;
  color: #6B4423;
  border-bottom: 1px solid rgba(139, 90, 60, 0.1);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-features li:last-child {
  border-bottom: none;
}

.game-features li:hover {
  color: #8B5A3C;
  transform: translateX(5px);
  background: rgba(139, 90, 60, 0.02);
  padding-left: 0.5rem;
  border-radius: 8px;
}

/* 遊戲卡片底部 */
.game-card-footer {
  padding: 0 2rem 2rem;
}

.game-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #8B5A3C 0%, #6B4423 100%);
  color: #ffffff;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(107, 68, 35, 0.3);
  position: relative;
  overflow: hidden;
}

.game-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.game-btn:hover::before {
  left: 100%;
}

.game-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(107, 68, 35, 0.4);
  background: linear-gradient(135deg, #9d6849 0%, #7d5230 100%);
}

.game-btn:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(107, 68, 35, 0.3);
}

.game-btn svg {
  transition: transform 0.3s ease;
}

.game-btn:hover svg {
  transform: translateX(5px);
}

/* 遊戲區塊底部提示 */
.games-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px dashed rgba(139, 90, 60, 0.15);
}

.games-note {
  font-size: 0.95rem;
  color: #8B5A3C;
  font-weight: 500;
  padding: 1rem 1.5rem;
  background: rgba(139, 90, 60, 0.05);
  border-radius: 50px;
  display: inline-block;
  border: 1px solid rgba(139, 90, 60, 0.1);
}

/* 響應式設計 */
@media (max-width: 768px) {
  .games-grid {
    gap: 1.5rem;
  }

  .game-card-header {
    padding: 1.5rem 1.5rem 1rem;
  }

  .game-icon {
    font-size: 2.5rem;
  }

  .game-title {
    font-size: 1.5rem;
  }

  .game-card-content {
    padding: 1.5rem;
  }

  .game-description {
    font-size: 0.95rem;
  }

  .game-features li {
    font-size: 0.9rem;
  }

  .game-btn {
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }

  .games-note {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .game-icon {
    font-size: 2rem;
  }

  .game-title {
    font-size: 1.25rem;
  }

  .game-tags {
    gap: 0.5rem;
  }

  .game-tag {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
  }
}

/* 動畫效果 */
@media (prefers-reduced-motion: no-preference) {
  .game-card {
    animation: fadeInUp 0.6s ease-out backwards;
  }

  .game-card:nth-child(1) {
    animation-delay: 0.1s;
  }

  .game-card:nth-child(2) {
    animation-delay: 0.2s;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
