/* === RESET Y VARIABLES === */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --bg-hover: #222222;
  --accent: #ff6b00;
  --accent-hover: #e05d00;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #777777;
  --border: #2a2a2a;
  --gradient-hero: linear-gradient(to top, #0a0a0a 0%, transparent 60%, rgba(0,0,0,0.7) 100%);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-hover: 0 8px 30px rgba(255,107,0,0.3);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* === NAVBAR === */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.7rem 5%;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.7rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #ff9800);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
  letter-spacing: -1px;
  white-space: nowrap;
  transition: var(--transition);
}
.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.4rem 0;
  position: relative;
  white-space: nowrap;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
  border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.search-box input {
  background: var(--bg-secondary) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: 25px !important;
  padding: 0.5rem 1.2rem !important;
  font-size: 0.85rem !important;
  width: 100% !important;
  transition: var(--transition) !important;
}
.search-box input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.15) !important;
  outline: none !important;
}

/* === HERO BANNER === */
.hero {
  position: relative;
  width: 100%;
  height: 80vh;
  min-height: 450px;
  background-size: cover;
  background-position: center 25%;
  display: flex;
  align-items: flex-end;
  margin-bottom: 1rem;
  animation: fadeIn 1s ease;
  padding-top: 60px;
  box-sizing: border-box;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: smooth;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, #0a0a0a 0%, transparent 50%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem 5%;
  max-width: 650px;
  max-height: 100%;
  overflow: hidden;
}

.hero-content h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.2;
  color: #fff;
  text-shadow: 2px 4px 20px rgba(0,0,0,0.9);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.hero-content p {
  font-size: 1rem;
  color: #ccc;
  margin-bottom: 1.5rem;
  text-shadow: 1px 2px 10px rgba(0,0,0,0.8);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.8rem 2.2rem;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  letter-spacing: 0.5px;
}
.btn-play:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

/* === SECCIONES === */
.section {
  padding: 2rem 5%;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  position: relative;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 28px;
  background: var(--accent);
  border-radius: 2px;
}

/* === GRID DE TARJETAS === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.2rem;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  border: 1px solid transparent;
}
.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  z-index: 10;
}

.card-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}
.card:hover .card-img {
  transform: scale(1.05);
}

.card-body {
  padding: 0.8rem;
  background: linear-gradient(to top, var(--bg-card), transparent);
}

.card-title {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.card-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.type-badge {
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card::after {
  content: '▶';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 2.5rem;
  color: #fff;
  background: rgba(255, 107, 0, 0.8);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
}
.card:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* === FOOTER === */
.footer {
  text-align: center;
  padding: 2.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  background: var(--bg-secondary);
}

/* === ANIMACIONES === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
  .hero {
    height: 55vh;
    min-height: 350px;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.6rem 3%;
  }
  .hero {
    height: 45vh;
    min-height: 300px;
  }
  .hero-content {
    padding: 2rem 4%;
  }
  .hero-content h1 {
    font-size: 1.6rem;
  }
  .hero-content p {
    font-size: 0.85rem;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.8rem;
  }
  .section {
    padding: 1.5rem 3%;
  }
  .nav-links {
    gap: 0.8rem;
  }
  .logo {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }
  .hero-content h1 {
    font-size: 1.3rem;
  }
  .btn-play {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }
}
