/* Estilos adicionales para componentes - Carrusel, Video Player, etc. */

/* Carrusel de Juegos */
.carousel-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.carousel-container {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-container .game-card {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--primary-color);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition-normal);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: rgba(245, 200, 66, 0.9);
  color: var(--dark-bg);
  transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
  left: 15px;
}

.carousel-next {
  right: 15px;
}

/* Video Player */
.video-section {
  margin: 4rem 0;
}

.featured-video {
  background: #2d2d2d;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 4rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.video-player {
  position: relative;
  width: 100%;
  height: 500px;
  background: #000;
  overflow: hidden;
}

.video-player iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-preview {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  overflow: hidden;
}

.video-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.video-preview:hover img {
  transform: scale(1.05);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: rgba(245, 200, 66, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(245, 200, 66, 0.3);
}

.play-button:hover {
  background: #f5c842;
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 15px 40px rgba(245, 200, 66, 0.5);
}

.play-icon {
  font-size: 2.5rem;
  color: #1a1a1a;
  margin-left: 6px;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(245, 200, 66, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: all 0.3s ease;
  cursor: pointer;
}

.play-overlay:hover {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

.play-icon-small {
  font-size: 1.2rem;
  color: #1a1a1a;
  margin-left: 3px;
}

/* Video Details */
.video-details {
  padding: 3rem;
}

.video-details h2 {
  font-size: 2.5rem;
  color: #f5c842;
  margin-bottom: 1rem;
  font-weight: 700;
  font-family: var(--font-primary);
}

.video-description {
  color: #cccccc;
  font-size: 1.2rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.video-stats {
  display: flex;
  gap: 2rem;
  color: #999999;
  font-size: 1rem;
  flex-wrap: wrap;
}

.video-stats span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 8px 16px;
  background: #3d3d3d;
  border-radius: 20px;
}

/* Trailer Cards */
.trailers-grid h3 {
  color: #f5c842;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 700;
  font-family: var(--font-primary);
}

.trailers-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.trailer-card {
  background: #2d2d2d;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.trailer-card:hover {
  border-color: #f5c842;
  box-shadow: 0 20px 40px rgba(245, 200, 66, 0.2);
}

.trailer-card.active {
  border-color: #f5c842;
  box-shadow: 0 20px 40px rgba(245, 200, 66, 0.3);
}

.trailer-thumbnail {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.trailer-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.trailer-card:hover .trailer-thumbnail img {
  transform: scale(1.1);
}

.duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.trailer-info {
  padding: 1.5rem;
}

.trailer-info h4 {
  color: #ffffff;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.trailer-info p {
  color: #cccccc;
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.trailer-meta {
  display: flex;
  justify-content: space-between;
  color: #999999;
  font-size: 0.9rem;
}

.views {
  color: #f5c842;
  font-weight: 600;
}

/* Game Cards Específicos */
.game-card {
  cursor: pointer;
  position: relative;
  height: 350px;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background: var(--gradient-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: var(--transition-normal);
}

.game-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
  border-color: rgba(245, 200, 66, 0.3);
}

.game-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-image {
  transform: scale(1.05);
}

.game-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(50%);
  transition: var(--transition);
}

.game-card:hover .game-card-overlay {
  transform: translateY(0);
}

.game-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-text);
  margin-bottom: 0.75rem;
  font-family: var(--font-primary);
}

.game-description {
  color: var(--secondary-text);
  line-height: 1.5;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Mobile Menu */
.nav-menu.active {
  display: flex;
  position: fixed;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(10px);
  flex-direction: column;
  padding: 2rem;
  box-shadow: var(--shadow-heavy);
  z-index: 999;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Field Errors */
.form-input.error {
  border-color: var(--error-color);
  box-shadow: 0 0 0 2px rgba(255, 68, 68, 0.2);
}

.field-error {
  display: block;
  color: var(--error-color);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Loading States */
.loading, .error, .no-trailers, .no-games, .no-news {
  text-align: center;
  padding: 6rem 2rem;
  color: #cccccc;
}

.loading h1, .error h1, .no-trailers h1, .no-games h1, .no-news h1 {
  color: #f5c842;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-primary);
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(245, 200, 66, 0.3);
  border-top: 4px solid #f5c842;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 2rem;
}

.error {
  color: #ff6b6b;
}

.retry-button {
  background: #f5c842;
  color: #1a1a1a;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.3s ease;
  font-size: 1rem;
  font-family: var(--font-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.retry-button:hover {
  background: #f4d465;
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* Responsive específico para nuevos componentes */
@media (max-width: 1024px) {
  .video-player {
    height: 400px;
  }

  .trailers-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .video-player {
    height: 300px;
  }

  .play-button {
    width: 80px;
    height: 80px;
  }

  .play-icon {
    font-size: 2rem;
  }

  .video-details {
    padding: 2rem;
  }

  .video-details h2 {
    font-size: 2rem;
  }

  .video-description {
    font-size: 1rem;
  }

  .video-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .trailers-list {
    grid-template-columns: 1fr;
  }

  .game-card {
    height: 300px;
  }

  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }
}

@media (max-width: 480px) {
  .video-player {
    height: 220px;
  }

  .play-button {
    width: 60px;
    height: 60px;
  }

  .play-icon {
    font-size: 1.5rem;
  }

  .video-details {
    padding: 1.5rem;
  }

  .video-details h2 {
    font-size: 1.5rem;
  }

  .video-stats {
    flex-direction: column;
    gap: 0.5rem;
  }

  .video-stats span {
    justify-content: center;
  }

  .trailer-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .game-card-overlay {
    transform: translateY(0);
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.95));
  }

  .carousel-btn {
    display: none; /* Ocultar en mobile muy pequeño */
  }
}

/* Animaciones adicionales */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-scale {
  animation: fadeInScale 0.5s ease-out;
}

/* Efectos de parallax simples */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Hover effects adicionales */
.card:hover .card-title {
  color: var(--primary-color);
}

.game-card:hover .game-title {
  color: var(--primary-color);
  text-shadow: 0 0 10px rgba(245, 200, 66, 0.5);
}

/* Notification styles */
#notifications-container .notification {
  margin-bottom: 10px;
}

.notification-error {
  border-left-color: var(--error-color) !important;
}

.notification-success {
  border-left-color: var(--success-color) !important;
}

.notification-warning {
  border-left-color: var(--warning-color) !important;
}

.notification-info {
  border-left-color: var(--highlight-color) !important;
}