/* ============================================
   Variables y Reset
   ============================================ */
:root {
  --primary-green: #00ff55;
  --dark-green: #00b33c;
  --accent-green: #39ff14;
  --bg-dark: #070b10;
  --bg-darker: #04070a;
  --bg-card: #0d151e;
  --bg-card-hover: #121c27;
  --text-white: #ffffff;
  --text-gray: #94a3b8;
  --text-light-gray: #cbd5e1;
  --gradient-green: linear-gradient(135deg, #00ff55, #00b33c);
  --glow-green: 0 0 20px rgba(0, 255, 85, 0.45);
  --glow-green-intense: 0 0 35px rgba(0, 255, 85, 0.75), 0 0 12px rgba(57, 255, 20, 0.85);
  --border-omnitrix: rgba(0, 255, 85, 0.18);
  --border-omnitrix-hover: rgba(0, 255, 85, 0.65);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Accesibilidad: Enlace de salto y foco */
:focus-visible {
  outline: 2px solid var(--primary-green);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary-green);
  color: var(--bg-dark);
  padding: 0.8rem 1.4rem;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 8px;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* ============================================
   Navegación
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(7, 11, 16, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-omnitrix);
  transition: background 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
}

.logo-text {
  font-family: "Orbitron", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: 2px;
}

.logo-text .green {
  color: var(--primary-green);
  text-shadow: var(--glow-green);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: clamp(0.75rem, 1.8vw, 1.8rem);
  align-items: center;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.nav-links a {
  color: var(--text-light-gray);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
  font-size: 0.95rem;
}

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

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-green);
  transition: width 0.3s ease;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary-green);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 2;
}

.omnitrix-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  background: radial-gradient(
    circle,
    rgba(0, 255, 85, 0.18) 0%,
    transparent 70%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.hero-title {
  font-family: "Orbitron", sans-serif;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-gray);
  letter-spacing: 4px;
}

.title-hero {
  display: block;
  font-size: 4.5rem;
  font-weight: 900;
  color: var(--primary-green);
  text-shadow: var(--glow-green-intense);
  letter-spacing: 8px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-light-gray);
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: var(--gradient-green);
  color: var(--bg-dark);
  box-shadow: var(--glow-green);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-green-intense);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn-secondary:hover {
  background: rgba(0, 255, 85, 0.1);
  transform: translateY(-3px);
  box-shadow: var(--glow-green);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.omnitrix-container {
  width: 270px;
  height: 270px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.omnitrix {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, #151d26 0%, #080d12 100%);
  border: 5px solid #24303f;
  box-shadow:
    0 0 45px rgba(0, 255, 85, 0.35),
    inset 0 0 25px rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: pulse 4s ease-in-out infinite;
}

.omnitrix-symbol {
  width: 78%;
  height: 78%;
  display: flex;
  justify-content: center;
  align-items: center;
  filter: drop-shadow(0 0 24px var(--primary-green));
}

.omnitrix-hourglass {
  width: 100%;
  height: 100%;
  animation: rotate 20s linear infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 45px rgba(0, 255, 85, 0.35), inset 0 0 45px rgba(0, 0, 0, 0.9);
  }
  50% {
    box-shadow: 0 0 75px rgba(0, 255, 85, 0.65), inset 0 0 45px rgba(0, 0, 0, 0.9);
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   Cabeceras de Sección
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  color: var(--text-white);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-green);
  border-radius: 2px;
}

.section-subtitle {
  color: var(--text-gray);
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* ============================================
   Catálogo de Series (index.html)
   ============================================ */
.series-section {
  padding: 6rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
}

.series-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}

.series-card {
  background: linear-gradient(180deg, #0e1620 0%, #080d13 100%);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-omnitrix);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.series-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-green);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 35px rgba(0, 255, 85, 0.3);
}

.series-image {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #04070a;
  overflow: hidden;
}

.series-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.series-card:hover .series-cover-img {
  transform: scale(1.06);
}

.series-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 7, 10, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.series-card:hover .series-overlay {
  opacity: 1;
}

.btn-watch {
  padding: 0.85rem 2rem;
  background: var(--gradient-green);
  color: var(--bg-dark);
  text-decoration: none;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  border-radius: 30px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.btn-watch:hover {
  box-shadow: var(--glow-green-intense);
  transform: scale(1.08);
}

.series-info {
  padding: 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.series-info h3 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-white);
  line-height: 1.3;
}

.series-meta {
  display: flex;
  justify-content: space-between;
  color: var(--primary-green);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  font-family: "Orbitron", sans-serif;
}

.series-description {
  color: var(--text-light-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
  flex: 1;
}

.series-episodes-preview h4 {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-bottom: 0.8rem;
}

.season-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.season-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.season-number {
  color: var(--primary-green);
  font-weight: 700;
}

.season-eps {
  color: var(--text-gray);
  margin-left: 0.3rem;
}

/* ============================================
   Páginas Individuales de Series (.series-page)
   ============================================ */
.series-page {
  padding: 7rem 2rem 4rem;
  max-width: 1000px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--primary-green);
  text-decoration: none;
  font-family: "Orbitron", sans-serif;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.back-link:hover {
  transform: translateX(-5px);
  text-shadow: var(--glow-green);
}

.series-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.series-hero h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.5rem;
  color: var(--primary-green);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(0, 255, 85, 0.4);
}

.series-hero .series-years {
  font-family: "Orbitron", sans-serif;
  color: var(--text-gray);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.series-hero .series-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.stat-badge {
  background: rgba(0, 255, 85, 0.1);
  border: 1px solid rgba(0, 255, 85, 0.3);
  padding: 0.5rem 1.2rem;
  border-radius: 25px;
  color: var(--primary-green);
  font-family: "Orbitron", sans-serif;
  font-size: 0.85rem;
}

.series-synopsis {
  color: var(--text-light-gray);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 750px;
  margin: 0 auto 2.5rem;
  text-align: left;
}

.series-synopsis h2 {
  font-family: "Orbitron", sans-serif;
  font-size: 1.3rem;
  color: var(--text-white);
  margin: 2rem 0 1rem;
  border-bottom: 1px solid var(--border-omnitrix);
  padding-bottom: 0.4rem;
}

.series-synopsis p {
  margin-bottom: 1rem;
}

/* Reproductor de Video en Serie */
.player-section {
  margin: 2.5rem 0 3rem;
  display: none;
}

.player-section.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

.player-container {
  background: var(--bg-card);
  border: 1px solid rgba(0, 255, 85, 0.35);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 255, 85, 0.15);
}

.player-top {
  background: rgba(0, 255, 85, 0.1);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 255, 85, 0.2);
}

.player-top h3 {
  font-family: "Orbitron", sans-serif;
  color: var(--primary-green);
  font-size: 1rem;
}

.player-close {
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.5rem;
  transition: color 0.2s ease;
}

.player-close:hover {
  color: var(--primary-green);
}

.player-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000;
}

.player-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Bloques de Temporadas y Lista de Episodios */
.season-block {
  margin-bottom: 3rem;
}

.season-title {
  font-family: "Orbitron", sans-serif;
  font-size: 1.4rem;
  color: var(--primary-green);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 255, 85, 0.35);
}

.episodes-grid {
  display: grid;
  gap: 0.8rem;
}

.ep-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.ep-item:hover {
  border-color: rgba(0, 255, 85, 0.5);
  background: rgba(0, 255, 85, 0.08);
  transform: translateX(6px);
}

.ep-num {
  background: var(--primary-green);
  color: var(--bg-dark);
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 45px;
  text-align: center;
  font-family: "Orbitron", sans-serif;
}

.ep-title {
  flex: 1;
  color: var(--text-white);
  font-size: 0.95rem;
}

.ep-play {
  color: var(--primary-green);
  font-size: 1.1rem;
  opacity: 0.6;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ep-item:hover .ep-play {
  opacity: 1;
  transform: scale(1.15);
}

.nav-series {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: nowrap;
  margin: 3.5rem 0 2rem;
}

.nav-series a {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1.3rem;
  border-radius: 10px;
  color: var(--text-light-gray);
  text-decoration: none;
  font-size: 0.88rem;
  font-family: "Orbitron", sans-serif;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-series a:hover,
.nav-series a.current {
  border-color: var(--primary-green);
  color: var(--primary-green);
}

.nav-series a.current {
  background: rgba(0, 255, 85, 0.1);
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg-darker);
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-omnitrix);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-light-gray);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--primary-green);
}

.footer-author {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 255, 85, 0.1);
}

.footer-author p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

.footer-author a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.footer-author a:hover {
  text-shadow: var(--glow-green);
}

/* ============================================
   Animaciones & Keyframes
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Scrollbar Personalizado
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-green);
}

/* ============================================
   Diseño Responsivo (Mobile & Tablets)
   ============================================ */
@media (max-width: 1150px) {
  .series-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
  }
}

@media (max-width: 968px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 7rem;
    gap: 3rem;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7, 11, 16, 0.98);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-omnitrix);
  }

  .nav-links.active {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .omnitrix-container {
    width: 220px;
    height: 220px;
  }

  .title-hero {
    font-size: 3rem;
    letter-spacing: 5px;
  }

  .title-line {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }

  .series-page {
    padding-top: 6rem;
  }

  .series-hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 680px) {
  .series-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .nav-series {
    flex-wrap: wrap;
    gap: 0.6rem;
  }
}

@media (max-width: 480px) {
  .title-hero {
    font-size: 2.4rem;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .series-hero h1 {
    font-size: 1.7rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

/* ============================================
   Temática Unificada Omnitrix (Saga Ben Prime)
   ============================================ */
body.theme-af,
body.theme-ua,
body.theme-ov {
  --primary-green: #00ff55;
  --dark-green: #00b33c;
  --accent-green: #39ff14;
  --gradient-green: linear-gradient(135deg, #00ff55, #00b33c);
  --glow-green: 0 0 20px rgba(0, 255, 85, 0.45);
  --glow-green-intense: 0 0 35px rgba(0, 255, 85, 0.75), 0 0 12px rgba(57, 255, 20, 0.85);
}

/* ============================================
   Sección SEO / AEO: Guía Cronológica y FAQ
   ============================================ */
.seo-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 2rem 0 3.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-omnitrix);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.seo-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.seo-table th,
.seo-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.seo-table th {
  background: rgba(0, 255, 85, 0.08);
  color: var(--primary-green);
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.seo-table tr:last-child td {
  border-bottom: none;
}

.seo-table tr.total-row {
  background: rgba(0, 255, 85, 0.05);
  font-weight: 700;
  color: var(--primary-green);
}

.seo-table td a {
  color: var(--text-white);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.seo-table td a:hover {
  color: var(--primary-green);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 2rem;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.faq-card:hover {
  border-color: rgba(0, 255, 85, 0.4);
  transform: translateY(-2px);
}

.faq-question {
  font-family: "Orbitron", sans-serif;
  color: var(--text-white);
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.faq-question .icon {
  color: var(--primary-green);
  font-weight: 900;
}

.faq-answer {
  color: var(--text-light-gray);
  font-size: 0.98rem;
  line-height: 1.7;
}

