 /* ================== ESTILOS ================== */
 #messages {
     flex: 1;
     padding: 15px;
     overflow-y: auto;
     display: flex;
     flex-direction: column;
     gap: 10px;
     background: #f4f7f6;
     scroll-behavior: smooth;
 }

 .message-bubble {
     max-width: 85%;
     padding: 10px 15px;
     font-size: 14px;
     line-height: 1.4;
     word-wrap: break-word;
     position: relative;
     animation: messageFadeIn 0.3s ease;
 }

 @keyframes messageFadeIn {
     from {
         opacity: 0;
         transform: translateY(10px);
     }

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 .bot {
     background: white;
     color: #333;
     align-self: flex-start;
     border-radius: 18px 18px 18px 4px;
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
 }

 .user {
     background: #0066ff;
     color: white;
     align-self: flex-end;
     border-radius: 18px 18px 4px 18px;
 }

 #messages img {
     cursor: pointer;
     transition: transform 0.2s;
     width: 100%;
     border-radius: 10px;
     margin-top: 5px;
     display: block;
 }

 #cloud-message {
     position: absolute;
     top: -120px;
     right: 10px;
     padding: 18px 30px;
     border-radius: 45px;
     font-family: 'Arial Black', sans-serif;
     font-size: 16px;
     font-weight: 900;
     color: #0066ff;
     white-space: nowrap;
     z-index: 10001;
     background: linear-gradient(180deg, #ffffff 0%, #f0f7ff 100%);
     border: 4px solid #0066ff;
     box-shadow: 0 10px 0 #0066ff, 0 18px 30px rgba(0, 0, 0, .25);
     animation: popIn .6s ease-out, breathe 3s ease-in-out infinite;
 }

 .cloud-tail {
     position: absolute;
     bottom: -32px;
     left: 50%;
     transform: translateX(-50%);
     width: 6px;
     height: 32px;
     background: #ffffff;
     border-left: 3px solid #0066ff;
     border-bottom: 3px solid #0066ff;
     border-radius: 0 0 10px 10px;
 }

 #chatbot-button {
     position: fixed;
     bottom: 20px;
     right: 20px;
     width: 280px;
     cursor: pointer;
     z-index: 10000;
     transition: transform 0.3s;
 }

 #chatbot-button:hover {
     transform: scale(1.1);
 }

 #chatbot-icon {
     width: 100%;
 }

 #chatbot {
     position: fixed;
     bottom: 30px;
     right: 30px;
     width: 380px;
     height: 550px;
     background: #f9f9f9;
     border-radius: 15px;
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
     display: flex;
     flex-direction: column;
     overflow: hidden;
     z-index: 10001;
 }

 .header {
     background: #0066ff;
     color: white;
     padding: 15px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     font-weight: bold;
 }

 .input-area {
     display: flex;
     padding: 10px;
     background: white;
     border-top: 1px solid #eee;
 }

 input#user-input {
     flex: 1;
     border: none;
     outline: none;
     padding: 10px;
     font-size: 14px;
 }

 button#send-btn {
     background: #0066ff;
     color: white;
     border: none;
     padding: 10px 15px;
     border-radius: 8px;
     cursor: pointer;
 }

 .hidden {
     display: none !important;
 }

 #image-modal {
     display: none;
     position: fixed;
     z-index: 20002;
     left: 0;
     top: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.9);
     justify-content: center;
     align-items: center;
 }

 #image-modal.active {
     display: flex;
 }

 #modal-img {
     max-width: 85%;
     max-height: 85%;
     border: 3px solid white;
 }

 #modal-close {
     position: absolute;
     top: 20px;
     right: 30px;
     color: white;
     font-size: 40px;
     cursor: pointer;
 }

 .nav-arrow {
     position: absolute;
     top: 50%;
     transform: translateY(-50%);
     color: white;
     font-size: 50px;
     cursor: pointer;
     padding: 20px;
     user-select: none;
 }

 @keyframes popIn {
     0% {
         transform: scale(0) translateY(20px);
         opacity: 0;
     }

     80% {
         transform: scale(1.1);
     }

     100% {
         transform: scale(1);
         opacity: 1;
     }
 }

 @keyframes breathe {

     0%,
     100% {
         transform: scale(1);
     }

     50% {
         transform: scale(1.04);
     }
 }

 /* ================== AJUSTES PARA MÓVILES ================== */
 @media (max-width: 600px) {
     #chatbot-button {
         width: 90px !important;
         bottom: 15px;
         right: 15px;
     }

     #chatbot-icon {
         border-radius: 50%;
         box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
     }

     #cloud-message {
         display: none !important;
     }

     #chatbot {
         width: 90% !important;
         height: 80% !important;
         bottom: 10px !important;
         right: 5% !important;
         left: 5% !important;
         border-radius: 15px;
     }

     .message-bubble {
         max-width: 90%;
         font-size: 15px;
     }

     .header {
         padding: 10px;
         font-size: 14px;
     }
 }

 .hidden {
     display: none !important;
 }