* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #F5E6F3 0%, #E8D5F2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
    padding: 20px;
}

/* Initial Card Styles */
.initial-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 100%;
    margin: 0 auto 20px;
    animation: slideIn 0.5s ease-out;
    overflow: hidden;
}

.card-content {
    padding: 32px 24px;
    text-align: center;
}

.card-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #B91C7C;
    margin-bottom: 16px;
}

.step-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #4B5563;
}

/* Chat Container */
.chat-container {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.5s ease-out;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: white;
    min-height: 300px;
    max-height: 500px;
}


.message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: messageSlide 0.3s ease-out;
}

.message.bot {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #E80070;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.serasa-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #E80070 0%, #FF1493 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.7rem;
    text-align: center;
    line-height: 1;
}

.message-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.message-content {
    background: #F3F4F6;
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 320px;
    position: relative;
    line-height: 1.5;
    font-size: 0.95rem;
    color: #374151;
}

.message.user .message-content {
    background: #E80070;
    color: white;
}

.message.bot .message-content {
    border-bottom-left-radius: 4px;
}

.message.user .message-content {
    border-bottom-right-radius: 4px;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #10B981;
    margin-bottom: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10B981;
    border-radius: 50%;
}

/* Promotional Banner */
.promo-banner {
    background: linear-gradient(135deg, #E80070 0%, #FF1493 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    margin: 8px 0;
    box-shadow: 0 4px 12px rgba(232, 0, 112, 0.3);
}

.golden-text {
    color: #FFD700;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Special Message Types */
.message-image {
    max-width: 100%;
    border-radius: 12px;
    margin: 8px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message-audio {
    width: 100%;
    margin: 8px 0;
    border-radius: 8px;
}

.message-video {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    margin: 8px 0;
    border: none;
}

.message-iframe {
    width: 100%;
    height: 300px;
    border-radius: 12px;
    margin: 8px 0;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #F3F4F6;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 320px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E80070;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

/* Input Container */
.input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
    align-items: center;
}

.input-container input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 25px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    color: #9CA3AF;
}

.input-container input:focus {
    border-color: #E80070;
    box-shadow: 0 0 0 3px rgba(232, 0, 112, 0.1);
    color: #374151;
}

.send-button {
    background: #E80070;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(232, 0, 112, 0.3);
}

.send-button:hover {
    background: #D91A72;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(232, 0, 112, 0.4);
}

/* Action Buttons */
.action-button {
    background: #E80070;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin: 8px 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(232, 0, 112, 0.3);
    display: inline-block;
    text-decoration: none;
}

.action-button:hover {
    background: #D91A72;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 0, 112, 0.4);
}

.action-button.clicked {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

/* Data Display */
.cpf-data {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    border-radius: 12px;
    padding: 16px;
    margin: 8px 0;
}

.cpf-data h4 {
    color: #0369A1;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.cpf-data p {
    margin: 4px 0;
    font-size: 0.85rem;
    color: #334155;
}

/* Protocol Display */
.protocol {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 1px solid #F59E0B;
    border-radius: 12px;
    padding: 12px;
    margin: 8px 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #92400E;
}

/* Footer */
.footer {
    max-width: 500px;
    margin: 20px auto 0;
    text-align: center;
}

.disclaimer {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border-left: 4px solid #E80070;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.disclaimer p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4B5563;
    text-align: left;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-link {
    color: #B91C7C;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #E80070;
}

.separator {
    color: #9CA3AF;
    font-size: 0.85rem;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.fade-out {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s ease;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .chat-container {
        max-width: 100%;
    }
    
    .initial-card {
        max-width: 100%;
    }
    
    .message-content {
        max-width: 280px;
    }
    
    .input-container {
        padding: 16px;
    }
    
    .input-container input {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .send-button {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .message-content {
        max-width: 240px;
    }
    
    .card-content {
        padding: 24px 20px;
    }
    
    .card-content h1 {
        font-size: 1.3rem;
    }
    
    .step-description {
        font-size: 0.9rem;
    }
    
    .disclaimer p {
        font-size: 0.8rem;
    }
    
    .footer-links {
        font-size: 0.8rem;
    }
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #E80070;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success States */
.success-message {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    border: 1px solid #34D399;
    color: #059669;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 8px 0;
    font-weight: 500;
    text-align: center;
}

/* Highlight Elements */
.highlight-text {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.amount-highlight {
    background: linear-gradient(135deg, #E80070 0%, #FF1493 100%);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.1em;
}