/* ================================================================
   NetBot.css - Solution Net Ec: Global Android Mascot Component
   Fibra Óptica & Gamer Interactive Character Engine
   ================================================================ */

:root {
    --nb-cyan: #00d4ff;
    --nb-cyan-glow: rgba(0, 212, 255, 0.6);
    --nb-neon-green: #00ff88;
    --nb-neon-green-glow: rgba(0, 255, 136, 0.6);
    --nb-purple: #8b5cf6;
    --nb-alert-red: #ff4757;
    --nb-dark-navy: #0f172a;
    --nb-panel-bg: #1e293b;
}

/* ================================================================
   1. CONTENEDOR PRINCIPAL & FLOTACIÓN
   ================================================================ */
.robot-container {
    position: relative;
    z-index: 2;
    margin: 0.5rem auto 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    animation: robotHoverFloat 3.8s ease-in-out infinite;
    user-select: none;
}

.robot-container:hover {
    transform: translateY(-4px) scale(1.03);
}

@keyframes robotHoverFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ================================================================
   2. OREJAS FELINAS DE FIBRA ÓPTICA
   ================================================================ */
.robot-fiber-ear {
    position: absolute;
    top: -15px;
    width: 18px;
    height: 26px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1.5px solid rgba(0, 212, 255, 0.45);
    clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1;
    transition: all 0.3s ease;
}

.robot-fiber-ear-left {
    left: 22px;
    transform: rotate(-18deg);
}

.robot-fiber-ear-right {
    right: 22px;
    transform: rotate(18deg);
}

.fiber-pulse-core {
    width: 4px;
    height: 13px;
    background: var(--nb-cyan);
    border-radius: 2px;
    margin-bottom: 2px;
    box-shadow: 0 0 10px var(--nb-cyan);
    transition: all 0.3s ease;
    animation: fiberEarGlow 2s infinite alternate;
}

@keyframes fiberEarGlow {
    from { opacity: 0.7; box-shadow: 0 0 6px var(--nb-cyan); }
    to { opacity: 1; box-shadow: 0 0 12px var(--nb-cyan); }
}

/* ================================================================
   3. CABEZA AERODINÁMICA
   ================================================================ */
.robot-head {
    position: relative;
    width: 140px;
    height: 112px;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 38px 38px 32px 32px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55), inset 0 2px 6px rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

/* ================================================================
   4. AURICULARES GAMER CIRCUMAURALES
   ================================================================ */
.robot-headphone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 44px;
    background: #1e293b;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.robot-headphone-left { left: -11px; }
.robot-headphone-right { right: -11px; }

.headphone-rgb-ring {
    width: 8px;
    height: 26px;
    border-radius: 5px;
    background: linear-gradient(180deg, #00d4ff 0%, #8b5cf6 100%);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.8), 0 0 8px rgba(139, 92, 246, 0.6);
    transition: all 0.3s ease;
}

/* ================================================================
   5. VISOR LED DINÁMICO & OJOS
   ================================================================ */
.robot-screen {
    width: 110px;
    height: 72px;
    background: #020617;
    border-radius: 24px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.9), 0 0 10px rgba(0, 212, 255, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
}

.robot-eyes-wrapper {
    display: flex;
    gap: 22px;
    align-items: center;
    transition: transform 0.15s ease-out, opacity 0.25s ease;
}

.robot-eye {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--nb-cyan);
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 14px var(--nb-cyan), 0 0 22px rgba(0, 212, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.robot-eye-pupil {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    background: #ffffff;
    border-radius: 50%;
    opacity: 0.9;
    box-shadow: 0 0 3px #ffffff;
    transition: opacity 0.2s ease;
}

/* Parpadeo biológico amigable */
.robot-eye.blinking {
    height: 2px !important;
    margin-top: 10px;
    margin-bottom: 10px;
    box-shadow: 0 0 8px var(--nb-cyan);
}

/* Expresiones Oculares (^ ^) y (> <) */
.eye-shape-boost {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    position: absolute;
    color: #ffffff;
    text-shadow: 0 0 8px var(--nb-neon-green);
    margin-top: 2px;
    user-select: none;
    transition: opacity 0.2s ease;
}

.eye-shape-error {
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1;
    opacity: 0;
    position: absolute;
    color: #ffffff;
    text-shadow: 0 0 8px var(--nb-alert-red);
    margin-top: 2px;
    user-select: none;
    transition: opacity 0.2s ease;
}

/* Mejillas Rosadas / Cyber Blush */
.robot-blush-cheeks {
    position: absolute;
    width: 82px;
    display: flex;
    justify-content: space-between;
    bottom: 12px;
    pointer-events: none;
}

.blush-cheek {
    width: 11px;
    height: 6px;
    border-radius: 50%;
    background: rgba(0, 212, 255, 0.35);
    filter: blur(1.5px);
    transition: all 0.3s ease;
}

/* Boca LED */
.robot-mouth {
    width: 22px;
    height: 10px;
    border-bottom: 2.5px solid var(--nb-cyan);
    border-radius: 0 0 12px 12px;
    margin-top: 6px;
    box-shadow: 0 2px 8px rgba(0, 212, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================================================================
   6. MANOS ROBÓTICAS ARTICULADAS FLOTANTES
   ================================================================ */
.robot-hands-container {
    position: absolute;
    width: 160px;
    height: 50px;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 5;
    display: flex;
    justify-content: space-between;
}

.robot-hand {
    position: absolute;
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1.5px solid rgba(0, 212, 255, 0.4);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.robot-hand-left {
    left: -4px;
    transform: rotate(12deg);
}

.robot-hand-right {
    right: -4px;
    transform: rotate(-12deg);
}

.hand-palm {
    display: flex;
    gap: 3px;
    padding: 2px;
}

.finger {
    width: 4px;
    height: 10px;
    background: #64748b;
    border-radius: 2px;
    border: 0.5px solid rgba(0, 212, 255, 0.3);
}

/* Saludo Amigable (Waving) */
@keyframes waveHand {
    0%, 100% { transform: rotate(-10deg) translateY(0); }
    20% { transform: rotate(-35deg) translateY(-8px); }
    40% { transform: rotate(-10deg) translateY(-4px); }
    60% { transform: rotate(-35deg) translateY(-8px); }
    80% { transform: rotate(-15deg) translateY(-2px); }
}

.robot-hand-waving {
    animation: waveHand 3s ease-in-out infinite;
    transform-origin: bottom left;
}

@keyframes robotWaveHello {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-40px) rotate(25deg); }
    50% { transform: translateY(-45px) rotate(-15deg); }
    75% { transform: translateY(-40px) rotate(20deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

.robot-hand-right.waving {
    animation: robotWaveHello 1.4s ease-in-out;
}

/* ================================================================
   7. TORSO & ESCUDO SOLUTION NET EC
   ================================================================ */
.robot-torso {
    margin-top: -6px;
    z-index: 1;
}

.robot-chest-shield {
    position: relative;
    width: 32px;
    height: 32px;
    background: #0f172a;
    border: 1.5px solid rgba(0, 212, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nb-cyan);
    font-size: 0.9rem;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

.shield-pulse-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 1px solid var(--nb-cyan);
    opacity: 0.5;
    animation: shieldPulse 2s ease-out infinite;
}

@keyframes shieldPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* ================================================================
   8. ESTADOS EMOCIONALES & REACTIVIDAD
   ================================================================ */

/* A) MODO BOOST / ENERGÍA MÁXIMA (^ ^) */
.robot-container.robot-boost .fiber-pulse-core {
    background: var(--nb-neon-green);
    box-shadow: 0 0 14px var(--nb-neon-green);
}

.robot-container.robot-boost .headphone-rgb-ring {
    background: linear-gradient(180deg, var(--nb-neon-green) 0%, var(--nb-cyan) 100%);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.9);
}

.robot-container.robot-boost .robot-eye {
    background: linear-gradient(135deg, var(--nb-cyan), var(--nb-neon-green)) !important;
    box-shadow: 0 0 20px var(--nb-neon-green), 0 0 30px rgba(0, 255, 136, 0.6) !important;
}

.robot-container.robot-boost .robot-eye-pupil {
    opacity: 0;
}

.robot-container.robot-boost .eye-shape-boost {
    opacity: 1;
}

.robot-container.robot-boost .blush-cheek {
    background: rgba(0, 255, 136, 0.7);
    filter: blur(1px);
    transform: scale(1.3);
}

.robot-container.robot-boost .robot-mouth {
    width: 28px;
    height: 13px;
    border-bottom: 3px solid var(--nb-neon-green);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 3px 12px var(--nb-neon-green);
}

.robot-container.robot-boost .robot-hand-waving {
    animation: waveHand 1.2s ease-in-out infinite;
}

.robot-container.robot-boost .robot-chest-shield {
    color: var(--nb-neon-green);
    border-color: var(--nb-neon-green);
    box-shadow: 0 0 16px var(--nb-neon-green);
}

.robot-container.robot-boost .shield-pulse-ring {
    border-color: var(--nb-neon-green);
}

/* B) MODO CELEBRACIÓN (ÉXITO / CONTRATO VALIDADO) */
.robot-container.robot-celebrate .robot-eye {
    background: linear-gradient(135deg, var(--nb-cyan), var(--nb-neon-green)) !important;
    box-shadow: 0 0 20px var(--nb-cyan), 0 0 30px var(--nb-neon-green) !important;
}

.robot-container.robot-celebrate .robot-eye-pupil {
    opacity: 0;
}

.robot-container.robot-celebrate .eye-shape-boost {
    opacity: 1;
}

.robot-container.robot-celebrate .robot-mouth {
    width: 26px !important;
    height: 12px !important;
    border-color: var(--nb-neon-green) !important;
    box-shadow: 0 3px 10px var(--nb-neon-green) !important;
}

.robot-container.robot-celebrate .robot-hand-left {
    transform: translate(-10px, -45px) rotate(-35deg);
    border-color: var(--nb-neon-green);
}

.robot-container.robot-celebrate .robot-hand-right {
    transform: translate(10px, -45px) rotate(35deg);
    border-color: var(--nb-neon-green);
}

.robot-container.robot-celebrate .robot-chest-shield {
    color: var(--nb-neon-green);
    border-color: var(--nb-neon-green);
    box-shadow: 0 0 16px var(--nb-neon-green);
}

/* C) MODO ERROR / ALERTA (> <) */
.robot-container.robot-error .robot-head {
    animation: robotHeadShake 0.4s ease-in-out;
    border-color: var(--nb-alert-red) !important;
}

@keyframes robotHeadShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.robot-container.robot-error .robot-eye {
    background: rgba(255, 71, 87, 0.2) !important;
    box-shadow: 0 0 18px var(--nb-alert-red) !important;
}

.robot-container.robot-error .robot-eye-pupil {
    opacity: 0;
}

.robot-container.robot-error .eye-shape-error {
    opacity: 1;
}

.robot-container.robot-error .robot-chest-shield {
    color: var(--nb-alert-red) !important;
    border-color: var(--nb-alert-red) !important;
    box-shadow: 0 0 20px var(--nb-alert-red) !important;
}

/* D) MODO DORMIDO / STANDBY (robot-sleeping) */
.robot-container.robot-sleeping .robot-eye {
    height: 3px !important;
    background: #334155 !important;
    box-shadow: none !important;
    margin-top: 10px;
    margin-bottom: 10px;
}

.robot-container.robot-sleeping .robot-eye-pupil {
    opacity: 0;
}

.robot-container.robot-sleeping .robot-mouth {
    border-color: #334155 !important;
    width: 14px !important;
    height: 2px !important;
    border-radius: 2px !important;
    box-shadow: none !important;
}

.robot-container.robot-sleeping .fiber-pulse-core,
.robot-container.robot-sleeping .headphone-rgb-ring {
    background: #1e293b !important;
    box-shadow: none !important;
}

.robot-container.robot-sleeping {
    opacity: 0.85;
}

/* E) BLINDAJE DE CONTRASEÑA: TAPARSE LOS OJOS (covering-eyes) */
.robot-container.covering-eyes .robot-hand-left {
    transform: translate(36px, -46px) rotate(-12deg);
    border-color: var(--nb-neon-green);
}

.robot-container.covering-eyes .robot-hand-right {
    transform: translate(-36px, -46px) rotate(12deg);
    border-color: var(--nb-neon-green);
}

.robot-container.covering-eyes .robot-eyes-wrapper {
    opacity: 0.25;
}

.robot-container.covering-eyes .robot-chest-shield {
    border-color: var(--nb-neon-green);
    box-shadow: 0 0 16px var(--nb-neon-green);
}

/* F) MODO ESPIAR CONTRASEÑA (peeking) */
.robot-container.peeking .robot-hand-left {
    transform: translate(36px, -46px) rotate(-12deg);
}

.robot-container.peeking .robot-hand-right {
    transform: translate(-28px, -32px) rotate(28deg);
}

.robot-container.peeking .robot-eyes-wrapper {
    opacity: 1;
}

.robot-container.peeking .robot-eye:last-child {
    height: 6px;
    margin-top: 8px;
}

/* G) ESCANEO DE DATOS EN TIEMPO REAL (robot-data-scanning) */
.robot-container.robot-data-scanning .fiber-pulse-core {
    animation: fiberEarFastPulse 0.4s infinite alternate;
    background: var(--nb-neon-green);
    box-shadow: 0 0 16px var(--nb-neon-green);
}

@keyframes fiberEarFastPulse {
    from { transform: scale(1); opacity: 0.7; }
    to { transform: scale(1.3); opacity: 1; }
}

/* ================================================================
   9. GLOBO DE DIÁLOGO DE NETBOT (Speech Bubble)
   ================================================================ */
.netbot-speech-bubble {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid var(--nb-cyan);
    border-radius: 16px;
    padding: 12px 18px;
    font-size: 0.92rem;
    color: #f8fafc;
    text-align: center;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(0, 212, 255, 0.15);
    max-width: 380px;
    line-height: 1.5;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.netbot-speech-bubble::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: rgba(17, 24, 39, 0.9);
    border-left: 1px solid var(--nb-cyan);
    border-top: 1px solid var(--nb-cyan);
}

[data-theme="light"] .netbot-speech-bubble {
    background: rgba(255, 255, 255, 0.96);
    color: #1e293b;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .netbot-speech-bubble::before {
    background: rgba(255, 255, 255, 0.96);
}
