/* ===== HOMEPAGE ===== */

/* Hero Section */
.hero {
  position: relative;
  padding: var(--space-12) 0;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(253, 121, 168, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

/* Hero fade-in animation */
.hero__fade-in {
  animation: heroFadeIn 0.6s ease-out both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero__fade-out {
  animation: heroFadeOut 0.3s ease-in forwards;
}

@keyframes heroFadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.97);
  }
}

.hero__content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
}

.hero__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.hero__title {
  font-size: var(--text-5xl);
  font-weight: var(--font-extrabold);
  line-height: 1.1;
}

.hero__title-gradient {
  background: linear-gradient(135deg, var(--primary-light), var(--accent), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 500px;
}

.hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.hero__stats {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-4);
}

.hero__stat {
  text-align: center;
}

.hero__stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--primary-light);
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Featured Game in Hero */
.hero__featured {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl), 0 0 40px rgba(108, 92, 231, 0.15);
  border: 2px solid rgba(108, 92, 231, 0.3);
  aspect-ratio: 16 / 10;
  background: var(--bg-card);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hero__featured:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-xl), 0 0 60px rgba(108, 92, 231, 0.25);
  border-color: rgba(108, 92, 231, 0.5);
}

.hero__featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-5) var(--space-6);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.hero__featured-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.hero__featured-play {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* Hero pagination dots */
.hero__dots {
  position: absolute;
  bottom: 12px;
  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.35);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.hero__dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.2);
}

.hero__dot.active {
  background: var(--primary-light);
  box-shadow: 0 0 8px rgba(108, 92, 231, 0.6);
  transform: scale(1.25);
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.section-title .icon {
  font-size: 1.3em;
}

.see-all-link {
  color: var(--primary-light);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
}

.see-all-link:hover {
  color: var(--white);
  background: rgba(108, 92, 231, 0.15);
  text-decoration: none;
}

/* ===== GAME ROW ===== */
.game-row {
  margin-bottom: var(--space-8);
}

.game-row__scroll {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.game-row__scroll::-webkit-scrollbar {
  display: none;
}

.game-row__scroll .game-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

/* ===== CATEGORY QUICK LINKS ===== */
.category-links {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--space-8) 0;
}

.category-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 100px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.category-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(108, 92, 231, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-link:hover::before {
  opacity: 1;
}

.category-link:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow), 0 8px 32px rgba(108, 92, 231, 0.2);
}

.category-link__icon {
  font-size: 2rem;
  transition: transform 0.3s ease;
}

.category-link:hover .category-link__icon {
  transform: scale(1.15);
}

.category-link__name {
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  text-align: center;
  position: relative;
}

.category-link__count {
  font-size: 10px;
  color: var(--text-muted);
  position: relative;
}

/* ===== EXTERNAL GAMES BANNER ===== */
.external-games-banner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-6) var(--space-8);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.12), rgba(0, 206, 201, 0.12));
  border: 1px solid rgba(108, 92, 231, 0.25);
  border-radius: var(--radius-2xl);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.external-games-banner:hover {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.2));
  border-color: rgba(108, 92, 231, 0.5);
  box-shadow: 0 0 30px rgba(108, 92, 231, 0.15);
  transform: translateY(-2px);
}

.external-games-banner__icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.external-games-banner__text {
  flex: 1;
}

.external-games-banner__title {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.external-games-banner__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.external-games-banner__arrow {
  font-size: var(--text-3xl);
  color: var(--primary-light);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.external-games-banner:hover .external-games-banner__arrow {
  transform: translateX(6px);
}

/* ===== SECTION SPACING ===== */
.section {
  padding: var(--space-6) 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .hero__content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__title {
    font-size: var(--text-3xl);
  }
  .hero__subtitle {
    margin: 0 auto;
  }
  .hero__actions {
    justify-content: center;
  }
  .hero__stats {
    justify-content: center;
  }
  .hero__featured {
    max-width: 500px;
    margin: 0 auto;
  }
  .game-row__scroll .game-card {
    flex: 0 0 170px;
  }
  .category-link {
    min-width: 80px;
    padding: var(--space-3) var(--space-4);
  }
  .external-games-banner {
    flex-direction: column;
    text-align: center;
    padding: var(--space-5);
  }
  .external-games-banner__arrow {
    display: none;
  }
}
