/* Floating Character Styles */
.floating-character {
    position: fixed;
    z-index: 1000;
    transition: all 0.3s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.character-avatar {
    position: relative;
    cursor: pointer;
}

.avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.avatar-container:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Nuevos tamaños más grandes */
.avatar-container.small {
    width: 60px;
    height: 60px;
}

.avatar-container.medium {
    width: 80px;
    height: 80px;
}

.avatar-container.large {
    width: 100px;
    height: 100px;
}

.avatar-container.xlarge {
    width: 120px;
    height: 120px;
}

.avatar-container.xxlarge {
    width: 150px;
    height: 150px;
}

/* Opción de fondo transparente */
.avatar-container.transparent {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* Opción de imagen sin círculo */
.avatar-container.no-circle {
    border-radius: 0 !important;
    padding: 0 !important;
}

.avatar-container.no-circle img {
    border-radius: 0 !important;
}

.avatar-container.no-circle .avatar-placeholder {
    border-radius: 0 !important;
}

/* Opción de imagen original (sin recortar) */
.avatar-container.original {
    border-radius: 0 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 60px;
    min-height: 60px;
}

.avatar-container.original img {
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain !important;
}

.avatar-container.original .avatar-placeholder {
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    min-width: 60px;
    min-height: 60px;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-container.no-circle img {
    border-radius: 0;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.avatar-container.no-circle .avatar-placeholder {
    border-radius: 0;
}

.character-name {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Color Schemes */
.avatar-container.default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.avatar-container.blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.avatar-container.green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.avatar-container.red {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.avatar-container.purple {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.avatar-container.orange {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* Character Card Styles */
.character-card-container {
    position: absolute;
    top: -10px;
    left: 100%;
    margin-left: 10px;
    z-index: 1001;
    display: none;
    max-width: 300px;
    min-width: 250px;
}

.character-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    animation: cardSlideIn 0.3s ease-out;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.card-header {
    display: flex;
    align-items: center;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.card-icon {
    font-size: 18px;
    color: #667eea;
}

.card-content {
    padding: 16px 20px;
}

.card-text {
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a4a;
}

.card-media {
    margin-bottom: 12px;
}

.card-media img,
.card-media video {
    width: 100%;
    border-radius: 8px;
    max-height: 150px;
    object-fit: cover;
}

.card-tip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.tip-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.tip-content {
    font-size: 14px;
    line-height: 1.5;
    color: #856404;
}

.card-discount {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-radius: 8px;
    color: white;
}

.discount-badge {
    font-size: 32px;
    margin-bottom: 8px;
}

.discount-content {
    font-size: 14px;
    font-weight: 600;
}

.card-inspiration {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.inspiration-quote {
    font-size: 14px;
    font-style: italic;
    line-height: 1.6;
}

.card-actions {
    padding: 12px 20px 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.card-action-btn {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.card-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* Card Animations */
.character-card.fade {
    animation: fadeIn 0.3s ease-out;
}

.character-card.slide {
    animation: slideIn 0.3s ease-out;
}

.character-card.bounce {
    animation: bounceIn 0.5s ease-out;
}

.character-card.zoom {
    animation: zoomIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Character Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(5deg);
    }
    75% {
        transform: rotate(-5deg);
    }
}

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

/* Modal Styles */
.character-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #666;
}

.modal-body {
    padding: 20px 24px;
    font-size: 14px;
    line-height: 1.6;
    color: #4a4a4a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .character-card-container {
        max-width: 280px;
        min-width: 220px;
    }
    
    .avatar-container.large {
        width: 80px;
        height: 80px;
    }
    
    .character-name {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .character-card-container {
        max-width: 250px;
        min-width: 200px;
    }
    
    .avatar-container.medium,
    .avatar-container.large {
        width: 60px;
        height: 60px;
    }
    
    .character-name {
        font-size: 10px;
    }
}

/* Accessibility */
.floating-character:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.card-action-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .avatar-container {
        border: 3px solid #000;
    }
    
    .character-card {
        border: 2px solid #000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .floating-character,
    .character-card,
    .modal-content {
        animation: none;
        transition: none;
    }
}

/* Estilos para opciones de interacción */
.interaction-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.option-btn i {
    font-size: 20px;
    flex-shrink: 0;
}

/* Estilos para el chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
    max-height: 60vh;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 16px;
    max-height: 300px;
}

.message {
    margin-bottom: 12px;
    display: flex;
}

.message.user-message {
    justify-content: flex-end;
}

.message.character-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.user-message .message-content {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.character-message .message-content {
    background: #fff;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #667eea;
}

.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.send-btn i {
    font-size: 14px;
} 

/* Animaciones adicionales para el footer */
@keyframes footer-slide {
    0% {
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes footer-bounce-advanced {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-30px) scale(1.1);
    }
    60% {
        transform: translateY(-15px) scale(1.05);
    }
}

@keyframes footer-rotate {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(90deg);
    }
    50% {
        transform: rotate(180deg);
    }
    75% {
        transform: rotate(270deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes footer-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@keyframes footer-float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Clases para las nuevas animaciones */
.floating-character.footer-slide {
    animation: footer-slide 0.8s ease-out;
}

.floating-character.footer-bounce-advanced {
    animation: footer-bounce-advanced 1.2s ease-in-out infinite;
}

.floating-character.footer-rotate {
    animation: footer-rotate 2s linear infinite;
}

.floating-character.footer-shake {
    animation: footer-shake 0.5s ease-in-out infinite;
}

.floating-character.footer-float {
    animation: footer-float 2s ease-in-out infinite;
}

/* Efectos especiales para diferentes posiciones */
.floating-character.footer-bottom-left {
    border-radius: 50% 50% 50% 0;
}

.floating-character.footer-bottom-right {
    border-radius: 50% 50% 0 50%;
}

.floating-character.footer-bottom-center {
    border-radius: 50%;
}

/* Quitar el cuadro de fondo cuando está en el footer */
.floating-character.footer-mode .avatar-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.floating-character.footer-mode .avatar-container img {
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

/* Quitar también el cuadro del personaje completo cuando está en footer */
.floating-character.footer-mode {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Efectos de transición suave */
.floating-character {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.floating-character.footer-mode {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
} 