/* Netflix-style Game Carousel */

.carousel-section {
  margin: 4rem 0;
}

.carousel-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #00d4ff, #ff006e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Carousel container */
.carousel-wrapper {
  position: relative;
  margin: 0 -1rem;
  padding: 0 1rem;
}

.carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 212, 255, 0.3) transparent;
  -webkit-overflow-scrolling: touch;
}

.carousel::-webkit-scrollbar {
  height: 6px;
}

.carousel::-webkit-scrollbar-track {
  background: transparent;
}

.carousel::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.5);
  border-radius: 10px;
}

.carousel::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.8);
}

/* Game card in carousel */
.carousel-item {
  flex: 0 0 calc(25% - 1.125rem);
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  display: flex;
  height: auto;
}

.carousel-item:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.carousel-item:hover .game-card-image {
  filter: brightness(1.15);
}

.carousel-item.featured {
  flex: 0 0 calc(25% - 1.125rem);
}

.carousel-item .game-card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 212, 255, 0.5);
  background: linear-gradient(135deg, rgba(51, 225, 255, 0.2) 0%, rgba(255, 0, 110, 0.1) 100%);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.carousel-item:hover .game-card {
  border-color: rgba(0, 212, 255, 0.8);
  box-shadow: 0 15px 60px rgba(0, 212, 255, 0.4);
}

.game-card {
  background-color: transparent;
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

.game-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(51, 225, 255, 0.15);
  position: relative;
  flex-shrink: 0;
}



.game-card-content {
  position: relative;
  z-index: 2;
  padding: 1rem 1.5rem;
  color: white;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(5, 6, 13, 0.95) 0%, rgba(5, 6, 13, 0.9) 100%);
}

.game-card-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.6);
  letter-spacing: 1px;
  color: #00d4ff;
}

.game-card-badge.new {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 0, 110, 0.8);
  color: #ff006e;
}

.game-card-name {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.game-card-tagline {
  font-size: 0.8rem;
  color: #aaa;
  font-weight: 300;
  margin-bottom: auto;
  line-height: 1.4;
}

.game-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent-color, #00d4ff);
  color: #000;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.game-card-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.4);
}

/* Navigation arrows */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  color: white;
  font-size: 1.5rem;
}

.carousel-nav:hover {
  background: rgba(0, 212, 255, 0.3);
  border-color: rgba(0, 212, 255, 0.8);
  color: #00d4ff;
}

.carousel-nav.prev {
  left: 0;
  margin-left: -22px;
}

.carousel-nav.next {
  right: 0;
  margin-right: -22px;
}

/* "Scroll right to see more" hint */
.carousel-hint {
  position: absolute;
  right: 1rem;
  bottom: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  animation: slide-right 2s infinite;
  z-index: 5;
}

.carousel-hint svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

@keyframes slide-right {
  0%, 100% {
    opacity: 0.5;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(4px);
  }
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .carousel-item {
    flex: 0 0 280px;
    min-width: 280px;
  }

  .carousel-item .game-card {
    height: 340px;
  }
}

@media (max-width: 768px) {
  .carousel-wrapper {
    margin: 0;
    padding: 0 1rem;
  }

  .carousel {
    gap: 1rem;
  }

  .carousel-section {
    margin: 3rem 0;
    padding: 0 1rem;
  }

  .carousel-section h2 {
    padding: 0;
  }

  .carousel-item {
    flex: 0 0 220px;
    min-width: 220px;
  }

  .carousel-item .game-card {
    height: 280px;
  }

  .game-card-name {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .carousel-wrapper {
    margin: 0;
    padding: 0 3.5rem;
  }

  .carousel {
    gap: 1rem;
    padding: 1rem 0;
  }

  .carousel-section {
    margin: 2rem 0;
    padding: 0;
  }

  .carousel-item {
    flex: 0 0 calc(100vw - 8rem);
    min-width: calc(100vw - 8rem);
  }

  .carousel-item .game-card {
    height: auto;
  }

  .game-card-image {
    aspect-ratio: 16 / 9;
  }

  .game-card-content {
    padding: 1rem;
  }

  .game-card-name {
    font-size: 1.1rem;
  }

  .game-card-tagline {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .game-card-cta {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
  }

  .carousel-nav {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
    background: rgba(0, 212, 255, 0.2);
    border: 2px solid rgba(0, 212, 255, 0.6);
  }

  .carousel-nav:hover {
    background: rgba(0, 212, 255, 0.4);
    border-color: rgba(0, 212, 255, 0.9);
  }

  .carousel-nav.prev {
    margin-left: -24px;
  }

  .carousel-nav.next {
    margin-right: -24px;
  }

  .carousel-hint {
    display: none;
  }
}

@media (max-width: 480px) {
  .carousel-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
  }

  .carousel-item {
    flex: 0 0 calc(100vw - 7rem);
    min-width: calc(100vw - 7rem);
  }

  .carousel-section {
    margin: 1.5rem 0;
    padding: 0;
  }

  .carousel-wrapper {
    padding: 0 3rem;
  }

  .carousel-nav {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }

  .carousel-nav.prev {
    margin-left: -22px;
  }

  .carousel-nav.next {
    margin-right: -22px;
  }
}

/* Dark theme compatibility */
body.dark .carousel-nav {
  background: rgba(0, 0, 0, 0.8);
}
