.ai-button {
    top: 35px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    position: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
    z-index: 1000; /* Asegura que el botón esté por encima de otros elementos */
}

.ai-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #1db5a6,
        #2ac9ba,
        #4dd4c7,
        #6fded4,
        #35c4b6,
        #20bfb0,
        #1db5a6
    );
    animation: rotate 3s linear infinite;
    z-index: 1;
}

.ai-button:hover {
    transform: scale(1.05);
}

.ai-button:active {
    transform: scale(0.95);
}

.ai-circle {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.ai-text {
    font-size: 14px;
    font-weight: bold;
    color: #1db5a6;
    letter-spacing: 1px;
}

.ai-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Variante más grande para demostración */
.ai-button-large {
    width: 120px;
    height: 120px;
    margin-left: 40px;
}

.ai-button-large .ai-circle {
    width: 90px;
    height: 90px;
}

.ai-button-large .ai-text {
    font-size: 24px;
}

/* Estilos para el modal de IA */
.ai-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ai-textarea {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.3s ease;
}

.ai-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #1db5a6);
}

.ai-textarea::placeholder {
    color: #999;
    font-style: italic;
}

.ai-submit-btn {
    background: linear-gradient(135deg, #1db5a6, #35c4b6);
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 181, 166, 0.3);
}

.ai-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ai-response-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.ai-response-header {
    font-weight: bold;
    color: var(--primary-color, #1db5a6);
    margin-bottom: 15px;
    font-size: 16px;
}

.ai-response-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color, #1db5a6);
    line-height: 1.6;
    font-size: 14px;
    color: #333;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.ai-new-request-btn {
    background: transparent;
    color: var(--primary-color, #1db5a6);
    border: 2px solid var(--primary-color, #1db5a6);
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.ai-new-request-btn:hover {
    background: var(--primary-color, #1db5a6);
    color: white;
}

.ai-loading-section {
    text-align: center;
    padding: 40px 20px;
}

.ai-loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ai-loading-dots {
    display: flex;
    gap: 5px;
}

.ai-loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color, #1db5a6);
    animation: ai-loading-bounce 1.4s ease-in-out infinite both;
}

.ai-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.ai-loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes ai-loading-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.ai-loading-text {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Typing animation for response */
.typing-cursor::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color, #1db5a6);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ai-textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .ai-submit-btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .ai-response-content {
        font-size: 13px;
        padding: 15px;
    }
}