/* =====================================================
   LinkupTEC Streaming - Movies Module (Netflix style)
   ===================================================== */

/* Hero banner */
.hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 480px;
  margin-bottom: 32px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-secondary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5);
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--bg-primary) 0%,
    rgba(10, 14, 26, 0.7) 40%,
    transparent 100%
  );
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--bg-primary) 0%,
    transparent 50%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 48px;
  max-width: 720px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 12px;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-rating {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
}

.hero-sinopsis {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 20px;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-hero {
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 700;
}

.btn-hero-secondary {
  background: rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(8px);
  color: var(--text-primary);
}

.btn-hero-secondary:hover { background: rgba(148, 163, 184, 0.3); }

/* Filas tipo Netflix */
.row-section { margin-bottom: 36px; }

.row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}

.row-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.row-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.row-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-tertiary) transparent;
}

.row-track::-webkit-scrollbar { height: 6px; }
.row-track::-webkit-scrollbar-track { background: transparent; }
.row-track::-webkit-scrollbar-thumb { background: var(--bg-tertiary); border-radius: 3px; }

/* Movie card (poster) */
.movie-card {
  flex: 0 0 180px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.movie-card:hover { transform: scale(1.05); z-index: 5; }

.movie-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border);
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.movie-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--text-muted);
  font-weight: 800;
  letter-spacing: -1px;
}

.movie-rating-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  border: 1px solid var(--border);
}

.movie-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.movie-info {
  padding: 8px 4px 0;
}

.movie-title {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.movie-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
}

.fav-btn-movie {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(10, 14, 26, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 3;
  font-size: 0.85rem;
}

.fav-btn-movie:hover { background: var(--bg-tertiary); }
.fav-btn-movie.active { color: var(--magenta); border-color: var(--magenta); }

/* Grid full (página de listado) */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

/* Movie detail modal */
.detail-modal .modal-content {
  max-width: 1000px;
  background: var(--bg-secondary);
}

.detail-hero {
  position: relative;
  height: 380px;
  background-size: cover;
  background-position: center top;
}

.detail-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, var(--bg-secondary) 100%);
}

.detail-body {
  padding: 0 32px 24px;
  margin-top: -120px;
  position: relative;
  z-index: 2;
}

.detail-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.detail-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.detail-genres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.genre-chip {
  padding: 4px 10px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.detail-sinopsis { font-size: 0.95rem; line-height: 1.6; color: var(--text-secondary); margin-bottom: 16px; }
.detail-cast { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.detail-cast strong { color: var(--text-primary); margin-right: 6px; }

.detail-actions { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { height: 50vh; min-height: 360px; }
  .hero-content { padding: 24px; }
  .hero-title { font-size: 1.75rem; }
  .movie-card { flex: 0 0 130px; }
  .movies-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
  .detail-hero { height: 240px; }
  .detail-title { font-size: 1.5rem; }
  .detail-body { padding: 0 16px 16px; margin-top: -60px; }
}
