/* ═══════════════════════════════════════════════════════════════════════════════
   PAW AGENT STYLES - Huella de Perro Neon Interactiva
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Keyframes para efectos neon pulsantes */
@keyframes neon-pulse-magenta-cyan {
    0% {
        box-shadow: 
            0 0 10px #ff00ff,
            0 0 20px #ff00ff,
            inset 0 0 10px rgba(255, 0, 255, 0.3);
        border-color: #ff00ff;
    }
    50% {
        box-shadow: 
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            inset 0 0 20px rgba(0, 255, 255, 0.3);
        border-color: #00ffff;
    }
    100% {
        box-shadow: 
            0 0 10px #ff00ff,
            0 0 20px #ff00ff,
            inset 0 0 10px rgba(255, 0, 255, 0.3);
        border-color: #ff00ff;
    }
}

@keyframes paw-toe-glow {
    0%, 100% {
        box-shadow: 0 0 15px #ff00ff, inset 0 0 5px rgba(255, 0, 255, 0.5);
    }
    50% {
        box-shadow: 0 0 25px #00ffff, inset 0 0 10px rgba(0, 255, 255, 0.7);
    }
}

@keyframes paw-toe-click {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes paw-notification-slide {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes paw-chat-slide-in {
    from {
        opacity: 0;
        transform: scaleY(0.95);
    }
    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CONTENEDOR PRINCIPAL DE LA HUELLA
   ═══════════════════════════════════════════════════════════════════════════════ */

#pawAgentContainer {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 500px;
    max-width: 90vw;
    font-family: 'Architects Daughter', cursive;
    color: #ffffff;
    cursor: grab;
    user-select: none;
    transition: all 0.3s ease;
    touch-action: none;
}

#pawAgentContainer.dragging {
    cursor: grabbing;
    z-index: 10000;
}

#pawAgentContainer.paw-minimized {
    width: 120px;
    height: 140px;
    position: fixed;
    bottom: 20px;
    right: 20px;
    top: auto;
    left: auto;
}

#pawAgentContainer.paw-minimized:hover {
    transform: scale(1.1);
}

.paw-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.1;
    background: radial-gradient(circle at 35% 25%, rgba(0, 255, 255, 0.1), rgba(255, 0, 255, 0.05));
    border: 3px solid #ff00ff;
    border-radius: 45% 45% 50% 50% / 60% 60% 40% 40%;
    animation: neon-pulse-magenta-cyan 3s ease-in-out infinite;
    box-sizing: border-box;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.4), 0 0 60px rgba(0, 255, 255, 0.2);
    transition: all 0.3s ease;
}

#pawAgentContainer.paw-minimized .paw-main {
    aspect-ratio: 1;
    background: radial-gradient(circle at 35% 25%, rgba(0, 255, 255, 0.8), rgba(0, 255, 255, 0.4));
    border: 2px solid #00ffff;
    animation: none;
    box-shadow: 0 0 25px #00ffff, 0 0 40px #00ffff, inset 0 0 15px rgba(0, 255, 255, 0.6);
    cursor: pointer;
}

.paw-agent-logo-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    display: none;
    pointer-events: none;
    z-index: 2;
}

.paw-agent-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(0, 255, 255, 0.6));
}

#pawAgentContainer.paw-minimized .paw-agent-logo-wrapper {
    display: block;
}

@keyframes neon-label-pulse {
    0%, 100% {
        text-shadow: 0 0 8px #ffffff, 0 0 18px #ff00ff, 0 0 30px rgba(255, 0, 255, 0.7);
        color: #ffffff;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        text-shadow: 0 0 10px #ffffff, 0 0 22px #ff00ff, 0 0 40px rgba(255, 0, 255, 0.85);
        color: #ffffff;
        transform: translate(-50%, -50%) scale(1.03);
    }
}

@keyframes neon-label-pulse-magenta {
    0%, 100% {
        text-shadow: 0 0 10px #ff00ff, 0 0 22px #ff00ff, 0 0 40px rgba(255,0,255,0.9);
        color: #ff00ff;
        transform: translateX(-50%) scale(1);
    }
    50% {
        text-shadow: 0 0 14px #ff00ff, 0 0 30px #ff33ff, 0 0 50px rgba(255,0,255,1);
        color: #ff00ff;
        transform: translateX(-50%) scale(1.06);
    }
}

/* Diálogo minimizado */
.paw-minimized-dialog {
    position: absolute;
    bottom: 6%;
    top: auto;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 900;
    color: #ff00ff;
    text-align: center;
    text-shadow: 0 0 12px #ff00ff, 0 0 22px #ff33ff, 0 0 36px rgba(255, 0, 255, 0.95);
    letter-spacing: 1px;
    z-index: 12;
    white-space: nowrap;
    pointer-events: none;
    animation: neon-label-pulse-magenta 1.8s infinite ease-in-out;
}

#pawAgentContainer.paw-minimized .paw-minimized-dialog {
    display: flex;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   DEDOS/TOES - Puntos interactivos
   ═══════════════════════════════════════════════════════════════════════════════ */

.paw-toes {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#pawAgentContainer.paw-minimized .paw-toes {
    display: none;
}

.paw-toe {
    position: absolute;
    width: 14%;
    aspect-ratio: 1;
    border: 2.5px solid #ff00ff;
    border-radius: 60% 60% 50% 50% / 70% 70% 30% 30%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 0, 255, 0.5), rgba(0, 255, 255, 0.3));
    cursor: pointer;
    pointer-events: all;
    transition: all 0.2s ease;
    animation: paw-toe-glow 2.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 10px #00ffff;
    box-shadow: 0 0 15px #ff00ff, inset 0 0 8px rgba(255, 0, 255, 0.6);
}

.paw-toe:hover {
    transform: scale(1.25);
    box-shadow: 0 0 40px #ff00ff, 0 0 60px #00ffff, inset 0 0 20px rgba(255, 0, 255, 0.8);
    z-index: 100;
}

.paw-toe-active {
    animation: paw-toe-click 0.3s ease;
}

/* Posiciones de los dedos - Configuración en forma de huella real */
.paw-toe:nth-child(1) { 
    top: 5%;
    left: 12%;
    width: 13%;
    animation-delay: 0s;
}

.paw-toe:nth-child(2) { 
    top: 5%;
    left: 32%;
    width: 13%;
    animation-delay: 0.3s;
}

.paw-toe:nth-child(3) { 
    top: 5%;
    left: 52%;
    width: 13%;
    animation-delay: 0.6s;
}

.paw-toe:nth-child(4) { 
    top: 5%;
    right: 12%;
    width: 13%;
    animation-delay: 0.9s;
}

.paw-toe:nth-child(5) {
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    width: 16%;
    animation-delay: 0.15s;
}

/* Etiquetas en los dedos */
.paw-toe::before {
    content: attr(data-label);
    font-size: 0.7rem;
    text-align: center;
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   AREA CENTRAL DEL CHAT
   ═══════════════════════════════════════════════════════════════════════════════ */

.paw-chat-area {
    position: absolute;
    width: 85%;
    height: 72%;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.9), rgba(20, 5, 25, 0.95));
    border: 1.5px solid #00ffff;
    border-radius: 15px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(255, 0, 255, 0.1);
    animation: paw-chat-slide-in 0.4s ease;
    opacity: 1;
    transition: all 0.3s ease;
}

.paw-chat-area.paw-chat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scaleY(0.95);
}

#pawAgentContainer.paw-minimized .paw-chat-area {
    display: none;
}

/* Header del chat */
.paw-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    gap: 8px;
}

.paw-chat-header h3 {
    margin: 0;
    font-size: 1rem;
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff;
}

.paw-visit-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    background: rgba(255, 0, 255, 0.2);
    border: 1px solid #ff00ff;
    color: #ff00ff;
    transition: all 0.3s ease;
}

.paw-visit-team {
    background: rgba(255, 215, 0, 0.2);
    border-color: #ffd700;
    color: #ffd700;
}

.paw-visit-guest {
    background: rgba(0, 255, 255, 0.2);
    border-color: #00ffff;
    color: #00ffff;
}

.paw-visit-follower {
    background: rgba(255, 0, 255, 0.2);
    border-color: #ff00ff;
    color: #ff00ff;
}

/* Cuerpo del chat */
#pawChatBody {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: #ff00ff rgba(255, 0, 255, 0.1);
}

.paw-chat-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 5px;
    scrollbar-width: thin;
    scrollbar-color: #ff00ff rgba(255, 0, 255, 0.1);
}

#pawChatBody::-webkit-scrollbar {
    width: 6px;
}

#pawChatBody::-webkit-scrollbar-track {
    background: rgba(255, 0, 255, 0.1);
    border-radius: 3px;
}

#pawChatBody::-webkit-scrollbar-thumb {
    background: #ff00ff;
    border-radius: 3px;
    box-shadow: 0 0 10px #ff00ff;
}

/* Mensajes del chat */
.paw-message {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.85rem;
    animation: paw-chat-slide-in 0.3s ease;
}

.paw-message-user {
    background: rgba(255, 215, 0, 0.2);
    border-left: 2px solid #ffd700;
    align-self: flex-end;
    max-width: 85%;
}

.paw-message-bot {
    background: rgba(0, 255, 255, 0.2);
    border-left: 2px solid #00ffff;
    align-self: flex-start;
    max-width: 85%;
}

.paw-message-loading {
    background: rgba(255, 0, 255, 0.2);
    border-left: 2px solid #ff00ff;
}

.paw-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 0.7rem;
    color: #00ffff;
    opacity: 0.8;
}

.paw-message-meta strong {
    color: #ff00ff;
    text-transform: uppercase;
}

.paw-message-text {
    color: #ffffff;
    line-height: 1.3;
    word-wrap: break-word;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   BOTÓN DE MINIMIZAR
   ═══════════════════════════════════════════════════════════════════════════════ */

.paw-minimize-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border: 2px solid #ff00ff;
    background: radial-gradient(circle at 30% 30%, rgba(255, 0, 255, 0.4), rgba(0, 255, 255, 0.2));
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 101;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
    pointer-events: all;
    padding: 0;
    line-height: 1;
    font-weight: bold;
}

.paw-minimize-btn:hover {
    box-shadow: 0 0 20px #ff00ff, 0 0 30px #00ffff;
    transform: scale(1.15);
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.4), rgba(255, 0, 255, 0.2));
}

.paw-minimize-btn:active {
    transform: scale(0.9);
}

#pawAgentContainer.paw-minimized .paw-minimize-btn {
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    font-size: 1rem;
    border: 2px solid #00ffff;
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.6), rgba(0, 255, 255, 0.3));
    box-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff, inset 0 0 10px rgba(0, 255, 255, 0.7);
}

.paw-chat-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

#pawVisitType {
    padding: 6px;
    border: 1px solid #ff00ff;
    background: rgba(0, 0, 0, 0.6);
    color: #00ffff;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: 'Architects Daughter', cursive;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

#pawVisitType:hover {
    box-shadow: 0 0 10px #ff00ff;
    background: rgba(255, 0, 255, 0.1);
}

#pawVisitType option {
    background: rgba(0, 0, 0, 0.9);
    color: #00ffff;
}

.paw-input-row {
    display: flex;
    gap: 4px;
    align-items: stretch;
}

#pawChatInput {
    flex: 1;
    padding: 8px;
    border: 1px solid #00ffff;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Architects Daughter', cursive;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 5px rgba(0, 255, 255, 0.2);
}

#pawChatInput:focus {
    box-shadow: 0 0 10px #00ffff, inset 0 0 5px rgba(0, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.8);
}

#pawChatInput::placeholder {
    color: rgba(0, 255, 255, 0.5);
}

.paw-send-btn {
    padding: 8px 12px;
    border: 1px solid #ff00ff;
    background: radial-gradient(circle at 30% 30%, rgba(255, 0, 255, 0.4), rgba(0, 255, 255, 0.2));
    color: #ffffff;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Architects Daughter', cursive;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
    text-transform: uppercase;
}

.paw-send-btn:hover {
    box-shadow: 0 0 20px #ff00ff, 0 0 30px #00ffff;
    transform: scale(1.05);
    background: radial-gradient(circle at 30% 30%, rgba(0, 255, 255, 0.4), rgba(255, 0, 255, 0.2));
}

.paw-send-btn:active {
    transform: scale(0.95);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   NOTIFICACIONES FLOTANTES
   ═══════════════════════════════════════════════════════════════════════════════ */

.paw-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.3), rgba(0, 255, 255, 0.1));
    border: 1.5px solid #ff00ff;
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.9rem;
    text-shadow: 0 0 5px #ff00ff;
    box-shadow: 0 0 20px #ff00ff, 0 0 40px #00ffff;
    z-index: 10000;
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.3s ease;
    pointer-events: none;
    animation: paw-notification-slide 0.3s ease forwards;
}

.paw-notification-show {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE - Ajustes para móviles
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    #pawAgentContainer {
        width: 95vw;
        bottom: 10px;
        right: 50%;
        transform: translateX(50%);
    }

    .paw-main {
        aspect-ratio: auto;
        height: 400px;
    }

    .paw-toe {
        width: 14%;
    }

    .paw-toe:nth-child(5) {
        width: 16%;
    }

    .paw-chat-area {
        width: 88%;
        height: 70%;
    }

    .paw-message {
        font-size: 0.8rem;
    }

    .paw-notification {
        right: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .paw-toe {
        width: 16%;
        font-size: 0.8rem;
    }

    .paw-chat-header h3 {
        font-size: 0.9rem;
    }

    .paw-visit-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    #pawChatInput,
    .paw-send-btn {
        font-size: 0.75rem;
        padding: 6px;
    }
}
