/* ============================================
   Fluxibly Games - Homepage Styles
   ============================================ */

/* Hero / Carousel */
.hero {
  margin-top: var(--header-height);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0d47a1, #1565c0, #1a73e8);
  color: #fff;
}

.hero-carousel {
  position: relative;
  min-height: 420px;
  align-content: center;
}

.hero-slide {
  position: relative;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
  display: none;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  display: flex;
}

.hero-slide-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 48px;
  width: 100%;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
}

.hero-title {
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 15px;
  line-height: 1.7;
  opacity: 0.9;
  margin-bottom: 24px;
  max-width: 500px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.hero-actions .btn {
  font-size: 15px;
  padding: 12px 28px;
}

.hero-actions .btn-play {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
}

.hero-actions .btn-play:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-1px);
}

.hero-actions .btn-info {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-actions .btn-info:hover {
  background: rgba(255,255,255,0.25);
}

.hero-thumb {
  flex-shrink: 0;
  width: 320px;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Carousel Nav */
.hero-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
}

.hero-dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}

.hero-arrows {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  pointer-events: auto;
  transition: background var(--transition);
}

.hero-arrow:hover {
  background: rgba(255,255,255,0.3);
}

/* Main content */
.main-content {
  padding: 48px 0;
}

/* New Games Section */
.new-games-section {
  margin-bottom: 48px;
}

.new-games-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* Hot Games Section */
.hot-games-section {
  margin-bottom: 48px;
}

/* Categories Section */
.categories-section {
  margin-bottom: 48px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

/* Topics Section */
.topics-section {
  margin-bottom: 48px;
}

.topic-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.topic-header {
  background: linear-gradient(135deg, var(--primary), #4285f4);
  padding: 24px;
  color: #fff;
}

.topic-header h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 6px;
}

.topic-header p {
  font-size: 14px;
  opacity: 0.9;
}

.topic-games {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px;
}

/* Stats Section */
.stats-section {
  margin-bottom: 48px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* App Download Banner */
.app-banner {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  margin-bottom: 48px;
}

.app-banner-content h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.app-banner-content p {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.app-stores {
  display: flex;
  gap: 12px;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
}

.app-store-btn:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.app-banner-phone {
  width: 160px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

/* Promo / SEO Text */
.promo-text {
  margin-bottom: 48px;
}

.promo-text h2 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.promo-text h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--text-primary);
}

.promo-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 12px;
  /* max-width: 800px; */
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-carousel {
    min-height: 340px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-thumb {
    width: 240px;
    height: 150px;
  }

  .new-games-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topic-games {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-carousel {
    min-height: unset;
  }

  .hero-slide-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 24px 20px;
  }

  .hero-content {
    order: 1;
  }

  .hero-thumb {
    width: 200px;
    height: 125px;
    order: 0;
  }

  .hero-title {
    font-size: 22px;
  }

  .hero-desc {
    font-size: 13px;
    margin-bottom: 16px;
    max-width: 100%;
  }

  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .new-games-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topic-games {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-banner {
    flex-direction: column;
    text-align: center;
    padding: 28px 20px;
  }

  .app-stores {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-thumb {
    width: 160px;
    height: 100px;
  }

  .hero-title {
    font-size: 18px;
  }

  .hero-badge {
    font-size: 11px;
    margin-bottom: 8px;
  }

  .hero-desc {
    margin-bottom: 12px;
  }

  .hero-actions .btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  .new-games-row {
    grid-template-columns: 1fr 1fr;
  }

  .categories-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
}
