/* Reset e configurações base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores oficiais Mercado Livre */
    --ml-yellow: #FFE600;
    --ml-yellow-dark: #F5D900;
    --ml-blue: #2D3277;
    --ml-blue-light: #3D4287;
    --ml-blue-dark: #1D2267;
    
    --bg-primary: #F5F5F5;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.95);
    
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-accent: #2D3277;
    --text-on-yellow: #333333;
    --text-on-blue: #FFFFFF;
    
    --border-color: rgba(0, 0, 0, 0.1);
    --border-glow: rgba(255, 230, 0, 0.3);
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --shadow-glow: 0 0 30px rgba(255, 230, 0, 0.3);
    
    --border-radius: 6px;
    --border-radius-lg: 8px;
    --border-radius-xl: 10px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

body {
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background com formas animadas */
.main-container {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--ml-yellow), var(--ml-blue));
    opacity: 0.08;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    background: var(--ml-yellow);
    animation-delay: -7s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    background: var(--ml-blue);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-30px) rotate(120deg); }
    66% { transform: translateY(30px) rotate(240deg); }
}

/* Container principal */
.content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 500px;
}

.card-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.card-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ml-yellow);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

/* Header */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ml-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.brand-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ml-blue);
    margin: 0;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--ml-yellow);
    border: 1px solid var(--ml-yellow-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-on-yellow);
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.status-badge i {
    font-size: 0.6rem;
    animation: pulse 2s infinite;
    color: var(--text-on-yellow);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Conteúdo principal */
.main-content {
    text-align: center;
    margin-bottom: 2rem;
}

.main-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Grid de features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.feature-item:hover::before {
    left: 100%;
}

.feature-item:hover {
    transform: translateY(-5px);
    border-color: var(--ml-yellow);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--ml-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
}

.feature-icon i {
    font-size: 1.2rem;
    color: var(--ml-blue);
}

.feature-text h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Botão CTA */
.cta-button {
    background: var(--ml-blue);
    color: var(--text-on-blue);
    border: none;
    padding: 1.5rem 3rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    min-width: 300px;
    justify-content: center;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: var(--ml-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 50, 119, 0.3);
}

.button-glow {
    display: none;
}

.cta-button i {
    font-size: 1.3rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes highlightPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 30px rgba(255, 230, 0, 0.6);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(255, 230, 0, 0.8);
    }
}

/* Indicadores de confiança */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.trust-item i {
    color: var(--ml-blue);
    font-size: 1rem;
}

/* Footer */
.footer-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--ml-blue);
}

.copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Modal de verificação */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    transition: var(--transition);
}

.verification-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    height: 80vh;
    max-height: 700px;
    z-index: 1001;
    transition: var(--transition);
}

.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.modal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ml-yellow);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.modal-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-logo {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.header-text h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--ml-blue);
    margin-bottom: 0.25rem;
}

.header-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.close-btn i {
    font-size: 1.1rem;
}

.modal-body {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.conversation-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: 100%;
}

/* Mensagens da conversa */
.dialog-message {
    max-width: 85%;
    padding: 1.2rem 1.5rem;
    border-radius: 20px;
    font-size: 1rem;
    line-height: 1.5;
    animation: messageSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    position: relative;
}

.system-message {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 8px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.user-message {
    background: var(--ml-blue);
    color: var(--text-on-blue);
    align-self: flex-end;
    border-bottom-right-radius: 8px;
    box-shadow: var(--shadow-md);
}

.typing-status {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    border-bottom-left-radius: 8px;
    max-width: 85%;
    align-self: flex-start;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.typing-animation {
    display: flex;
    gap: 6px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ml-yellow);
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dot:nth-child(3) { animation-delay: 0s; }

.verification-button {
    background: var(--ml-blue);
    color: var(--text-on-blue);
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-md);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

.verification-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.verification-button:hover::before {
    left: 100%;
}

.verification-button:hover {
    background: var(--ml-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 50, 119, 0.3);
}

.input-section {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: nowrap;
}

.text-input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.text-input::placeholder {
    color: var(--text-muted);
}

.text-input:focus {
    border-color: var(--ml-blue);
    box-shadow: 0 0 0 3px rgba(45, 50, 119, 0.1);
}

.submit-btn {
    background: var(--ml-blue);
    color: var(--text-on-blue);
    border: none;
    padding: 0.9rem 1.5rem;
    min-width: 110px;
    height: 50px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: var(--shadow-md);
    font-size: 1rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    background: var(--ml-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 50, 119, 0.3);
}

.submit-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.5;
}

.submit-btn:disabled::before {
    display: none;
}

.submit-btn i {
    font-size: 1rem;
}

.submit-text {
    font-family: 'Proxima Nova', sans-serif;
    letter-spacing: 0.3px;
}

/* Estados de visibilidade */
.invisible {
    display: none !important;
}

/* Animações */
@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .main-container {
        padding: 1rem;
    }
    
    .card-container {
        padding: 2rem 1.5rem;
    }
    
    .header-section {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }
    
    .status-badge {
        margin-top: 0;
        order: -1;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .ml-logo {
        width: 50px;
        height: 50px;
    }
    
    .brand-text h1 {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .trust-indicators {
        gap: 1rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .verification-modal {
        width: 95%;
        height: 85vh;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .dialog-message {
        max-width: 90%;
    }
    
    .input-section {
        padding: 1.25rem 1.5rem;
    }
    
    .input-wrapper {
        gap: 0.75rem;
    }
    
    .text-input {
        padding: 0.85rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .submit-btn {
        min-width: 95px;
        padding: 0.85rem 1.2rem;
        font-size: 0.9rem;
        height: 45px;
        gap: 0.5rem;
        flex-shrink: 0;
    }
    
    .submit-btn i {
        font-size: 0.9rem;
    }
    
    .submit-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .card-container {
        padding: 1.5rem 1rem;
    }
    
    .header-section {
        gap: 1rem;
    }
    
    .status-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .main-title {
        font-size: 1.6rem;
    }
    
    .cta-button {
        padding: 1.2rem 2.5rem;
        font-size: 1.1rem;
        min-width: 250px;
        transform: scale(1.02);
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .input-section {
        padding: 1rem 1.25rem;
    }
    
    .input-wrapper {
        gap: 0.6rem;
    }
    
    .text-input {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: 0;
    }
    
    .submit-btn {
        min-width: 85px;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        height: 42px;
        gap: 0.4rem;
        flex-shrink: 0;
    }
    
    .submit-btn i {
        font-size: 0.85rem;
    }
    
    .submit-text {
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    .input-section {
        padding: 0.9rem 1rem;
    }
    
    .input-wrapper {
        gap: 0.5rem;
    }
    
    .text-input {
        padding: 0.7rem 0.9rem;
        font-size: 0.85rem;
    }
    
    .submit-btn {
        min-width: 75px;
        padding: 0.7rem 0.85rem;
        font-size: 0.8rem;
        height: 40px;
        gap: 0.35rem;
    }
    
    .submit-btn i {
        font-size: 0.8rem;
    }
    
    .submit-text {
        font-size: 0.8rem;
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--ml-yellow);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ml-yellow-dark);
}