/* =====================================================================
   CARTELES DEL NIVEL 6, EL AFTER (js/ui/carteles_disco.js)
   Cartel de neón de boliche (tubos rosa, celeste y violeta que se encienden letra por letra), la bola de espejos colgando, reflejos que giran
   por las paredes y una pista de baile de baldosas que se prenden. Objetos: bola y tragos (img/carteles/nivel6/). Sin caras de los rivales. El resplandor del neón es fijo: solo se anima la opacidad y el transform (nada de sombras ni filtros animados).
   ===================================================================== */
.tgc6-capa {
    --tgc6-rosa: #ff4fd8; --tgc6-celeste: #5ce6ff; --tgc6-violeta: #b483ff; --tgc6-noche: #12061f;
    position: fixed; inset: 0; z-index: 9001; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(12px, 2.6cqh, 28px);
    background: radial-gradient(ellipse at 50% 30%, rgba(70, 24, 110, .72), rgba(8, 2, 16, .95) 75%);
    opacity: 0; transition: opacity .3s ease;
}
.tgc6-capa.visible { opacity: 1; }

/* ---------- la bola de espejos ---------- */
.tgc6-bola { position: absolute; left: 50%; top: 0; width: clamp(70px, 12cqh, 130px); transform: translate(-50%, -110%); z-index: 1; pointer-events: none;
    transition: transform .9s cubic-bezier(.3, 1.4, .5, 1); }
.visible .tgc6-bola { transform: translate(-50%, 0); animation: tgc6Hamaca 3.2s ease-in-out .9s infinite alternate; transform-origin: 50% 0; }
@keyframes tgc6Hamaca { from { transform: translate(-50%, 0) rotate(-3deg); } to { transform: translate(-50%, 0) rotate(3deg); } }
.tgc6-bola .hilo { display: block; width: 2px; height: clamp(10px, 3cqh, 34px); margin: 0 auto; background: #8a7f99; }
.tgc6-bola .esfera { position: relative; border-radius: 50%; overflow: hidden; line-height: 0; }
.tgc6-bola .esfera .tgc6-objeto { width: 100%; height: auto; }
.tgc6-bola .brillo { position: absolute; top: 0; left: -100%; width: 300%; height: 100%; animation: tgc6Brillo 3s linear infinite;
    background: linear-gradient(100deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.3) 47%, rgba(230,200,255,.45) 50%, rgba(255,255,255,.3) 53%, rgba(255,255,255,0) 60%); }
@keyframes tgc6Brillo { from { transform: translateX(-34%); } to { transform: translateX(34%); } }
.tgc6-bola .destello { position: absolute; width: 60%; aspect-ratio: 1; opacity: 0; border-radius: 50%; pointer-events: none;
    background: linear-gradient(90deg, transparent 48.5%, #fff 50%, transparent 51.5%), linear-gradient(0deg, transparent 48.5%, #fff 50%, transparent 51.5%),
        radial-gradient(circle, #fff 0, rgba(255,230,255,.45) 8%, transparent 24%);
    -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 68%); mask-image: radial-gradient(circle, #000 12%, transparent 68%);
    animation: tgc6Destello 2.4s ease-out infinite; }
.tgc6-bola .destello.a { left: -14%; top: 30%; } .tgc6-bola .destello.b { right: -18%; top: 48%; animation-delay: .8s; } .tgc6-bola .destello.c { left: 32%; bottom: -24%; animation-delay: 1.6s; }
@keyframes tgc6Destello { 0%, 62%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 72% { opacity: 1; transform: scale(1) rotate(20deg); } 86% { opacity: 0; transform: scale(.4) rotate(45deg); } }

/* reflejos de la bola por las paredes */
.tgc6-reflejos { position: absolute; left: 50%; top: 6cqh; width: 160cqw; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: 0; transition: opacity .6s;
    animation: tgc6Gira 38s linear infinite; }
.visible .tgc6-reflejos { opacity: 1; }
@keyframes tgc6Gira { from { transform: translate(-50%, -50%) rotate(0); } to { transform: translate(-50%, -50%) rotate(360deg); } }
.tgc6-reflejos i { position: absolute; width: .9%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, var(--c) 0, transparent 70%);
    animation: tgc6Titila 1.6s ease-in-out infinite alternate; }
@keyframes tgc6Titila { from { opacity: .85; } to { opacity: .15; } }

/* ---------- la pista de baile ---------- */
.tgc6-pista { position: absolute; left: 50%; bottom: -2cqh; width: 130cqw; height: 26cqh; transform: translateX(-50%); perspective: 600px; pointer-events: none; opacity: 0; transition: opacity .5s; }
.pista-on .tgc6-pista { opacity: 1; }
.tgc6-baldosas { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px;
    transform: rotateX(58deg); transform-origin: 50% 100%; background: #080210; }
.tgc6-baldosas i { background: var(--c); opacity: .12; animation: tgc6Baldosa 1.6s steps(1, end) infinite; }
@keyframes tgc6Baldosa { 0% { opacity: .12; } 25% { opacity: .75; } 50% { opacity: .2; } 75% { opacity: .55; } }
.festejo .tgc6-baldosas i { animation-duration: .8s; }
.cierra .tgc6-baldosas i, .luces .tgc6-baldosas i { animation: none; opacity: .06; transition: opacity .8s; }

/* ---------- la escena: objetos a los costados del cartel ---------- */
.tgc6-escena { position: relative; z-index: 2; display: flex; align-items: center; gap: clamp(10px, 2.4cqw, 40px); }
.tgc6-lado { flex: 0 0 auto; display: flex; align-items: flex-end; justify-content: center; opacity: 0; position: relative; }
.tgc6-lado.izq { transform: translateX(-10cqw); } .tgc6-lado.der { transform: translateX(10cqw); }
.lados-on .tgc6-lado { opacity: 1; transform: none; transition: transform .7s cubic-bezier(.3, 1.4, .5, 1), opacity .25s; }
.lados-on .tgc6-lado.der { transition-delay: .15s; }
.tgc6-objeto { display: block; width: auto; pointer-events: none; }
.tgc6-lado .trago { height: clamp(90px, 20cqh, 210px); transform-origin: 50% 100%; }
.festejo .tgc6-lado .trago { animation: tgc6Menea .5s ease-in-out infinite alternate; }
.festejo .tgc6-lado .trago.brinda { animation: tgc6Brinda 1s ease-in-out infinite; }
@keyframes tgc6Menea { from { transform: rotate(-6deg); } to { transform: rotate(6deg) translateY(-8px); } }
@keyframes tgc6Brinda { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-16deg) translateX(-10px) translateY(-14px); } 55% { transform: rotate(-12deg) translateX(-12px) translateY(-10px); } }

/* ---------- el cartel de neón ---------- */
.tgc6-cartel {
    position: relative; z-index: 2; text-align: center; line-height: 1;
    padding: clamp(18px, 3.6cqh, 40px) clamp(22px, 3.6cqw, 60px);
    border-radius: 22px; background: rgba(14, 4, 26, .82);
    border: 3px solid var(--tgc6-rosa);
    box-shadow: 0 0 0 3px rgba(255, 79, 216, .25), 0 0 18px rgba(255, 79, 216, .55), inset 0 0 18px rgba(255, 79, 216, .35), 0 18px 40px rgba(0, 0, 0, .7);
    transform: translateY(30px) scale(.92); opacity: 0; transition: transform .5s cubic-bezier(.3, 1.5, .5, 1), opacity .3s ease;
}
.visible .tgc6-cartel { transform: none; opacity: 1; }
/* el marco titila un poquito, como un tubo viejo */
.visible .tgc6-cartel::after { content: ''; position: absolute; inset: -3px; border-radius: 22px; border: 3px solid #ffd6f6; opacity: 0; pointer-events: none;
    animation: tgc6Marco 4.5s steps(1, end) infinite; }
@keyframes tgc6Marco { 0%, 100% { opacity: 0; } 46% { opacity: .55; } 48% { opacity: 0; } 50% { opacity: .4; } 52% { opacity: 0; } }
.nos.festejo .tgc6-cartel { animation: tgc6Pulso .5s ease-in-out infinite alternate; }
@keyframes tgc6Pulso { to { transform: scale(1.025); } }

.tgc6-sub, .tgc6-serie {
    font-family: var(--tg-fuente-titulo, 'Arial Black', sans-serif); font-size: clamp(14px, 2cqw, 30px); letter-spacing: .22em;
    color: rgba(92, 230, 255, .2); transition: color .25s, text-shadow .25s; margin-bottom: .5em;
}
.tgc6-serie { margin: .6em 0 0; letter-spacing: .16em; }
.tgc6-sub.on, .tgc6-serie.on { color: #dff9ff; text-shadow: 0 0 6px var(--tgc6-celeste), 0 0 14px rgba(92, 230, 255, .6); }
.tgc6-superado .tgc6-serie { font-family: var(--tg-fuente-pizarron, 'Comic Sans MS', cursive); letter-spacing: .04em; text-transform: none; }

/* letras de neón: apagadas (tubo de vidrio oscuro) → se encienden parpadeando */
.tgc6-neon { position: relative; display: flex; justify-content: center; align-items: center; gap: clamp(1px, .2cqw, 4px); }
.tgc6-neon .esp { width: clamp(10px, 1.5cqw, 26px); }
.tgc6-letra { position: relative; display: block; font-family: var(--tg-fuente-titulo, 'Arial Black', sans-serif); font-size: clamp(30px, 5.4cqw, 92px);
    color: rgba(255, 255, 255, .1); -webkit-text-stroke: 1px rgba(255, 255, 255, .18); }
.tgc6-neon.grandes .tgc6-letra { font-size: clamp(36px, 6.6cqw, 112px); }
.tgc6-letra.on { animation: tgc6Prende .55s steps(1, end) both; }
.tgc6-letra.on.rosa { color: #ffe3f8; text-shadow: 0 0 4px #fff, 0 0 10px var(--tgc6-rosa), 0 0 22px var(--tgc6-rosa), 0 0 40px rgba(255, 79, 216, .6); -webkit-text-stroke: 0; }
.tgc6-letra.on.celeste { color: #e3fbff; text-shadow: 0 0 4px #fff, 0 0 10px var(--tgc6-celeste), 0 0 22px var(--tgc6-celeste), 0 0 40px rgba(92, 230, 255, .6); -webkit-text-stroke: 0; }
.tgc6-letra.on.violeta { color: #f0e6ff; text-shadow: 0 0 4px #fff, 0 0 10px var(--tgc6-violeta), 0 0 22px var(--tgc6-violeta), 0 0 40px rgba(180, 131, 255, .6); -webkit-text-stroke: 0; }
@keyframes tgc6Prende { 0% { opacity: .2; } 15% { opacity: 1; } 25% { opacity: .25; } 40% { opacity: 1; } 50% { opacity: .5; } 60%, 100% { opacity: 1; } }
/* festejo: las letras saltan */
.nos.festejo .tgc6-letra.on { animation: tgc6Prende .55s steps(1, end) both, tgc6Salta .42s ease-in-out .55s infinite alternate; }
.nos.festejo .tgc6-letra.on:nth-child(even) { animation-delay: 0s, .76s; }
@keyframes tgc6Salta { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-8px) rotate(2deg); } }
/* cortocircuito: la letra parpadea, chispea y queda apagada */
.tgc6-letra.on.corto { animation: tgc6Corto .9s steps(1, end) forwards; }
@keyframes tgc6Corto { 0% { opacity: 1; } 10% { opacity: .15; } 20% { opacity: 1; } 30% { opacity: .1; } 45% { opacity: .8; } 55% { opacity: .22; } 100% { opacity: .22; } }
.tgc6-chispas { position: absolute; top: 30%; width: 0; height: 0; pointer-events: none; z-index: 3; }
.tgc6-chispas i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fff6b0; box-shadow: 0 0 6px 2px #ffd23d; opacity: 0;
    animation: tgc6Chispa .7s ease-out forwards; }
@keyframes tgc6Chispa { 0% { opacity: 1; transform: translate(0, 0); } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
/* perdimos: el neón se va apagando (las letras quedan tenues, alguna titila) */
.cierra .tgc6-letra.on { opacity: .28; transition: opacity 1s; animation: none; }
.cierra .tgc6-letra.on:nth-child(3) { animation: tgc6Moribunda 1.4s steps(1, end) infinite; }
@keyframes tgc6Moribunda { 0%, 100% { opacity: .28; } 40% { opacity: .9; } 45% { opacity: .2; } 50% { opacity: .8; } 55% { opacity: .28; } }
.cierra .tgc6-cartel { box-shadow: 0 0 0 3px rgba(255, 79, 216, .1), 0 18px 40px rgba(0, 0, 0, .7); border-color: rgba(255, 79, 216, .35); transition: box-shadow 1s, border-color 1s; }

/* ---------- el champán: se descorcha ---------- */
.tgc6-champan { position: relative; line-height: 0; transform-origin: 50% 100%; }
.tgc6-champan .tgc6-objeto { height: clamp(120px, 27cqh, 280px); }
.tgc6-champan .corcho { position: absolute; left: 50%; top: 0; width: 18%; aspect-ratio: .8; margin-left: -9%; border-radius: 40% 40% 20% 20%;
    background: linear-gradient(90deg, #a87342, #e2b47c 45%, #9c6534); box-shadow: inset 0 -3px 0 #6d4422; opacity: 0; }
.descorcha .tgc6-champan { animation: tgc6Sacude .35s ease-in-out 2; }
@keyframes tgc6Sacude { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-7deg); } 70% { transform: rotate(7deg); } }
.descorcha .tgc6-champan .corcho { animation: tgc6Corcho 1.1s cubic-bezier(.2, .8, .4, 1) .45s forwards; }
@keyframes tgc6Corcho { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 60% { opacity: 1; transform: translate(40px, -42cqh) rotate(540deg); } 100% { opacity: 0; transform: translate(60px, -60cqh) rotate(800deg); } }
.tgc6-champan .espuma { position: absolute; left: 50%; top: 2%; width: 0; height: 0; pointer-events: none; }
.tgc6-champan .espuma i { position: absolute; width: clamp(10px, 1.8cqh, 20px); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 252, 235, .95); opacity: 0; }
.descorcha .tgc6-champan .espuma i { animation: tgc6Espuma 1.3s ease-out .5s forwards; }
.tgc6-champan .espuma i:nth-child(1) { --ex: -26px; --ey: -50px; } .tgc6-champan .espuma i:nth-child(2) { --ex: 18px; --ey: -66px; animation-delay: .55s !important; }
.tgc6-champan .espuma i:nth-child(3) { --ex: -8px; --ey: -80px; animation-delay: .6s !important; } .tgc6-champan .espuma i:nth-child(4) { --ex: 34px; --ey: -38px; animation-delay: .65s !important; }
.tgc6-champan .espuma i:nth-child(5) { --ex: -40px; --ey: -30px; animation-delay: .7s !important; } .tgc6-champan .espuma i:nth-child(6) { --ex: 6px; --ey: -100px; animation-delay: .75s !important; }
@keyframes tgc6Espuma { 0% { opacity: 1; transform: translate(-50%, 0) scale(.4); } 100% { opacity: 0; transform: translate(calc(-50% + var(--ex)), var(--ey)) scale(1.5); } }

/* ---------- los tragos tiemblan (golpe del cortocircuito / nos ganaron) y la botella se cae ---------- */
.tiemblan .tgc6-lado .trago { animation: tgc6Tiembla .09s linear 8 alternate; }
@keyframes tgc6Tiembla { from { transform: translate(-2px, 0) rotate(-1.5deg); } to { transform: translate(2px, -1px) rotate(1.5deg); } }
.tumba .tgc6-champan { animation: tgc6Tumba .9s cubic-bezier(.5, 0, .7, 1.3) forwards; transform-origin: 15% 100%; }   /* cae hacia afuera (a la izquierda) */
@keyframes tgc6Tumba { 0% { transform: rotate(0); } 30% { transform: rotate(8deg); } 100% { transform: rotate(-84deg) translateY(4%); } }

/* ---------- papelitos ---------- */
.tgc6-papel { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.tgc6-papel i { position: absolute; top: -5cqh; width: clamp(7px, .8cqw, 12px); height: clamp(10px, 1.1cqw, 16px); animation-name: tgc6CaePapel; animation-timing-function: linear; animation-fill-mode: both; }
@keyframes tgc6CaePapel { from { transform: translate(0, 0) rotate(0); } to { transform: translate(var(--x), 112cqh) rotate(var(--giro)); } }

.tgc6-buenas { pointer-events: none; }
.tgc6-capa .tg-chico-pie { position: relative; z-index: 4; }

/* ---------- nivel superado: ¡se prendió la luz! ---------- */
.tgc6-cartel.grande { padding-bottom: clamp(24px, 4.4cqh, 48px); }
.tgc6-superado .tgc6-letra { font-size: clamp(26px, 4.6cqw, 80px); }
.tgc6-final { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center; gap: clamp(16px, 4cqw, 70px);
    opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.final-on .tgc6-final { opacity: 1; transform: none; }
.tgc6-final .tgc6-champan .tgc6-objeto { height: clamp(100px, 22cqh, 230px); }
.tgc6-final .trago { height: clamp(70px, 15cqh, 160px); transform-origin: 50% 100%; }
.festejo .tgc6-final .trago { animation: tgc6Menea .5s ease-in-out infinite alternate; }
.festejo .tgc6-final .trago.brinda { animation: tgc6Brinda 1s ease-in-out infinite; }
.tgc6-grito { position: absolute; left: 50%; top: -18%; transform: translateX(-50%) scale(.4); padding: .45em .9em; border-radius: 14px; background: #fff; color: #111; white-space: nowrap;
    font-family: var(--tg-fuente-titulo, 'Arial Black', sans-serif); font-size: clamp(14px, 1.8cqw, 28px); opacity: 0; transition: opacity .3s, transform .5s cubic-bezier(.3, 1.8, .5, 1); }
.tgc6-grito::after { content: ''; position: absolute; left: 50%; bottom: -10px; margin-left: -10px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
/* el fogonazo: se prenden las luces de golpe */
.tgc6-fogonazo { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 6; }
.luz .tgc6-fogonazo { animation: tgc6Fogonazo .9s ease-out forwards; }
@keyframes tgc6Fogonazo { 0% { opacity: 0; } 12% { opacity: .95; } 100% { opacity: 0; } }
/* ¡se prendió la luz!: los tubos de limpieza del boliche (luz fría y pareja, sin magia) — todo adentro de la disco, nada de amanecer */
.tgc6-tubos { position: absolute; inset: 0; opacity: 0; transition: opacity .25s; pointer-events: none;
    background: linear-gradient(180deg, #cfd3dc 0%, #b7bac6 55%, #9da0ad 100%); }
.tgc6-tubos i { position: absolute; top: 4cqh; height: 1.4cqh; width: 18cqw; border-radius: 1cqh; background: #fbfdff;
    box-shadow: 0 0 10px 4px rgba(235, 245, 255, .9), 0 6cqh 30cqh rgba(230, 240, 255, .55); }
.tgc6-tubos i:nth-child(1) { left: 6cqw; } .tgc6-tubos i:nth-child(2) { left: 29cqw; } .tgc6-tubos i:nth-child(3) { left: 53cqw; } .tgc6-tubos i:nth-child(4) { left: 76cqw; }
/* los tubos arrancan titilando, como los de verdad */
.luces .tgc6-tubos { opacity: 1; }
.luces .tgc6-tubos i { animation: tgc6Tubo .7s steps(1, end) both; }
.luces .tgc6-tubos i:nth-child(2) { animation-delay: .12s; } .luces .tgc6-tubos i:nth-child(3) { animation-delay: .05s; } .luces .tgc6-tubos i:nth-child(4) { animation-delay: .2s; }
@keyframes tgc6Tubo { 0% { opacity: 0; } 15% { opacity: 1; } 25% { opacity: .2; } 40% { opacity: 1; } 50% { opacity: .4; } 60%, 100% { opacity: 1; } }
.luces .tgc6-reflejos, .luces .tgc6-bola .destello, .luces .tgc6-bola .brillo { opacity: 0; transition: opacity .4s; }
.luces .tgc6-bola { animation: none; }
.luces .tgc6-final .trago { animation: none; }
.luces .tgc6-cartel { background: rgba(14, 4, 26, .78); }
.luces .tgc6-grito { opacity: 1; transform: translateX(-50%) scale(1); }
.tgc6-boton { position: relative; z-index: 7; opacity: 0; transform: translateY(14px); transition: opacity .4s, transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.tgc6-capa.pie-on .tgc6-boton { opacity: 1; transform: none; }

@media (max-width: 700px) {
    .tgc6-lado .trago { height: 15cqh; }
    .tgc6-champan .tgc6-objeto { height: 20cqh; }
    .tgc6-final .trago { height: 12cqh; }
}

/* el sello del bar, más afuera de la esquina: el cartel de neón es angosto y el sello tapaba el final de la serie */
.tgc6-cartel .tg-sello-bar { right: calc(var(--s) * -.78); bottom: calc(var(--s) * -.6); }
