/* ========================================
   IA IBRATIN - SIMULADOR WHATSAPP
   Design Moderno e Impecável
======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
    min-height: 100vh;
    color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ========================================
   HEADER
======================================== */
.header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 0;
}

.logo {
    font-size: 3rem;
    margin-bottom: 0.8rem;
    background: linear-gradient(135deg, #FF6D00, #FF8F00, #FFB300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    text-shadow: 0 0 40px rgba(255, 109, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   LAYOUT PRINCIPAL
======================================== */
.main-content {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

/* ========================================
   SIMULADOR WHATSAPP
======================================== */
.whatsapp-simulator {
    width: 420px;
    background: #0b141a;
    border-radius: 20px;
    box-shadow: 
        0 25px 80px rgba(255, 109, 0, 0.15),
        0 10px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
    border: 1px solid rgba(255, 109, 0, 0.3);
}

/* ========================================
   HEADER DO CHAT
======================================== */
.chat-header {
    background: linear-gradient(135deg, #1f2c34 0%, #0b141a 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF6D00, #E65100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(255, 109, 0, 0.4);
}

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

.chat-title h3 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-text {
    color: #25D366;
    font-size: 0.75rem;
    font-weight: 500;
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-action:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   ÁREA DE MENSAGENS
======================================== */
.chat-messages {
    height: 520px;
    overflow-y: auto;
    padding: 16px;
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(180deg, #0b141a 0%, #0d1418 100%);
}

/* ========================================
   MENSAGENS
======================================== */
.message {
    margin-bottom: 8px;
    display: flex;
    animation: messageSlide 0.3s ease-out;
}

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

/* Posicionamento */
.message.client {
    justify-content: flex-end;
}

.message.bot,
.message.human {
    justify-content: flex-start;
}

.message.system {
    justify-content: center;
}

/* ========================================
   BOLHAS DE MENSAGEM
======================================== */
.message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Cliente (Verde WhatsApp) */
.message.client .message-bubble {
    background: linear-gradient(135deg, #005c4b 0%, #004d40 100%);
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Bot IA (Cinza escuro) */
.message.bot .message-bubble {
    background: linear-gradient(135deg, #1f2c34 0%, #17212b 100%);
    color: #ffffff;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Humano (Azul) */
.message.human .message-bubble {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-top-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sistema (Laranja Ibratin) */
.message.system .message-bubble {
    background: linear-gradient(135deg, rgba(255, 109, 0, 0.15) 0%, rgba(230, 81, 0, 0.15) 100%);
    border: 1px solid rgba(255, 109, 0, 0.3);
    color: #ffffff;
    border-radius: 10px;
    text-align: left;
    font-size: 0.85rem;
    max-width: 90%;
}

/* ========================================
   TEXTOS DAS MENSAGENS
======================================== */
.sender-name {
    font-size: 0.7rem;
    color: #FFB300;
    margin-bottom: 4px;
    font-weight: 600;
}

.message-text {
    font-size: 0.9rem;
    line-height: 1.45;
}

.message-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}

/* ========================================
   INDICADOR DE DIGITAÇÃO
======================================== */
.typing-indicator-container .message-bubble {
    padding: 12px 18px;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { 
        transform: translateY(0);
        opacity: 0.4; 
    }
    30% { 
        transform: translateY(-6px);
        opacity: 1; 
    }
}

/* ========================================
   MENSAGEM DE BOAS-VINDAS
======================================== */
.welcome-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.8);
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

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

.welcome-message h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #FF6D00;
}

.welcome-message p {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 20px;
}

.welcome-features {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.welcome-features span {
    background: rgba(255, 109, 0, 0.15);
    border: 1px solid rgba(255, 109, 0, 0.3);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
}

/* ========================================
   CABEÇALHO DA CONVERSA
======================================== */
.conversation-header {
    text-align: center;
    padding: 15px;
    margin-bottom: 10px;
}

.conversation-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #FF6D00;
    margin-bottom: 4px;
}

.conversation-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 10px;
}

/* ========================================
   CONTROLES
======================================== */
.controls {
    background: linear-gradient(135deg, #1f2c34 0%, #0b141a 100%);
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.conversation-selector {
    margin-bottom: 12px;
}

.conversation-selector label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #FF6D00;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.conversation-selector select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(255, 109, 0, 0.3);
    border-radius: 10px;
    background: #0b141a;
    color: #ffffff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.conversation-selector select:focus {
    outline: none;
    border-color: #FF6D00;
    box-shadow: 0 0 0 3px rgba(255, 109, 0, 0.15);
}

.conversation-selector select option {
    background: #1f2c34;
    color: #ffffff;
}

.conversation-selector select optgroup {
    color: #FF6D00;
    font-weight: 600;
}

.control-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #FF6D00, #E65100);
    color: #ffffff;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 109, 0, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-screenshot {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #ffffff;
}

.btn-screenshot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-screenshot:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   FOOTER
======================================== */
.footer {
    text-align: center;
    padding: 3rem 2rem 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.contact-item {
    background: rgba(255, 109, 0, 0.08);
    border: 1px solid rgba(255, 109, 0, 0.2);
    padding: 15px 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.contact-item:hover {
    background: rgba(255, 109, 0, 0.12);
    transform: translateY(-2px);
}

.contact-item strong {
    display: block;
    margin-bottom: 5px;
    color: #FF6D00;
    font-size: 0.85rem;
}

.contact-item a {
    transition: all 0.2s ease;
    text-decoration: none;
}

.contact-item a:hover {
    opacity: 0.8;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.3rem;
    transition: all 0.2s ease;
    padding: 10px;
    border-radius: 10px;
    background: rgba(255, 109, 0, 0.08);
    text-decoration: none;
}

.social-links a:hover {
    color: #FF6D00;
    background: rgba(255, 109, 0, 0.15);
    transform: translateY(-2px);
}

.footer p {
    font-size: 0.85rem;
    opacity: 0.6;
}

/* ========================================
   SCROLLBAR
======================================== */
.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 109, 0, 0.3);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 109, 0, 0.5);
}

/* ========================================
   RESPONSIVIDADE
======================================== */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .whatsapp-simulator {
        width: 100%;
        max-width: 420px;
        border-radius: 0;
    }
    
    .header {
        margin-bottom: 1rem;
        padding: 1rem 0;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .chat-messages {
        height: 450px;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 1rem;
    }
    
    .welcome-features {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .chat-messages {
        height: 400px;
        padding: 12px;
    }
    
    .message-bubble {
        max-width: 88%;
        padding: 8px 12px;
    }
    
    .message-text {
        font-size: 0.85rem;
    }
    
    .controls {
        padding: 12px;
    }
    
    .control-buttons {
        flex-direction: column;
    }
}
