/* =========================================================
   HEROES DUTY — personajes en arte CSS
   Sargento Repampanos, Cy-Bugs (normal, veloz, blindado, reina),
   larva, huevo y la Medalla de Héroe.
   ========================================================= */

/* ---------------- SARGENTO REPAMPANOS ---------------- */
.calhoun {
    --skin: #f1c7a3;
    --skin-sh: #d9a07c;
    --hair: #f7dd92;
    --hair-sh: #d7af55;
    --armor: #2f343c;
    --armor-2: #16191e;
    --light: #ff3434;
    position: relative;
    width: 220px;
    height: 270px;
}
.calhoun > * { position: absolute; }

.calhoun .ch-body { left: 0; top: 0; width: 220px; height: 270px; animation: chBreath 3.2s ease-in-out infinite; }
.calhoun .ch-body > * { position: absolute; }

.ch-hairback {
    left: 60px; top: 16px; width: 96px; height: 84px;
    background: var(--hair-sh);
    border-radius: 50% 50% 40% 40%;
}
.ch-torso {
    left: 30px; top: 150px; width: 156px; height: 140px;
    background: linear-gradient(160deg, #474d57, var(--armor) 35%, var(--armor-2) 75%);
    border-radius: 56px 56px 14px 14px;
    box-shadow: inset -10px -6px 0 rgba(0,0,0,.35), inset 6px 4px 0 rgba(255,255,255,.06);
}
/* luces rojas en V del pecho */
.ch-torso::before, .ch-torso::after {
    content: ''; position: absolute; top: 44px;
    width: 62px; height: 5px; border-radius: 3px;
    background: var(--light);
    box-shadow: 0 0 8px var(--light), 0 0 16px rgba(255,40,40,.6);
}
.ch-torso::before { left: 18px; transform: rotate(28deg); }
.ch-torso::after  { right: 18px; transform: rotate(-28deg); }
.ch-plate {
    left: 86px; top: 196px; width: 44px; height: 54px;
    background: radial-gradient(circle at 40% 30%, #5b626d, #22262d 70%);
    border: 2px solid #0d0f12;
    border-radius: 10px 10px 22px 22px;
}
.ch-plate::after {
    content: ''; position: absolute; left: 50%; top: 12px; transform: translateX(-50%);
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--light); box-shadow: 0 0 10px var(--light);
    animation: chBlink 2s steps(2) infinite;
}
.ch-neck {
    left: 92px; top: 108px; width: 32px; height: 36px;
    background: linear-gradient(90deg, var(--skin-sh), var(--skin) 40%, var(--skin-sh));
    border-radius: 0 0 8px 8px;
}
.ch-collar {
    left: 66px; top: 132px; width: 86px; height: 34px;
    background: linear-gradient(180deg, #3e434c, var(--armor-2));
    border-radius: 22px 22px 8px 8px;
    border-top: 2px solid #555c67;
}
.ch-collar::after {
    content: ''; position: absolute; right: 12px; top: 12px;
    width: 18px; height: 4px; border-radius: 2px;
    background: var(--light); box-shadow: 0 0 6px var(--light);
}
.ch-pad {
    top: 140px; width: 74px; height: 58px;
    background: radial-gradient(circle at 40% 30%, #676e79, #30353d 55%, #16191e);
    border-radius: 50% 50% 30% 30%;
    border: 2px solid #0e1013;
}
.ch-pad::after {
    content: ''; position: absolute; left: 16px; top: 22px;
    width: 38px; height: 5px; border-radius: 3px;
    background: var(--light); box-shadow: 0 0 8px var(--light);
}
.ch-pad.l { left: -4px; transform: rotate(-14deg); }
.ch-pad.r { left: 146px; transform: rotate(14deg); }

.ch-ear {
    top: 62px; width: 13px; height: 22px;
    background: var(--skin-sh); border-radius: 50%;
}
.ch-ear.l { left: 60px; }
.ch-ear.r { left: 143px; }

.ch-head {
    left: 66px; top: 22px; width: 84px; height: 100px;
    background: radial-gradient(ellipse at 45% 40%, #f8d6b8, var(--skin) 55%, var(--skin-sh));
    border-radius: 44% 44% 46% 46% / 36% 36% 64% 64%;
}
.ch-hair {
    left: 58px; top: 10px; width: 100px; height: 50px;
    background: linear-gradient(170deg, #fff1c0, var(--hair) 40%, var(--hair-sh));
    border-radius: 50% 50% 18% 30% / 80% 80% 25% 25%;
}
/* flequillo barrido de costado, como en la ficha */
.ch-bang {
    left: 60px; top: 28px; width: 76px; height: 34px;
    background: linear-gradient(160deg, #fff4cc, var(--hair) 50%, var(--hair-sh));
    border-radius: 10% 70% 12% 90% / 10% 70% 30% 90%;
    transform: rotate(9deg);
}
.ch-bang2 {
    left: 58px; top: 40px; width: 20px; height: 44px;
    background: linear-gradient(180deg, var(--hair), var(--hair-sh));
    border-radius: 60% 10% 60% 40%;
}
.ch-side {
    left: 140px; top: 30px; width: 18px; height: 34px;
    background: var(--hair-sh);
    border-radius: 20% 60% 40% 60%;
}
.ch-brow {
    top: 60px; width: 20px; height: 4px; border-radius: 2px;
    background: #9c7433;
}
.ch-brow.l { left: 78px; transform: rotate(10deg); }
.ch-brow.r { left: 114px; transform: rotate(-10deg); }
.ch-eye {
    top: 68px; width: 18px; height: 9px;
    background: #fff;
    border-radius: 50% 50% 45% 45%;
    border-top: 3px solid #3a2a1c;
    overflow: hidden;
}
.ch-eye::after {
    content: ''; position: absolute; left: 4px; top: -1px;
    width: 9px; height: 9px; border-radius: 50%;
    background: radial-gradient(circle, #10181c 28%, #4d9bb3 34%, #1f5566);
}
.ch-eye.l { left: 78px; }
.ch-eye.r { left: 114px; }
.ch-nose {
    left: 102px; top: 76px; width: 7px; height: 15px;
    border-right: 2px solid rgba(160, 90, 60, .55);
    border-bottom: 2px solid rgba(160, 90, 60, .45);
    border-radius: 0 0 6px 0;
}
.ch-mouth {
    left: 96px; top: 98px; width: 24px; height: 6px;
    border-bottom: 3px solid #b24f47;
    border-radius: 0 0 50% 50%;
    transform: rotate(-6deg);
}

/* ---- brazo con el bláster (gira hacia la mira) ---- */
.ch-arm {
    left: 160px; top: 168px; width: 0; height: 0;
    transform: rotate(var(--a, -20deg));
    z-index: 3;
}
.ch-arm > * { position: absolute; }
.ch-upper {
    left: -14px; top: -17px; width: 72px; height: 34px;
    background: linear-gradient(180deg, #4a505a, var(--armor) 45%, var(--armor-2));
    border-radius: 17px;
    border: 2px solid #0e1013;
}
.ch-upper::after {
    content: ''; position: absolute; left: 18px; top: 6px;
    width: 30px; height: 4px; border-radius: 2px;
    background: var(--light); box-shadow: 0 0 6px var(--light);
}
.ch-blaster {
    left: 40px; top: -24px; width: 112px; height: 30px;
    background: linear-gradient(180deg, #6a727e, #3a4049 40%, #1b1f25);
    border-radius: 6px 14px 10px 6px;
    border: 2px solid #0b0d10;
}
.ch-blaster::before {   /* franja de energía verde */
    content: ''; position: absolute; left: 14px; top: 9px;
    width: 64px; height: 6px; border-radius: 3px;
    background: #7dff5a; box-shadow: 0 0 8px #7dff5a;
}
.ch-blaster::after {    /* cañón */
    content: ''; position: absolute; right: -30px; top: 8px;
    width: 32px; height: 12px;
    background: linear-gradient(180deg, #5b626d, #1b1f25);
    border-radius: 2px 6px 6px 2px;
    border: 2px solid #0b0d10;
}
.ch-grip {
    left: 60px; top: 2px; width: 16px; height: 24px;
    background: #1b1f25; border-radius: 3px 3px 6px 6px;
    transform: skewX(-12deg);
}
.ch-glove {
    left: 50px; top: -8px; width: 28px; height: 28px;
    background: radial-gradient(circle at 40% 35%, #3c3f45, #121417);
    border-radius: 10px;
}
.ch-muzzle {
    left: 176px; top: -24px; width: 40px; height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 10%, #b8ff8a 35%, rgba(90,255,90,0) 70%);
    opacity: 0;
}
.calhoun.firing .ch-muzzle { animation: muzzle .12s linear; }
.calhoun.firing .ch-arm { animation: recoil .12s ease-out; }
.calhoun.hurt .ch-body { animation: chHurt .35s linear; }

@keyframes chBreath { 50% { transform: translateY(3px); } }
@keyframes chBlink { 50% { opacity: .25; } }
@keyframes muzzle { 0% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: scale(.4); } }
@keyframes recoil { 0% { margin-left: -6px; } 100% { margin-left: 0; } }
@keyframes chHurt {
    0%, 100% { filter: none; transform: translateX(0); }
    25% { filter: sepia(1) saturate(6) hue-rotate(-30deg); transform: translateX(-6px); }
    60% { filter: sepia(1) saturate(6) hue-rotate(-30deg); transform: translateX(5px); }
}

/* ---------------- CY-BUG ----------------
   Caja base 140x120, centro en (70,60). */
.cybug {
    position: absolute; left: 0; top: 0;
    width: 140px; height: 120px;
    transform-origin: 70px 60px;
    pointer-events: none;
}
.cybug .cb-in { position: absolute; inset: 0; animation: cbBob 1.1s ease-in-out infinite; }
.cybug .cb-in > * { position: absolute; }

.cb-ant {   /* antenas largas y curvas que se arrastran */
    width: 70px; height: 80px;
    border-left: 2px solid rgba(160, 255, 140, .75);
    border-radius: 100% 0 0 0;
    filter: drop-shadow(0 0 3px #6f6);
}
.cb-ant.a1 { left: 22px; top: 6px; transform: rotate(-28deg); }
.cb-ant.a2 { left: 30px; top: 16px; transform: rotate(-12deg); height: 64px; }

.cb-wings {
    left: 0; top: 0; width: 140px; height: 120px;
    transform-origin: 70px 56px;
    animation: cbFlap .13s linear infinite;
    filter: drop-shadow(0 0 6px #5dff4a);
}
.cb-wings i {
    position: absolute; left: 63px; bottom: 64px;
    width: 15px; height: 72px;
    transform-origin: 50% 100%;
    background: linear-gradient(0deg, rgba(90,255,90,.15), #79ff4d 40%, #e8ffcc 92%);
    clip-path: polygon(38% 100%, 62% 100%, 100% 14%, 58% 0, 0 22%);
}
.cb-wings i::after {   /* nervio del ala */
    content: ''; position: absolute; left: 48%; top: 10%; bottom: 0;
    width: 2px; background: rgba(20, 90, 30, .6);
}
.cb-wings .w1 { transform: rotate(-44deg); height: 64px; }
.cb-wings .w2 { transform: rotate(-16deg); height: 80px; }
.cb-wings .w3 { transform: rotate(14deg);  height: 76px; }
.cb-wings .w4 { transform: rotate(40deg);  height: 60px; }

.cb-legs { left: 0; top: 0; width: 140px; height: 120px; }
.cb-legs i {
    position: absolute; left: 69px; top: 82px;
    width: 3px; height: 26px;
    background: #183028;
    border-radius: 2px;
    transform-origin: 50% 0;
    animation: cbLeg 1.2s ease-in-out infinite;
}
.cb-legs i::after {
    content: ''; position: absolute; left: 0; top: 24px;
    width: 3px; height: 22px; background: #0f201a; border-radius: 2px;
    transform-origin: 50% 0; transform: rotate(var(--k, 25deg));
}
.cb-legs i:nth-child(1) { --r: 58deg;  --k: -40deg; }
.cb-legs i:nth-child(2) { --r: 30deg;  --k: -30deg; animation-delay: -.2s; }
.cb-legs i:nth-child(3) { --r: 8deg;   --k: -20deg; animation-delay: -.4s; }
.cb-legs i:nth-child(4) { --r: -8deg;  --k: 20deg;  animation-delay: -.6s; }
.cb-legs i:nth-child(5) { --r: -30deg; --k: 30deg;  animation-delay: -.8s; }
.cb-legs i:nth-child(6) { --r: -58deg; --k: 40deg;  animation-delay: -1s; }

.cb-abd {
    left: 40px; top: 28px; width: 62px; height: 54px;
    border-radius: 50% 50% 46% 46%;
    background:
        repeating-linear-gradient(170deg, rgba(0,0,0,0) 0 9px, rgba(0,0,0,.28) 9px 11px),
        radial-gradient(circle at 36% 30%, #86c1a6, #2f6b55 38%, #123a2d 70%, #07170f);
    box-shadow: inset -6px -8px 0 rgba(0,0,0,.3);
}
.cb-thorax {
    left: 50px; top: 62px; width: 42px; height: 26px;
    border-radius: 45%;
    background: radial-gradient(circle at 40% 30%, #5e9a82, #1d4a3a 60%, #0a1f18);
}
.cb-head {
    left: 54px; top: 74px; width: 34px; height: 26px;
    border-radius: 48% 48% 40% 40%;
    background: radial-gradient(circle at 50% 30%, #4b806c, #133329 70%);
}
.cb-head::before, .cb-head::after {   /* mandíbulas */
    content: ''; position: absolute; bottom: -6px;
    width: 10px; height: 10px;
    border-bottom: 3px solid #0d221b;
}
.cb-head::before { left: 4px;  border-left: 3px solid #0d221b; border-radius: 0 0 0 10px; }
.cb-head::after  { right: 4px; border-right: 3px solid #0d221b; border-radius: 0 0 10px 0; }
.cb-head b {
    position: absolute; top: 7px;
    width: 9px; height: 9px; border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff, #eaff5a 40%, #b5d600);
    box-shadow: 0 0 8px #e5ff3a, 0 0 14px rgba(230,255,60,.6);
}
.cb-head .e1 { left: 6px; }
.cb-head .e2 { right: 6px; }
.cb-crown, .cb-plates, .cb-core { display: none; }

/* Veloz: más chico y turquesa */
.cybug.fast .cb-in { filter: hue-rotate(38deg) saturate(1.3); }
.cybug.fast .cb-wings { animation-duration: .08s; }

/* Blindado: placas de metal y ojos rojos */
.cybug.armor .cb-abd {
    background:
        repeating-linear-gradient(90deg, rgba(0,0,0,0) 0 12px, rgba(0,0,0,.35) 12px 14px),
        radial-gradient(circle at 36% 30%, #a9b3ae, #56615c 40%, #252c29 75%);
}
.cybug.armor .cb-plates {
    display: block; left: 36px; top: 22px; width: 70px; height: 24px;
    border-top: 6px solid #7d8883;
    border-radius: 50% 50% 0 0;
}
.cybug.armor .cb-head b,
.cybug.queen .cb-head b {
    background: radial-gradient(circle at 35% 35%, #fff, #ff5a4a 40%, #b00);
    box-shadow: 0 0 8px #ff3b2f, 0 0 16px rgba(255,40,40,.7);
}

/* Reina Cy-Bug: corona de cuchillas y núcleo brillante */
.cybug.queen .cb-wings i { width: 20px; }
.cybug.queen .cb-abd {
    background:
        repeating-linear-gradient(170deg, rgba(0,0,0,0) 0 8px, rgba(0,0,0,.3) 8px 10px),
        radial-gradient(circle at 36% 30%, #9ad4b7, #2f6b55 38%, #3b1446 72%, #12051a);
}
.cybug.queen .cb-core {
    display: block; left: 62px; top: 44px; width: 18px; height: 18px; border-radius: 50%;
    background: radial-gradient(circle, #fff, #d05bff 45%, rgba(170,40,255,0) 72%);
    animation: corePulse .8s ease-in-out infinite;
}
.cybug.queen .cb-crown {
    display: block; left: 50px; top: 58px; width: 42px; height: 20px;
    background: linear-gradient(0deg, #1b3a2e, #7dff4d);
    clip-path: polygon(0 100%, 8% 0, 22% 70%, 36% 0, 50% 60%, 64% 0, 78% 70%, 92% 0, 100% 100%);
    filter: drop-shadow(0 0 4px #7f7);
}
.cybug.queen.rage .cb-in { filter: hue-rotate(-50deg) saturate(1.6); }
/* segunda ronda del piso 100: roja, con aura y temblando de furia */
.cybug.queen.second .cb-in { filter: hue-rotate(-90deg) saturate(2) drop-shadow(0 0 14px #ff3a2a); animation: cbBob .6s ease-in-out infinite, queenFury .15s linear infinite; }
@keyframes queenFury { 50% { margin-left: 2px; } }

/* ---------------- LARVA ---------------- */
.cybug.larva .lv-body {
    left: 34px; top: 46px; width: 72px; height: 30px;
    display: flex; gap: 0;
}
.lv-body i {
    flex: 1; margin-left: -6px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, #9cf2a8, #2f8a4a 45%, #0e3a1d);
    box-shadow: inset 0 -4px 0 rgba(0,0,0,.3);
    animation: lvCrawl .5s ease-in-out infinite;
}
.lv-body i::after {
    content: ''; position: absolute; margin: 6px 0 0 8px;
    width: 6px; height: 6px; border-radius: 50%;
    background: #caff5a; box-shadow: 0 0 6px #caff5a;
}
.lv-body i:nth-child(2) { animation-delay: -.12s; }
.lv-body i:nth-child(3) { animation-delay: -.24s; }
.lv-body i:nth-child(4) { animation-delay: -.36s; }
.cybug.larva .lv-head {
    left: 92px; top: 42px; width: 30px; height: 34px;
    border-radius: 50% 60% 50% 40%;
    background: radial-gradient(circle at 40% 30%, #6fbf86, #164a2a 70%);
}
.lv-head b {
    position: absolute; top: 9px; width: 7px; height: 7px; border-radius: 50%;
    background: #eaff5a; box-shadow: 0 0 6px #eaff5a;
}
.lv-head b:first-child { left: 7px; }
.lv-head b:last-child  { left: 17px; }

/* ---------------- HUEVO ---------------- */
.cybug.egg .egg-shell {
    left: 44px; top: 20px; width: 52px; height: 66px;
    border-radius: 50% 50% 46% 46% / 60% 60% 40% 40%;
    background:
        radial-gradient(ellipse at 38% 28%, rgba(255,255,255,.45), rgba(255,255,255,0) 30%),
        radial-gradient(ellipse at 50% 60%, #9dff6a, #2f9a3a 45%, #0f3a18 85%);
    box-shadow: 0 0 18px rgba(120,255,80,.55);
    animation: eggPulse 1.2s ease-in-out infinite;
}
.cybug.egg .egg-glow {   /* charco de baba abajo */
    left: 30px; top: 78px; width: 80px; height: 16px; border-radius: 50%;
    background: radial-gradient(ellipse, rgba(120,255,80,.55), rgba(120,255,80,0) 70%);
}
.cybug.egg.cracking .egg-shell { animation: eggShake .12s linear infinite; }
.cybug.egg.cracking .egg-shell::after {
    content: ''; position: absolute; inset: 20% 30% 40% 30%;
    border-top: 2px solid #0b2a10; border-left: 2px solid #0b2a10;
    transform: skewY(30deg);
}

/* efecto de golpe */
.cybug.hit .cb-in { animation: cbHit .12s linear; }

@keyframes cbBob  { 50% { transform: translateY(-6px); } }
@keyframes cbFlap { 50% { transform: scaleY(.78) scaleX(1.06); } }
@keyframes cbLeg  { 0%,100% { transform: rotate(var(--r)); } 50% { transform: rotate(calc(var(--r) * .7)); } }
@keyframes cbHit  { 0%,100% { filter: brightness(1); } 40% { filter: brightness(3) saturate(0); } }
@keyframes corePulse { 50% { transform: scale(1.5); } }
@keyframes lvCrawl { 50% { transform: translateY(-5px) scaleY(1.1); } }
@keyframes eggPulse { 50% { transform: scale(1.06, .96); box-shadow: 0 0 28px rgba(120,255,80,.8); } }
@keyframes eggShake { 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }

/* ---------------- MEDALLA DE HÉROE ---------------- */
.medal { position: relative; width: 120px; height: 170px; }
.medal .ribbon {
    position: absolute; left: 30px; top: 0; width: 60px; height: 70px;
    background: repeating-linear-gradient(90deg, #1d3fb8 0 12px, #d8d8d8 12px 16px, #c8202a 16px 30px);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
}
.medal .disk {
    position: absolute; left: 10px; top: 56px; width: 100px; height: 100px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,.8), rgba(255,255,255,0) 25%),
        radial-gradient(circle, #ffe68a, #f2b82c 55%, #a86c10 100%);
    border: 5px solid #c98d1c;
    box-shadow: inset 0 0 0 5px #ffd95a, inset 0 0 0 7px #b07412, 0 6px 16px rgba(0,0,0,.5);
    display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.medal .disk::before {
    content: '★'; color: #b07412; font-size: 22px; line-height: 1;
    text-shadow: 0 1px 0 #ffe9a0;
}
.medal .disk span {
    font-family: 'Black Ops One', 'Impact', sans-serif;
    font-size: 26px; letter-spacing: 1px;
    color: #9a5f0c;
    text-shadow: 0 1px 0 #fff0b0, 0 -1px 0 #7a4a06;
}
.medal .disk em {
    font-style: normal; font-family: 'Orbitron', sans-serif; font-weight: 800;
    font-size: 10px; color: #9a5f0c;
}
.medal.locked { filter: grayscale(1) brightness(.35); }

/* ---------------- CANDY-TURBO (piso 1000) ----------------
   Larva-jefe: cuerpo morado con patas de caramelo. La cabeza cambia
   cada 1 segundo: 1 s Rey Candy · 1 s Turbo (cabeza de Cy-Bug). */
.cybug.turbo .cb-in > * { position: absolute; }
.cybug.turbo .tb-body {
    left: 40px; top: 36px; width: 74px; height: 56px; border-radius: 52% 48% 44% 56%;
    background:
        repeating-linear-gradient(100deg, rgba(0,0,0,0) 0 9px, rgba(255,200,60,.55) 9px 12px),
        radial-gradient(circle at 36% 28%, #b86be0, #7a2bb0 45%, #3f1266 85%);
    box-shadow: inset -6px -8px 0 rgba(0,0,0,.28);
}
.cybug.turbo .tb-belly {
    left: 56px; top: 74px; width: 46px; height: 16px; border-radius: 50%;
    background: repeating-linear-gradient(90deg, #ffb52e 0 6px, #ff7a1c 6px 10px);
}
.cybug.turbo .tb-fin {
    left: 70px; top: 6px; width: 46px; height: 40px; background: linear-gradient(200deg, #ff5a78, #c01a58);
    clip-path: polygon(0 100%, 30% 20%, 60% 55%, 100% 0, 85% 100%);
}
.cybug.turbo .tb-fin.f2 { left: 96px; top: 30px; width: 36px; height: 26px; background: linear-gradient(200deg, #e8407a, #8d1450); }
.cybug.turbo .tb-tail {
    left: 104px; top: 8px; width: 34px; height: 70px;
    border-right: 4px solid #e0409e; border-radius: 0 100% 0 0; transform: rotate(8deg);
}
.cybug.turbo .tb-tail.t2 { left: 112px; top: 22px; height: 62px; border-color: #c02a86; transform: rotate(18deg); }
.cybug.turbo .tb-legs { left: 0; top: 0; width: 140px; height: 120px; }
.cybug.turbo .tb-legs i {
    position: absolute; top: 76px; width: 18px; height: 40px;
    background: repeating-linear-gradient(180deg, #ff9a1f 0 6px, #ffd23a 6px 9px, #b84a0c 9px 13px);
    clip-path: polygon(50% 0, 100% 35%, 80% 100%, 20% 100%, 0 35%);
    transform-origin: 50% 0; animation: tbLeg 1s ease-in-out infinite;
}
.cybug.turbo .tb-legs i:nth-child(1) { left: 40px; transform: rotate(18deg); }
.cybug.turbo .tb-legs i:nth-child(2) { left: 58px; animation-delay: -.25s; }
.cybug.turbo .tb-legs i:nth-child(3) { left: 78px; animation-delay: -.5s; }
.cybug.turbo .tb-legs i:nth-child(4) { left: 96px; transform: rotate(-18deg); animation-delay: -.75s; }
@keyframes tbLeg { 50% { translate: 0 -4px; } }
.cybug.turbo .tb-claw {
    left: 2px; top: 56px; width: 44px; height: 22px; background: linear-gradient(90deg, #6a2a9a, #ff6aa0 60%, #ffc0d6);
    clip-path: polygon(0 0, 30% 30%, 55% 20%, 40% 50%, 100% 40%, 100% 85%, 50% 80%, 30% 100%, 20% 60%, 0 90%, 10% 45%);
}
.cybug.turbo .tb-neck {
    left: 42px; top: 42px; width: 24px; height: 12px; border-radius: 6px;
    background: repeating-linear-gradient(90deg, #ffd23a 0 4px, #ff6aa0 4px 8px);
}
.cybug.turbo .tb-bow {
    left: 42px; top: 48px; width: 22px; height: 10px; z-index: 3;
    background: #d4142c; clip-path: polygon(0 0, 42% 50%, 0 100%, 100% 100%, 58% 50%, 100% 0);
    animation: tbBow 2s steps(1) infinite;
}
@keyframes tbBow { 50% { opacity: 0; } }

/* las dos cabezas ocupan el mismo lugar y se alternan cada 1 s */
.cybug.turbo .tb-head { left: 22px; top: 0; width: 44px; height: 46px; z-index: 4; }
.cybug.turbo .tb-king { animation: tbKing 2s steps(1) infinite; }
.cybug.turbo .tb-cyb  { animation: tbCyb 2s steps(1) infinite; }
.cybug.turbo.rage .tb-king { animation-duration: 1.2s; }
.cybug.turbo.rage .tb-cyb  { animation-duration: 1.2s; }
@keyframes tbKing { 0% { opacity: 1; transform: scale(1.12) rotate(-3deg); } 8% { transform: none; } 50% { opacity: 0; } }
@keyframes tbCyb  { 0% { opacity: 0; } 50% { opacity: 1; transform: scale(1.12) rotate(3deg); filter: brightness(1.8); } 58% { transform: none; filter: none; } }

/* Rey Candy */
.tb-king > * { position: absolute; }
.tb-king::before {   /* cabeza calva y rosada */
    content: ''; position: absolute; left: 4px; top: 6px; width: 36px; height: 38px; border-radius: 50% 50% 46% 46%;
    background: radial-gradient(circle at 40% 30%, #ffd9c4, #f2a58f 70%, #d9806c);
}
.tb-king::after {    /* corona */
    content: ''; position: absolute; left: 16px; top: -6px; width: 12px; height: 12px; background: #e8b52a;
    clip-path: polygon(0 100%, 10% 20%, 30% 70%, 50% 0, 70% 70%, 90% 20%, 100% 100%);
}
.tb-king .hl, .tb-king .hr {
    top: 18px; width: 12px; height: 16px; background: #e8e8f0; border-radius: 50% 10% 50% 10%;
}
.tb-king .hl { left: -4px; transform: rotate(-20deg); }
.tb-king .hr { right: -4px; transform: rotate(20deg) scaleX(-1); }
.tb-king .bolt {
    left: 10px; top: 10px; width: 24px; height: 8px; background: #b04ae0;
    clip-path: polygon(0 80%, 30% 0, 45% 60%, 70% 0, 100% 70%, 100% 100%, 0 100%); opacity: .9;
}
.tb-king b {
    top: 20px; width: 8px; height: 6px; border-radius: 50%; background: #fff; border-top: 3px solid #4a3030;
    box-shadow: inset 0 -2px 0 #333;
}
.tb-king .e1 { left: 11px; transform: rotate(10deg); }
.tb-king .e2 { right: 11px; transform: rotate(-10deg); }
.tb-king .nose { left: 18px; top: 26px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ff7a6a, #d4281c); }
.tb-king .mouth { left: 12px; top: 36px; width: 20px; height: 6px; border-radius: 0 0 50% 50%; background: #5a1010; border-top: 2px solid #fff; }

/* Turbo (cyborg): casco blanco con franja roja, cara pálida, ojos amarillos y
   dientes amarillos, con piezas de Cy-Bug (púas, mandíbulas y ojo brillante) */
.tb-cyb > * { position: absolute; }
.tb-cyb::before {   /* casco */
    content: ''; position: absolute; left: 0; top: 2px; width: 44px; height: 44px; border-radius: 50%;
    background: radial-gradient(circle at 36% 28%, #fff, #e6e8ee 60%, #b4b9c6);
    box-shadow: inset -4px -5px 0 rgba(0,0,0,.12), 0 0 8px rgba(120,255,80,.55);
}
.tb-cyb .hm {   /* franja roja del casco */
    left: 18px; top: 2px; width: 9px; height: 17px; background: #d4142c; border-radius: 4px 4px 2px 2px;
}
.tb-cyb .visor {   /* visor con la cara pálida */
    left: 6px; top: 16px; width: 33px; height: 27px; border-radius: 40% 40% 46% 46%;
    background: radial-gradient(circle at 50% 30%, #f4f0f6, #d9cfe2 70%);
    border: 2px solid #aab0bf;
    box-shadow: inset 0 3px 0 rgba(150,90,190,.45);
}
.tb-cyb u {   /* púas de Cy-Bug sobre el casco */
    left: 12px; top: -7px; width: 20px; height: 12px; background: linear-gradient(0deg, #1b3a2e, #7dff4d);
    clip-path: polygon(0 100%, 10% 0, 30% 70%, 50% 0, 70% 70%, 90% 0, 100% 100%);
    filter: drop-shadow(0 0 3px #7f7);
}
.tb-cyb b {
    top: 20px; width: 11px; height: 11px; border-radius: 50%; z-index: 2;
    background: radial-gradient(circle at 50% 50%, #111 0 2px, #ffe81a 3px 6px);
    box-shadow: 0 0 0 1px #b7a000;
}
.tb-cyb .e1 { left: 9px; }
.tb-cyb .e2 { right: 9px; background: radial-gradient(circle at 50% 50%, #111 0 2px, #eaff5a 3px 6px); box-shadow: 0 0 8px #e5ff3a, 0 0 16px rgba(230,255,60,.8); }   /* ojo cyborg */
.tb-cyb .teeth {   /* sonrisa enorme de dientes amarillos */
    left: 10px; top: 32px; width: 25px; height: 9px; border-radius: 0 0 50% 50%;
    background: repeating-linear-gradient(90deg, #ffe84a 0 4px, #c9a900 4px 5px);
    border-top: 2px solid #4a1a1a;
}
.tb-cyb s {   /* mandíbulas de Cy-Bug a los costados */
    top: 34px; width: 9px; height: 11px; text-decoration: none; border-bottom: 3px solid #1e5a45;
}
.tb-cyb .ml { left: -2px; border-left: 3px solid #1e5a45; border-radius: 0 0 0 10px; }
.tb-cyb .mr { right: -2px; border-right: 3px solid #1e5a45; border-radius: 0 0 10px 0; }
.cybug.turbo.rage .tb-cyb .e2 { background: radial-gradient(circle at 50% 50%, #111 0 2px, #ff5a4a 3px 6px); box-shadow: 0 0 10px #ff3b2f, 0 0 18px rgba(255,40,40,.9); }
.cybug.turbo.rage .cb-in { filter: saturate(1.5) drop-shadow(0 0 8px #ff3a8a); }
