/* ===== 首页专属样式 - PBS Kids 活泼升级版 ===== */

/* 轮播 Banner */
.banner-section {
  max-width: var(--max-width);
  margin: 28px auto;
  padding: 0 var(--container-padding);
  width: 100%;
}

.banner-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: 320px;
  box-shadow: var(--shadow-card);
  border: 4px solid rgba(255, 255, 255, 0.8);
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.banner-slide.active {
  opacity: 1;
}

/* Banner 背景色 - 确保不被覆盖 */
.banner-slide:nth-child(1) {
  background: linear-gradient(135deg, #ff6b35 0%, #ffd166 50%, #ff8c5a 100%) !important;
}

.banner-slide:nth-child(2) {
  background: linear-gradient(135deg, #4a90e2 0%, #4ecdc4 50%, #52c41a 100%) !important;
}
.banner-slide:nth-child(3) {
  background: linear-gradient(135deg, #f7971e 0%, #ffd200 50%, #ff6b35 100%) !important;
}


.banner-content {
  text-align: center;
  color: white;
  padding: 20px;
  position: relative;
  z-index: 2;
}

.banner-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.25);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  backdrop-filter: blur(4px);
}

.banner-content h2 {
  font-size: 40px;
  font-weight: 900;
  margin-bottom: 14px;
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  letter-spacing: 1px;
}

.banner-content p {
  font-size: 20px;
  opacity: 0.95;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.banner-btn {
  display: inline-block;
  margin-top: 20px;
  padding: 14px 36px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary);
  border-radius: var(--radius-full);
  font-size: 17px;
  font-weight: 800;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.banner-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.banner-btn-blue {
  color: var(--blue);
}

.banner-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.banner-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.banner-dots .dot.active {
  background: white;
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.banner-dots .dot:hover {
  transform: scale(1.3);
  background: rgba(255, 255, 255, 0.8);
}

/* 装饰元素 */
.banner-deco {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  pointer-events: none;
}

.deco-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.deco-circle.c1 { width: 220px; height: 220px; top: -60px; right: -40px; }
.deco-circle.c2 { width: 140px; height: 140px; bottom: -30px; right: 80px; }
.deco-circle.c3 { width: 80px; height: 80px; top: 40px; right: 160px; }

.deco-emoji {
  position: absolute;
  font-size: 52px;
  animation: float 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.deco-emoji.e1 { top: 30px; right: 120px; animation-delay: 0s; }
.deco-emoji.e2 { top: 50%; right: 40px; transform: translateY(-50%); animation-delay: 0.8s; }
.deco-emoji.e3 { bottom: 30px; right: 160px; animation-delay: 1.5s; }

/* 分类导航 */
.category-nav {
  max-width: var(--max-width);
  margin: 0 auto 28px;
  padding: 0 var(--container-padding);
  overflow-x: auto;
  width: 100%;
}

.category-nav::-webkit-scrollbar {
  display: none;
}

.category-list {
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 6px 0;
}

.category-list li {
  flex-shrink: 0;
}

.category-list li a {
  display: block;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  background: var(--bg-card);
  color: var(--text-light);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  border: 2px solid transparent;
}

.category-list li a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--shadow);
  border-color: var(--primary);
  color: var(--primary);
}

.category-list li a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: var(--text-white);
  box-shadow: 0 4px 15px var(--primary-glow);
  border-color: transparent;
}

/* 游戏卡片网格 */
.games-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding) 50px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  width: 100%;
}

.game-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border: 3px solid transparent;
  position: relative;
}

.game-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--primary);
}

.game-card:active {
  transform: translateY(-4px) scale(0.98);
}

.game-card .card-cover {
  width: 100%;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  position: relative;
  overflow: hidden;
}

.game-card .card-cover.cover-1 { background: linear-gradient(135deg, #ff6b35, #ffd166); }
.game-card .card-cover.cover-2 { background: linear-gradient(135deg, #4a90e2, #4ecdc4); }
.game-card .card-cover.cover-3 { background: linear-gradient(135deg, #a855f7, #ff6b9d); }
.game-card .card-cover.cover-4 { background: linear-gradient(135deg, #52c41a, #4ecdc4); }
.game-card .card-cover.cover-5 { background: linear-gradient(135deg, #ffd166, #ff6b35); }
.game-card .card-cover.cover-6 { background: linear-gradient(135deg, #ff6b9d, #a855f7); }

.game-card .card-cover::after {
  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;
}

.game-card:hover .card-cover::after {
  left: 100%;
}

.game-card .card-info {
  padding: 16px 18px;
}

.game-card .card-info h3 {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.game-card .card-info .card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 600;
}

.game-card .card-info .card-meta .rating {
  color: var(--primary);
  font-weight: 800;
  background: rgba(255, 107, 53, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

/* 响应式 */
@media (max-width: 768px) {
  .banner-wrapper {
    height: 240px;
  }

  .banner-content h2 { font-size: 26px; }
  .banner-content p { font-size: 14px; }
  .banner-btn { font-size: 15px; padding: 10px 22px; }
  .banner-deco { display: none; }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .game-card .card-cover {
    height: 130px;
    font-size: 40px;
  }
}

/* ===== 打字赚金币 Banner ===== */
.typing-promo-banner {
  max-width: 1200px;
  margin: 0 auto 24px;
  padding: 0 24px;
}

.typing-promo-link {
  display: block;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(135deg, #FF6B35, #ffd166, #4ECDC4);
  background-size: 200% 200%;
  animation: typing-banner-gradient 4s ease infinite;
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.typing-promo-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 107, 53, 0.4);
}

@keyframes typing-banner-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.typing-promo-inner {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  gap: 16px;
}

.typing-promo-icon {
  font-size: 36px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.3);
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.typing-promo-text {
  flex: 1;
}

.typing-promo-text h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.typing-promo-text p {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  line-height: 1.4;
}

.typing-promo-text strong {
  color: #fff;
  font-weight: 800;
}

.typing-promo-arrow {
  font-size: 24px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .typing-promo-banner {
    padding: 0 16px;
    margin-bottom: 16px;
  }
  .typing-promo-inner {
    padding: 12px 16px;
    gap: 12px;
  }
  .typing-promo-icon {
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  .typing-promo-text h3 {
    font-size: 15px;
  }
  .typing-promo-text p {
    font-size: 12px;
  }
  .typing-promo-arrow {
    font-size: 20px;
  }
}
