/* ═══════════════════════════════════════════════
   SITIOPEDIA · Diseño Cinema (Modo Oscuro Elegante)
   ═══════════════════════════════════════════════ */
:root {
  --bg: #0F0F13;
  --bg-2: #1A1A24;
  --panel: #1A1A24;
  --panel-2: #252533;
  --linea: #2D2D3F;
  --linea-2: #3D3D52;
  
  --tinta: #EAEAEA;
  --tinta-2: #A0A0B0;
  --tinta-3: #6B6B80;
  
  --purple: #8A2BE2;
  --purple-osc: #6A1B9A;
  --purple-suave: rgba(138, 43, 226, 0.15);
  --cyan: #00E5FF;
  --cyan-suave: rgba(0, 229, 255, 0.15);
  
  --titulo: 'Space Grotesk', sans-serif;
  --cuerpo: 'Inter', sans-serif;
  
  --radio-s: 8px;
  --radio-m: 14px;
  --radio-l: 22px;
  
  --sombra-s: 0 2px 8px rgba(0,0,0,0.3);
  --sombra-m: 0 8px 24px rgba(0,0,0,0.4);
  --sombra-l: 0 16px 48px rgba(0,0,0,0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--cuerpo); background: var(--bg); color: var(--tinta); min-height: 100vh; overflow-x: hidden; position: relative; }

.bg-pattern-cinema { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

/* Header */
.header-cinema { position: sticky; top: 0; z-index: 50; background: rgba(15, 15, 19, 0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--linea); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 18px 28px; display: flex; justify-content: space-between; align-items: center; }
.logo-cinema { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--tinta); }
.logo-icon { font-size: 28px; }
.logo-text { font-family: var(--titulo); font-weight: 700; font-size: 24px; letter-spacing: -0.5px; }
.logo-accent { color: var(--purple); font-weight: 700; }

/* Main */
.main-cinema { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 28px 80px; }

/* Hero */
.hero-cinema { padding: 80px 0 40px; text-align: center; }
.hero-title { font-family: var(--titulo); font-size: clamp(36px, 6vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -1.5px; color: var(--tinta); margin-bottom: 20px; }
.accent-cyan { color: var(--cyan); }
.accent-purple { color: var(--purple); }
.hero-subtitle { font-size: 18px; line-height: 1.6; color: var(--tinta-2); max-width: 620px; margin: 0 auto 40px; }

/* Search */
.search-form-cinema { max-width: 680px; margin: 0 auto 28px; }
.search-box-cinema { display: flex; align-items: center; gap: 12px; background: var(--bg-2); border: 2px solid var(--linea); border-radius: 100px; padding: 8px 8px 8px 24px; box-shadow: var(--sombra-m); transition: all 0.25s ease; }
.search-box-cinema:focus-within { border-color: var(--purple); box-shadow: 0 0 0 5px var(--purple-suave), var(--sombra-l); transform: translateY(-1px); }
.search-icon { color: var(--tinta-3); flex: none; display: flex; align-items: center; }
#q { flex: 1; background: none; border: 0; outline: 0; font: 500 17px var(--cuerpo); color: var(--tinta); min-width: 0; }
#q::placeholder { color: var(--tinta-3); }
.btn-search-cinema { font-family: var(--titulo); font-size: 15px; font-weight: 600; background: var(--purple); color: white; border: 0; border-radius: 100px; padding: 14px 28px; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; box-shadow: 0 4px 0 var(--purple-osc); }
.btn-search-cinema:hover { background: var(--purple-osc); transform: translateY(1px); box-shadow: 0 3px 0 var(--purple-osc); }
.btn-search-cinema:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--purple-osc); }

/* Chips & Steps */
.chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 48px; }
.chip { font-family: var(--cuerpo); font-size: 14px; font-weight: 500; color: var(--tinta-2); background: var(--bg-2); border: 1px solid var(--linea); border-radius: 100px; padding: 9px 18px; cursor: pointer; transition: all 0.2s ease; }
.chip:hover { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-suave); transform: translateY(-2px); }

.steps-cinema { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.step { display: flex; align-items: center; gap: 12px; background: var(--bg-2); padding: 14px 22px; border-radius: var(--radio-l); border: 1px solid var(--linea); box-shadow: var(--sombra-s); }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: white; font-family: var(--titulo); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.step-text { font-size: 15px; font-weight: 500; color: var(--tinta); }
.step-arrow { color: var(--tinta-3); font-size: 22px; }

/* Recientes */
.recientes { margin-top: 32px; }
.recientes-label { font-family: var(--titulo); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; color: var(--tinta-3); text-transform: uppercase; margin-bottom: 12px; }

/* Resultados */
.resultados-cinema { padding-top: 40px; }
.resultados-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.btn-volver-cinema { display: inline-flex; align-items: center; gap: 8px; font-family: var(--titulo); font-size: 14px; font-weight: 600; color: var(--cyan); background: var(--cyan-suave); border: 0; border-radius: 100px; padding: 12px 20px; cursor: pointer; transition: all 0.2s ease; }
.btn-volver-cinema:hover { background: var(--cyan); color: var(--bg); transform: translateX(-3px); }
.meta-busqueda { font-family: var(--cuerpo); font-size: 13px; color: var(--tinta-2); }
.meta-busqueda b { color: var(--tinta); font-weight: 600; }

/* Loader */
.loader { background: var(--bg-2); border: 1px solid var(--linea); border-radius: var(--radio-l); padding: 40px; text-align: center; box-shadow: var(--sombra-m); animation: fadeIn 0.4s ease; }
.loader-icon { font-size: 48px; margin-bottom: 16px; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.loader-text { font-family: var(--titulo); font-size: 16px; font-weight: 500; color: var(--tinta-2); margin-bottom: 20px; }
.loader-bar { max-width: 320px; height: 6px; background: var(--linea); border-radius: 100px; margin: 0 auto; overflow: hidden; }
.loader-bar i { display: block; height: 100%; width: 5%; border-radius: 100px; background: linear-gradient(90deg, var(--purple), var(--cyan)); transition: width 0.5s ease; }

/* Paneles */
.panel-fuera, .panel-error { background: var(--bg-2); border: 2px solid; border-radius: var(--radio-l); padding: 48px 32px; text-align: center; box-shadow: var(--sombra-m); animation: fadeIn 0.4s ease; }
.panel-fuera { border-color: var(--cyan); background: var(--cyan-suave); }
.panel-error { border-color: #FF3B30; background: rgba(255, 59, 48, 0.1); }
.panel-fuera-icon, .panel-error-icon { font-size: 48px; margin-bottom: 16px; }
.panel-fuera h3, .panel-error h3 { font-family: var(--titulo); font-size: 22px; font-weight: 700; color: var(--tinta); margin-bottom: 12px; }
.panel-fuera p, .panel-error p { font-size: 15px; line-height: 1.6; color: var(--tinta-2); max-width: 500px; margin: 0 auto; }

/* Resumen Card */
.resumen-card-cinema { background: linear-gradient(135deg, var(--bg-2) 0%, var(--panel-2) 100%); border: 1px solid var(--linea); border-left: 5px solid var(--purple); border-radius: var(--radio-l); padding: 28px 32px; margin-bottom: 32px; box-shadow: var(--sombra-s); animation: fadeIn 0.5s ease; }
.etiqueta-ia { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; font-family: var(--titulo); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--purple); }
.tag-groq { font-family: var(--cuerpo); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--tinta-2); background: var(--bg); border: 1px solid var(--linea); padding: 4px 10px; border-radius: 6px; }
.resumen-card-cinema p { font-size: 17px; line-height: 1.65; color: var(--tinta); }

/* Grid & Cards */
.grid-resultados { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }
.lista { display: grid; gap: 20px; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card-cinema { background: var(--bg-2); border: 1px solid var(--linea); border-radius: var(--radio-l); padding: 24px; box-shadow: var(--sombra-s); opacity: 0; animation: fadeIn 0.5s ease forwards; transition: all 0.25s ease; }
.card-cinema:hover { border-color: var(--purple); transform: translateY(-3px); box-shadow: var(--sombra-l); }
.card-cinema.recomendada { border: 1px solid var(--cyan); background: linear-gradient(135deg, var(--bg-2) 0%, rgba(0, 229, 255, 0.05) 100%); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.card-top h3 { font-family: var(--titulo); font-size: 20px; font-weight: 700; line-height: 1.3; color: var(--tinta); letter-spacing: -0.3px; }

.badge-recomendado { display: inline-flex; align-items: center; gap: 6px; font-family: var(--titulo); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--bg); background: var(--cyan); padding: 6px 14px; border-radius: 100px; margin: 8px 0 14px; }

/* Momentos Clave */
.momentos-clave-box { margin: 14px 0; }
.momentos-clave-box h4 { font-family: var(--titulo); font-size: 14px; font-weight: 600; color: var(--cyan); margin-bottom: 10px; }
.guia-cinema { margin: 0; display: grid; gap: 10px; list-style: none; counter-reset: paso; }
.guia-cinema li { counter-increment: paso; position: relative; padding: 14px 18px 14px 56px; background: var(--panel-2); border: 1px solid var(--linea); border-radius: var(--radio-m); font-size: 15px; line-height: 1.55; color: var(--tinta); transition: all 0.2s ease; }
.guia-cinema li:hover { border-color: var(--purple); transform: translateX(4px); background: var(--purple-suave); }
.guia-cinema li::before { content: counter(paso, decimal-leading-zero); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; background: var(--purple); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--titulo); font-size: 12px; font-weight: 700; }

/* Tags & Veredicto */
.tags-cinema { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.tag { font-family: var(--cuerpo); font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 100px; border: 1px solid; }
.tag-tipo { font-family: var(--titulo); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 6px 12px; border: 0; color: white; }
.tipo-episodio { background: var(--purple); }
.tipo-capitulo { background: var(--cyan); color: var(--bg); }
.tipo-pelicula { background: #FF3B30; }
.tipo-arco { background: #FFB800; color: var(--bg); }
.tag-char { color: var(--tinta-2); border-color: var(--linea); background: var(--panel-2); }

.veredicto { margin-top: 14px; font-size: 14px; line-height: 1.6; color: var(--tinta-2); background: var(--panel-2); padding: 12px 16px; border-radius: var(--radio-m); border-left: 3px solid var(--cyan); }

.card-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linea); flex-wrap: wrap; }
.verif { font-family: var(--cuerpo); font-size: 12px; color: var(--tinta-3); }
.fuente-link { font-family: var(--cuerpo); font-size: 13px; font-weight: 600; color: var(--cyan); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; transition: all 0.2s ease; }
.fuente-link:hover { color: white; text-decoration: underline; }

/* Fuentes Sidebar */
.fuentes { position: sticky; top: 100px; background: var(--bg-2); border: 1px solid var(--linea); border-radius: var(--radio-l); padding: 24px; box-shadow: var(--sombra-s); }
.fuentes h4 { font-family: var(--titulo); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--purple); text-transform: uppercase; margin-bottom: 18px; }
.fuentes ol { list-style: none; display: grid; gap: 14px; counter-reset: f; }
.fuentes li { counter-increment: f; font-size: 13px; line-height: 1.45; }
.fuentes li a { color: var(--tinta); text-decoration: none; font-weight: 500; display: block; transition: color 0.2s; }
.fuentes li a::before { content: "[" counter(f, decimal-leading-zero) "] "; color: var(--purple); font-family: var(--cuerpo); font-size: 12px; font-weight: 600; }
.fuentes li a:hover { color: var(--cyan); }
.fuentes li small { color: var(--tinta-3); font-size: 11px; display: block; margin-top: 3px; word-break: break-all; }
.fuente-recomendada { display: inline-block; font-family: var(--titulo); font-size: 9px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--bg); background: var(--cyan); padding: 3px 8px; border-radius: 100px; margin-bottom: 4px; }

/* Footer */
.footer-cinema { position: relative; z-index: 1; border-top: 1px solid var(--linea); background: var(--bg-2); margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 40px 28px; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; }
.footer-text { font-size: 13px; color: var(--tinta-2); max-width: 560px; margin: 0 auto 14px; line-height: 1.6; }
.footer-links { font-family: var(--cuerpo); font-size: 13px; color: var(--tinta-3); display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.footer-links a { color: var(--tinta-2); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--cyan); }

/* Responsive */
@media (max-width: 900px) { .grid-resultados { grid-template-columns: 1fr; } .fuentes { position: static; } .step-arrow { display: none; } .steps-cinema { gap: 10px; } }
@media (max-width: 600px) { .header-inner { padding: 14px 18px; } .logo-text { font-size: 20px; } .hero-cinema { padding: 48px 0 30px; } .search-box-cinema { padding: 6px 6px 6px 18px; } .btn-search-cinema { padding: 12px 20px; font-size: 14px; } .steps-cinema { flex-direction: column; gap: 8px; } .step { width: 100%; justify-content: center; } }