/* ============= CATALOG LAYOUT ============= */

.catalog-layout {
  min-height: 100vh;
  background-color: #000;
  color: #fff;
}

/* ============= FULL WIDTH HEADER ============= */

.full-width-header {
  position: relative;
  width: 100%;
  height: 25vh;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  overflow: hidden;
}

.full-width-header h1 {
  font-family: "Special Elite", cursive;
  font-size: clamp(2rem, 8vw, 5rem);
  text-align: center;
  color: #f5d742;
  text-shadow: 
    0 0 20px rgba(245, 215, 66, 0.5),
    2px 2px 0 #000,
    -2px -2px 0 #000;
  z-index: 2;
  margin: 0;
  padding: 0 20px;
}

.back-link {
  font-family: "Special Elite", cursive;
  color: #f5d742;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 2px solid #f5d742;
  border-radius: 4px;
  transition: all 0.3s ease;
  z-index: 2;
  margin-top: 1rem;
}

.back-link:hover {
  background: #f5d742;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 215, 66, 0.4);
}

/* ============= FILM EFFECTS ============= */

.film-grain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  z-index: 1;
  pointer-events: none;
}

.old-film-scratches {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(255, 255, 255, 0.02) 50%
  );
  background-size: 100% 4px;
  opacity: 0.1;
  z-index: 1;
  pointer-events: none;
}

/* ============= MAIN CONTAINER ============= */

.main-container {
  display: flex;
  min-height: 100vh;
  background-color: #000;
}

.wide-sidebar {
  position: sticky;
  top: 0;
  width: 15vw;
  min-width: 150px;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  flex-shrink: 0;
  overflow: hidden;
}

.content-scrollable {
  flex: 1;
  padding: 2rem;
  position: relative;
  overflow-y: auto;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ============= MOVIES GRID ============= */

.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 200px));
  gap: 1.5rem;
  padding: 0;
  margin: 0 auto 3rem auto;
  list-style: none;
  width: 100%;
  max-width: 1000px;
  justify-content: center;
}

/* ============= SEARCH CONTROLS ============= */

.search-controls {
  max-width: 800px;
  margin: 1rem auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 2;
}

.search-input-wrapper {
  flex: 1;
}

#searchInput {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: 'Special Elite', cursive;
  background: rgba(245, 215, 66, 0.1);
  border: 2px solid #f5d742;
  color: #f5d742;
  border-radius: 4px;
  transition: all 0.3s ease;
}

#searchInput:focus {
  outline: none;
  background: rgba(245, 215, 66, 0.2);
  box-shadow: 0 0 20px rgba(245, 215, 66, 0.3);
}

#searchInput::placeholder {
  color: rgba(245, 215, 66, 0.5);
  font-family: "Special Elite", cursive;
}

.filter-wrapper {
  flex: 1;
}

#yearFilter {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: 'Special Elite', cursive;
  background: rgba(245, 215, 66, 0.1);
  border: 2px solid #f5d742;
  color: #f5d742;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#yearFilter:focus {
  outline: none;
  background: rgba(245, 215, 66, 0.2);
  box-shadow: 0 0 20px rgba(245, 215, 66, 0.3);
}

#yearFilter option {
  background: #000;
  color: #f5d742;
}

.clear-btn, .reset-btn {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-family: 'Special Elite', cursive;
  background: transparent;
  border: 2px solid #f5d742;
  color: #f5d742;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover, .reset-btn:hover {
  background: #f5d742;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 215, 66, 0.4);
}

/* ============= RESULTS ============= */

.results-info {
  font-family: "Special Elite", cursive;
  text-align: center;
  font-size: 1rem;
  color: rgba(245, 215, 66, 0.8);
  margin-bottom: 2rem;
}

.no-results {
  max-width: 600px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
}

.no-results p {
  font-family: "Special Elite", cursive;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

/* ============= RESPONSIVE ============= */

@media (min-width: 768px) {
  .search-controls {
    flex-direction: row;
    align-items: center;
  }

  .search-input-wrapper {
    flex: 2;
  }

  .filter-wrapper {
    flex: 1;
  }

  .clear-btn {
    flex-shrink: 0;
  }
}

/* ============= CATALOG INDEX (LANDING) ============= */

.catalog-index {
  min-height: 100vh;
  background: #000;
  color: #fff;
}

.catalog-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  overflow: hidden;
  padding: 2rem;
}

.catalog-hero h1 {
  font-family: "Special Elite", cursive;
  font-size: clamp(2.5rem, 10vw, 6rem);
  text-align: center;
  color: #f5d742;
  text-shadow:
    0 0 20px rgba(245, 215, 66, 0.5),
    2px 2px 0 #000,
    -2px -2px 0 #000;
  z-index: 2;
  margin: 0 0 2rem 0;
}

.catalog-stats {
  display: flex;
  gap: 4rem;
  margin: 2rem 0;
  z-index: 2;
}

.stat-item {
  font-family: "Special Elite", cursive;
  text-align: center;
}

.stat-number {
  font-family: "Special Elite", cursive;
  display: block;
  font-size: 3rem;
  font-weight: bold;
  color: #f5d742;
  text-shadow: 0 0 10px rgba(245, 215, 66, 0.3);
}

.stat-label {
  font-family: "Special Elite", cursive;
  display: block;
  font-size: 1rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 0.5rem;
}

.start-button {
  font-family: "Special Elite", cursive;
  margin-top: 3rem;
  padding: 1rem 3rem;
  font-size: 1.2rem;
  font-weight: bold;
  color: #000;
  background: #f5d742;
  border: 2px solid #f5d742;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
  box-shadow: 0 4px 20px rgba(245, 215, 66, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.start-button:hover {
  transform: translateY(-2px);
  background: #000;
  color: #f5d742;
  box-shadow: 0 6px 30px rgba(245, 215, 66, 0.5);
}

.catalog-hero .back-link {
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 10;
}

@media (max-width: 768px) {
  .catalog-stats {
    gap: 2rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .start-button {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
}

/* ============= CATALOG PAGE (PAGINATION) ============= */

.wide-sidebar {
  position: fixed;
  top: 0;
  width: 15vw;
  min-width: 150px;
  height: 100vh;
  background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.wide-sidebar-left {
  left: 0;
}

.wide-sidebar-right {
  right: 0;
  background: linear-gradient(225deg, #1a1a1a 0%, #000 100%);
}

.catalog-stats {
  font-size: 1.2rem;
  color: #888;
  margin-top: 1rem;
  z-index: 2;
  font-family: "Special Elite", cursive;
}

.header-links {
  display: flex;
  gap: 1rem;
  position: absolute;
  top: 2rem;
  left: 2rem;
  z-index: 10;
  flex-wrap: wrap;
}

.search-link {
  color: #f5d742;
  text-decoration: none;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  border: 2px solid #f5d742;
  border-radius: 4px;
  transition: all 0.3s ease;
  font-family: "Special Elite", cursive;
}

.search-link:hover {
  background: #f5d742;
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 215, 66, 0.4);
}

/* ============= PAGINATION ============= */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 2rem 0;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.pagination-link {
  color: #f5d742;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #f5d742;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-family: "Special Elite", cursive;
}

.pagination-link:hover {
  background: #f5d742;
  color: #000;
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
}

.pagination-current {
  padding: 0.5rem 1rem;
  background: #f5d742;
  color: #000;
  border-radius: 4px;
  font-family: "Special Elite", cursive;
  font-weight: bold;
}

/* ============= SCROLL ARROWS ============= */

.scroll-arrow {
  position: fixed;
  right: 2rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  z-index: 100;
}

.scroll-arrow:hover {
  opacity: 1;
}

.scroll-up {
  top: 2rem;
}

.scroll-down {
  bottom: 2rem;
}

.scroll-arrow img {
  width: 100%;
  height: 100%;
  filter: invert(1);
}

/* ============= CATALOG PAGE RESPONSIVE ============= */

@media (max-width: 1024px) {
  .wide-sidebar {
    width: 10vw;
    min-width: 100px;
  }
}

@media (max-width: 768px) {
  .full-width-header {
    height: auto;
    min-height: 180px;
    padding: 1rem;
  }

  .full-width-header h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    margin-top: 3rem;
    padding: 0 10px;
  }

  .catalog-stats {
    font-size: 0.9rem;
    margin-top: 0.5rem;
  }

  .header-links {
    position: relative;
    top: auto;
    left: auto;
    justify-content: center;
    width: 100%;
    margin-bottom: 1rem;
    gap: 0.5rem;
  }

  .back-link,
  .search-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .wide-sidebar {
    display: none;
  }

  .pagination {
    font-size: 0.9rem;
    gap: 0.5rem;
  }

  .pagination-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ============= CATALOG SELECTION MODE ============= */

.catalog-selection-banner {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(245, 215, 66, 0.95) 0%, rgba(212, 184, 42, 0.95) 100%);
  border-bottom: 3px solid #f5d742;
  padding: 1rem;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.banner-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #000;
}

.banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.banner-text {
  flex: 1;
}

.banner-text strong {
  font-family: "Special Elite", cursive;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.25rem;
}

.banner-text p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.banner-cancel {
  background: rgba(0, 0, 0, 0.2);
  color: #000;
  border: 2px solid rgba(0, 0, 0, 0.3);
  padding: 0.5rem 1rem;
  font-family: "Special Elite", cursive;
  font-size: 0.9rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
}

.banner-cancel:hover {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

/* Estilos para tarjetas en modo selección */
.movie-card.selectable {
  cursor: pointer;
  position: relative;
}

.movie-card.selectable::after {
  content: '🎬 SELECCIONAR';
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f5d742 0%, #d4b82a 100%);
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: "Special Elite", cursive;
  font-size: 0.85rem;
  font-weight: bold;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 10;
  white-space: nowrap;
}

.movie-card.selectable:hover::after {
  opacity: 1;
  bottom: 60px;
}

.movie-card.selectable:hover {
  box-shadow: 0 0 30px rgba(245, 215, 66, 0.6);
  border: 2px solid #f5d742;
  border-radius: 4px;
}

/* Responsive para banner */
@media (max-width: 768px) {
  .catalog-selection-banner {
    padding: 0.75rem;
  }

  .banner-content {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .banner-text strong {
    font-size: 1rem;
  }

  .banner-text p {
    font-size: 0.85rem;
  }

  .banner-cancel {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  .movie-card.selectable::after {
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
}
