/* Píxel Cósmico — misma línea gráfica que los vídeos */
@font-face { font-family: 'PressStart'; src: url('pressstart2p.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #0b0620; --ink: #ffffff; --soft: #dcdcf0; --dim: #a0a0c3;
  --yellow: #ffd750; --purple: #aa78ff; --pink: #ff4678; --pink2: #e63264;
  --cyan: #78dcff; --green: #6effa0; --red: #ff6464;
  --plate: rgba(8, 4, 20, .68); --chipbg: #1e1040;
  --pixel: 'PressStart', monospace; --body: 'VT323', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 23px; line-height: 1.25; overflow-x: hidden;
}
body::before {   /* fondo de nebulosa de los vídeos */
  content: ""; position: fixed; inset: 0; z-index: -2;
  background: url('bg.jpg') center / cover no-repeat; image-rendering: pixelated; opacity: .9;
}
#stars { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; image-rendering: pixelated; }
a { color: var(--cyan); }
img { max-width: 100%; display: block; }

.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 640px; padding: 80px 0; text-align: center; }

/* ---------- textos pixel (contorno oscuro como en los vídeos) ---------- */
.pix, .title, .chip, .btn, .card-title, .back, .section-head .count, .preview-bar, .foot-handle {
  font-family: var(--pixel); letter-spacing: .02em;
}
.title, .card-title, .hero-tag {
  text-shadow: 2px 0 #0a0618, -2px 0 #0a0618, 0 2px #0a0618, 0 -2px #0a0618, 2px 2px #0a0618, -2px -2px #0a0618, 2px -2px #0a0618, -2px 2px #0a0618;
}

/* ---------- chips (etiquetas de las escenas) ---------- */
.chip {
  display: inline-block; font-size: 11px; line-height: 1; padding: 8px 10px 7px;
  background: var(--chipbg); border: 2px solid currentColor; color: var(--yellow); white-space: nowrap;
}
.chip-yellow { color: var(--yellow); } .chip-pink { color: var(--pink); } .chip-cyan { color: var(--cyan); }
.chip-green { color: var(--green); } .chip-purple { color: var(--purple); }

/* ---------- placa de subtítulo ---------- */
.caption-plate {
  background: var(--plate); border-radius: 18px; padding: 14px 18px; margin: 12px 0 0; 
}
.caption-plate p { margin: 0 0 .5em; } .caption-plate p:last-child { margin: 0; }
.caption-plate.note { border: 2px solid var(--pink); }

/* ---------- botones (como el SÍGUENOS) ---------- */
.btn {
  display: inline-block; font-size: 11px; line-height: 1; padding: 12px 14px; color: #fff; text-decoration: none;
  background: var(--pink2); border: 2px solid #ffe6f0; box-shadow: 4px 4px 0 #0a0618; transition: transform .08s, background .15s;
}
.btn:hover { background: var(--pink); transform: translate(-1px, -1px); }
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #0a0618; }
.btn-tiktok { background: #25163f; border-color: var(--cyan); }
.btn-instagram { background: #4a1640; border-color: var(--pink); }
.btn-youtube { background: #5a1414; border-color: var(--red); }
.btn-tiktok:hover { background: #352058; } .btn-instagram:hover { background: #64205a; } .btn-youtube:hover { background: #7a1c1c; }
.socials { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- portada ---------- */
.hero { text-align: center; padding: 18px 16px 8px; }
.hero-logo {
  width: min(560px, 100%); height: auto; margin: 0 auto; image-rendering: pixelated;
}
.hero-tag { max-width: 620px; margin: 0 auto 18px; color: var(--soft); font-size: 24px; }
.section-head { display: flex; align-items: center; gap: 14px; margin: 26px 0 16px; flex-wrap: wrap; }
.section-head .count { font-size: 10px; color: var(--dim); }

/* ---------- rejilla de vídeos ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.card-img {
  display: block; aspect-ratio: 9 / 16; overflow: hidden; border: 3px solid #2a1a55; background: #120a2a;
  box-shadow: 5px 5px 0 #0a0618; transition: transform .12s, border-color .12s, box-shadow .12s;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-img { transform: translate(-2px, -3px); border-color: var(--purple); box-shadow: 7px 8px 0 #0a0618, 0 0 24px rgba(170, 120, 255, .45); }
.card-title { font-size: 10px; line-height: 1.6; }

/* ---------- página de vídeo ---------- */
.topbar { padding: 18px 0 6px; }
.back { font-size: 11px; color: var(--yellow); text-decoration: none; }
.back:hover { color: #fff; }
.video { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 34px; align-items: start; padding: 10px 0 30px; }
.video-media { position: sticky; top: 16px; }
.cover, .embed { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border: 3px solid #2a1a55; box-shadow: 6px 6px 0 #0a0618; background: #000; }
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.watch { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.title { font-size: clamp(16px, 2.6vw, 24px); line-height: 1.5; margin: 0 0 16px; color: var(--yellow); }
.desc { color: var(--soft); }
.desc p { margin: 0 0 .7em; }
.block { margin-top: 26px; }
.script { margin-top: 12px; border-left: 3px solid #3a2a70; padding-left: 16px; }
.script p { margin: 0 0 .55em; color: #fff; }
.sources { margin: 12px 0 0; padding-left: 0; list-style: none; }
.sources li { margin: 0 0 6px; } .sources li::before { content: '▸ '; color: var(--green); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tags span { font-size: 20px; color: var(--purple); background: rgba(30, 16, 64, .7); padding: 2px 8px; }
.pager { display: flex; justify-content: space-between; padding: 6px 0 20px; }
.preview-bar { position: sticky; top: 0; z-index: 5; background: var(--pink2); color: #fff; font-size: 10px; text-align: center; padding: 10px; line-height: 1.6; }
.preview-bar a { color: #fff; }

/* ---------- pie ---------- */
.foot { text-align: center; padding: 40px 16px 50px; }
.foot-handle { font-size: 11px; color: var(--purple); margin: 18px 0 6px; }
.foot-small { color: var(--dim); font-size: 19px; margin: 0; }

@media (max-width: 760px) {
  body { font-size: 21px; }
  .video { grid-template-columns: 1fr; gap: 22px; }
  .video-media { position: static; max-width: 360px; margin: 0 auto; width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-title { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) { #stars { display: none; } }

/* ---------- panel ---------- */
.admin { padding: 20px 0 60px; }
.admin h1 { font-family: var(--pixel); font-size: 16px; color: var(--yellow); line-height: 1.5; margin: 6px 0 18px; }
.admin h2 { font-family: var(--pixel); font-size: 12px; color: var(--cyan); margin: 34px 0 12px; }
.admin-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.admin-bar .left, .admin-bar .right { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.panel { background: var(--plate); border: 2px solid #2a1a55; padding: 18px; }
.flash { font-family: var(--pixel); font-size: 10px; line-height: 1.6; padding: 12px 14px; margin-bottom: 16px; border: 2px solid var(--green); color: var(--green); background: var(--chipbg); }
.flash.err { border-color: var(--red); color: var(--red); }
.vlist { display: flex; flex-direction: column; gap: 10px; }
.vrow { display: grid; grid-template-columns: 54px 46px 1fr auto; gap: 14px; align-items: center; background: var(--plate); border: 2px solid #2a1a55; padding: 8px 12px 8px 8px; }
.vrow.off { opacity: .6; }
.vrow img { width: 54px; height: 96px; object-fit: cover; border: 2px solid #2a1a55; }
.vrow .num { font-family: var(--pixel); font-size: 11px; color: var(--dim); }
.vrow .vt { font-size: 22px; line-height: 1.15; }
.vrow .links { font-family: var(--pixel); font-size: 8px; margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.vrow .links span { padding: 3px 5px; border: 1px solid #3a2a70; color: var(--dim); }
.vrow .links span.on { border-color: var(--green); color: var(--green); }
.vrow .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn.sm { font-size: 9px; padding: 9px 10px; box-shadow: 3px 3px 0 #0a0618; }
.btn.ghost { background: #1e1040; border-color: #6a5aa0; }
.btn.ok { background: #1d5a3a; border-color: var(--green); }
.btn.warn { background: #5a1414; border-color: var(--red); }
button.btn { cursor: pointer; font-family: var(--pixel); }
form.inline { display: inline; margin: 0; }
.form label { display: block; font-family: var(--pixel); font-size: 10px; color: var(--yellow); margin: 18px 0 8px; line-height: 1.5; }
.form label small { font-family: var(--body); font-size: 18px; color: var(--dim); letter-spacing: 0; }
.form input[type=text], .form input[type=url], .form input[type=number], .form input[type=password], .form input[type=email], .form textarea {
  width: 100%; font-family: var(--body); font-size: 22px; color: #fff; background: #0e0826; border: 2px solid #3a2a70; padding: 8px 10px; border-radius: 0;
}
.form textarea { min-height: 120px; resize: vertical; line-height: 1.25; }
.form textarea.tall { min-height: 260px; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(170, 120, 255, .25); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.check { display: flex !important; align-items: center; gap: 12px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }
.edit-grid { display: grid; grid-template-columns: 1fr 230px; gap: 26px; align-items: start; }
.edit-side { position: sticky; top: 16px; }
.edit-side img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border: 3px solid #2a1a55; box-shadow: 5px 5px 0 #0a0618; }
.save-bar { position: sticky; bottom: 0; background: rgba(11, 6, 32, .94); border-top: 2px solid #2a1a55; padding: 12px 0; margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.login { max-width: 420px; margin: 8vh auto; }
.login .hero-logo { width: 300px; }
@media (max-width: 760px) {
  .vrow { grid-template-columns: 46px 1fr; }
  .vrow .num { display: none; }
  .vrow img { width: 46px; height: 82px; }
  .vrow .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .edit-grid { grid-template-columns: 1fr; }
  .edit-side { position: static; max-width: 220px; }
  .form .row2, .form .row3 { grid-template-columns: 1fr; }
}

/* La fuente pixel no trae mayúsculas acentuadas: pintamos la tilde a mano */
.acc { position: relative; display: inline-block; }
.acc::after { content: ""; position: absolute; left: 42%; top: -.32em; width: .32em; height: .16em; background: currentColor; transform: skewX(-45deg); }
.acc.tilde::after { left: 15%; width: .7em; top: -.3em; height: .12em; transform: none; border-radius: 1px; }



.btn .ico { height: 15px; width: auto; vertical-align: -3px; margin-right: 9px; }
.btn { display: inline-flex; align-items: center; }

.hero-logo { aspect-ratio: 3 / 2; image-rendering: pixelated; opacity: 0; }
.hero-logo.ready { opacity: 1; }
/* botón volver */
.topbar .btn-home { font-size: 12px; padding: 14px 18px; }
.btn-home .ico { height: 13px; }

/* ---------- pantalla de carga pixel ---------- */
#loader { display: none; }
.js #loader {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  background: #0b0620; transition: opacity .35s ease;
}
#loader.out { opacity: 0; pointer-events: none; }
#loader p { margin: 0; font-family: var(--pixel); font-size: 12px; color: var(--yellow); letter-spacing: .15em; text-shadow: 2px 2px 0 #0a0618; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.pxspin { position: relative; width: 72px; height: 72px; }
.pxspin i { position: absolute; width: 12px; height: 12px; left: 30px; top: 30px; background: var(--purple); box-shadow: 0 0 0 2px #0a0618; animation: pxdot .8s steps(1) infinite; }
.pxspin i:nth-child(1) { transform: translate(0, -27px); animation-delay: 0s; }
.pxspin i:nth-child(2) { transform: translate(19px, -19px); animation-delay: .1s; }
.pxspin i:nth-child(3) { transform: translate(27px, 0); animation-delay: .2s; }
.pxspin i:nth-child(4) { transform: translate(19px, 19px); animation-delay: .3s; }
.pxspin i:nth-child(5) { transform: translate(0, 27px); animation-delay: .4s; }
.pxspin i:nth-child(6) { transform: translate(-19px, 19px); animation-delay: .5s; }
.pxspin i:nth-child(7) { transform: translate(-27px, 0); animation-delay: .6s; }
.pxspin i:nth-child(8) { transform: translate(-19px, -19px); animation-delay: .7s; }
@keyframes pxdot { 0% { background: var(--yellow); } 12.5% { background: #ff9a4a; } 25% { background: var(--pink); } 37.5%, 100% { background: #3a2a70; } }

.login-logo { width: 300px; max-width: 100%; margin: 0 auto 10px; image-rendering: pixelated; }
