/* Variables - Apple TV Dark Theme */
:root {
  /* Brand Colors */
  --primary-color: #059fb5;
  --accent-color: #efab0b;
  --action-color: #e15f3a;

  /* Apple TV Dark Theme */
  --bg-color: #000000;
  --bg-secondary: #0a0a0a;
  --text-color: #f5f5f7;
  --text-secondary: #86868b;
  --header-bg: rgba(0, 0, 0, 0.8);
  --card-bg: #1d1d1f;
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);

  /* UI Elements */
  --filter-btn-bg: rgba(255, 255, 255, 0.08);
  --filter-btn-text: #d2d2d7;
  --banner-text: #ffffff;
  --menu-hover-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgba(255, 255, 255, 0.15);
}

/* Base Layout & Typography */
body {
  font-family: 'Inter', 'Roboto', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
.item-title,
.logo,
.filter-btn,
.menu-item {
  font-family: 'Montserrat', 'Poppins', sans-serif;
}

/* Header estilo streaming */
.header {
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-height: 70px;
  padding: 12px 5%;
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 20px;
  flex-wrap: wrap;
}

.contenedor-logo {
  display: flex;
  align-items: center;
}

.logo {
  height: 40px;
  width: auto;
  object-fit: contain;
}

.menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-item {
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.menu-item:hover {
  color: var(--primary-color);
  background-color: var(--menu-hover-bg);
}

/* Header Right Section */
.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

/* Social Icons */
.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #86868b;
  transition: all 0.3s ease;
  padding: 6px;
  border-radius: 4px;
}

.social-icon:hover {
  color: var(--primary-color);
  background-color: rgba(5, 159, 181, 0.1);
  transform: translateY(-2px);
}

.social-icon svg {
  width: 20px;
  height: 20px;
}

/* Search Container */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: #86868b;
  pointer-events: none;
  transition: color 0.3s ease;
}

.search-input {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  padding: 8px 12px 8px 38px;
  border-radius: 20px;
  font-size: 0.85rem;
  width: 250px;
  transition: all 0.3s ease;
  font-family: 'Inter', 'Roboto', sans-serif;
}

.search-input::placeholder {
  color: #86868b;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(5, 159, 181, 0.2);
}

.search-container:has(.search-input:focus) .search-icon {
  color: var(--primary-color);
}

/* Banner / Hero Section - Full Width Background Style */
.banner {
  margin-top: 70px;
  width: 100%;
  height: 65vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  padding: 0 8%;
  box-sizing: border-box;
}

/* Background Image Container */
.banner-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.background-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.8s ease-in-out;
}

/* Dark Overlay for Text Legibility */
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
      rgba(0, 0, 0, 0.85) 0%,
      rgba(0, 0, 0, 0.6) 50%,
      rgba(0, 0, 0, 0.4) 100%);
  z-index: 2;
}

/* Content Overlaid on Background */
.banner-content {
  position: relative;
  z-index: 3;
  max-width: 600px;
  text-align: left;
  color: var(--banner-text);
}

.banner h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: -1.5px;
  color: #f5f5f7;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.banner p {
  font-size: 1.15rem;
  margin: 0 0 2.5rem;
  color: #e0e0e0;
  font-weight: 400;
  line-height: 1.6;
  max-width: 90%;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.banner-cta {
  display: inline-block;
  background-color: #f5f5f7;
  color: #000;
  padding: 14px 36px;
  border-radius: 980px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.banner-cta:hover {
  background-color: #fff;
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
}

/* Contenido y Filtros */
.content {
  padding: 20px 5%;
  max-width: 1600px;
  margin: 0 auto;
}

.filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.filter-btn {
  background-color: var(--filter-btn-bg);
  color: var(--filter-btn-text);
  border: 1px solid transparent;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.filter-btn.active {
  background-color: var(--primary-color);
  color: #fff;
  box-shadow: 0 0 15px rgba(5, 159, 181, 0.4);
}

.author-select,
.genre-select {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--primary-color);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.author-select:focus,
.genre-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-color);
  background-color: rgba(5, 159, 181, 0.1);
}

.author-select option,
.genre-select option {
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Grid de Tarjetas - Apple TV Style */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
  padding-bottom: 80px;
}

/* Tarjetas tipo Poster 4:5 */
.item-card {
  background-color: transparent;
  border-radius: 8px;
  overflow: visible;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.item-card:hover {
  transform: scale(1.05);
  z-index: 10;
}

.item-card:hover .item-image {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.9),
    0 12px 32px rgba(0, 0, 0, 0.7);
}

.item-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Imagen Poster 4:5 */
.item-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  margin-bottom: 12px;
}

.item-info {
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.item-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 6px 0;
  color: var(--text-color);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-description {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Badges - Discretos */
.item-type,
.item-genre {
  position: absolute;
  top: 8px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10;
}

.item-type {
  right: 8px;
  background-color: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.item-genre {
  left: 8px;
  background-color: rgba(0, 0, 0, 0.6);
  color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Meta Info - Compacta */
.item-price {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: capitalize;
  margin-bottom: 6px;
  display: inline-block;
}

.item-author {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 8px;
  opacity: 0.7;
}

/* Rating - Discreto */
.item-rating {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 4px;
}

.stars {
  color: var(--text-secondary);
  font-size: 0.75rem;
  opacity: 0.8;
}

.rating-value {
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.75rem;
}

.rating-count {
  color: var(--text-secondary);
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Botones de Acción - Discretos */
.rating-buttons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.rating-btn {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: none;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.9rem;
}

.rating-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-color);
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 968px) {
  .header-right {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .search-input {
    width: 200px;
  }

  .banner {
    height: 55vh;
    min-height: 450px;
    padding: 0 5%;
  }

  .banner-content {
    text-align: center;
    max-width: 100%;
  }

  .banner-overlay {
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.85) 100%);
  }

  .banner h1 {
    font-size: 2.5rem;
  }

  .banner p {
    max-width: 100%;
    font-size: 1.05rem;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 10px 20px;
  }

  .menu {
    order: 2;
    width: 100%;
    justify-content: center;
    gap: 10px;
  }

  .menu-item {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .social-icons {
    gap: 8px;
  }

  .social-icon svg {
    width: 18px;
    height: 18px;
  }

  .search-input {
    width: 150px;
    font-size: 0.8rem;
    padding: 6px 10px 6px 32px;
  }

  .search-icon {
    width: 16px;
    height: 16px;
    left: 10px;
  }

  .banner {
    margin-top: 120px;
    height: 50vh;
    min-height: 400px;
    padding: 0 5%;
  }

  .banner h1 {
    font-size: 2rem;
    letter-spacing: -1px;
  }

  .banner p {
    font-size: 1rem;
  }

  .banner-cta {
    padding: 12px 28px;
    font-size: 0.95rem;
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 24px;
  }
}

.hero-extra {
  display: none;
}

/* Footer Styles */
.footer {
  background-color: rgba(10, 10, 10, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 60px;
  padding: 2.5rem 5%;
  width: 100%;
  box-sizing: border-box;
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  color: #86868b;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  transition: all 0.3s ease;
  position: relative;
  padding: 4px 0;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.footer-link:hover {
  color: var(--primary-color);
}

.footer-link:hover::after {
  width: 100%;
}

.footer-copyright {
  text-align: center;
}

.footer-copyright p {
  color: #86868b;
  font-size: 0.75rem;
  margin: 0;
  font-weight: 300;
  letter-spacing: 0.3px;
}

/* Footer Responsive */
@media (max-width: 768px) {
  .footer {
    padding: 2rem 5%;
    margin-top: 40px;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }

  .footer-link {
    font-size: 0.8rem;
  }

  .footer-copyright p {
    font-size: 0.7rem;
  }
}