/* --- VARIÁVEIS DE CORES (FIXAS LIGHT) --- */
:root {
    --primary: #009EE3;      /* Azul Mercado Pago */
    --primary-dark: #007fb7; 
    --green: #00A650;        /* WhatsApp */
    --bg-body: #F5F5F5;
    --bg-card: #FFFFFF;
    --text-main: #333333;
    --text-muted: #888888;
    --border: #e5e7eb;
    --shadow: 0 4px 20px rgba(0,0,0,0.05);
    --radius: 24px;
    --header-h: 160px;
    --bg-icon-modal: #f3f4f6;
}

/* --- RESET E ESTRUTURA --- */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex; flex-direction: column; align-items: center;
    min-height: 100vh; padding-top: 30px;
    overflow-x: hidden;
}

/* --- UTILITÁRIOS --- */
.hidden { display: none !important; }
.flex { display: flex !important; }

/* --- CABEÇALHO --- */
.header-bg {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--header-h);
    background: var(--primary);
    border-radius: 0 0 40px 40px;
    z-index: -1;
}

.brand {
    position: absolute; top: 24px; left: 24px;
    display: flex; align-items: center; gap: 10px;
    color: white; z-index: 10;
}
.brand svg { width: 30px; height: 30px; }
.brand span { font-weight: 700; font-size: 1.25rem; }

/* --- CONTEÚDO --- */
main {
    width: 100%; max-width: 400px; padding: 0 20px;
    margin-top: 60px; animation: fadeIn 0.6s ease-out;
    display: flex; flex-direction: column; gap: 16px;
}

/* --- PERFIL --- */
.profile-card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 24px; text-align: center; box-shadow: var(--shadow);
    margin-bottom: 8px; border: 1px solid transparent; position: relative;
}

.avatar-wrapper {
    width: 100px; height: 100px; margin: -60px auto 16px; position: relative;
}
.avatar-wrapper img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
    border: 3px solid var(--primary); background: var(--bg-card); padding: 3px;
}
.verified-badge {
    position: absolute; bottom: 0; right: 0;
    background: var(--bg-card); border-radius: 50%;
    color: var(--primary); width: 24px; height: 24px;
}

h1 { font-size: 1.25rem; font-weight: 700; margin-bottom: 4px; }
.subtitle { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; }

/* --- BOTÕES --- */
.actions { display: flex; gap: 12px; }
.btn-action {
    flex: 1; height: 48px; border-radius: 50px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer; transition: 0.3s;
    border: 1px solid var(--border); background: var(--bg-card);
    text-decoration: none;
}
.btn-whatsapp { color: var(--green); }
.btn-whatsapp:hover { background: var(--green); color: white; border-color: var(--green); }
.btn-share { color: var(--primary); }
.btn-share:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* --- CARTÃO MERCADO PAGO --- */
.pay-card {
    background: var(--primary); border-radius: 20px; padding: 20px;
    display: flex; align-items: center; justify-content: space-between;
    color: white; box-shadow: 0 10px 25px -5px rgba(0, 158, 227, 0.4);
    cursor: pointer; transition: transform 0.2s; position: relative; overflow: hidden;
}
.pay-card:active { transform: scale(0.98); }

.pay-card::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 150px; height: 150px; background: rgba(255,255,255,0.1);
    border-radius: 50%; filter: blur(40px);
}

.pay-info { display: flex; align-items: center; gap: 16px; position: relative; z-index: 2; }
.mp-logo-box {
    width: 48px; height: 48px; background: white; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.mp-logo-box img { width: 30px; }
.pay-text h3 { font-size: 1.1rem; font-weight: 700; }
.pay-text p { font-size: 0.75rem; opacity: 0.9; text-transform: uppercase; letter-spacing: 0.5px; }

.pay-actions { display: flex; gap: 8px; position: relative; z-index: 2; }
.icon-btn {
    width: 40px; height: 40px; background: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); transition: 0.2s;
}

/* --- TOAST --- */
#toast {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: var(--primary); color: white;
    padding: 12px 24px; border-radius: 50px;
    display: flex; align-items: center; gap: 10px;
    font-weight: 600; font-size: 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 158, 227, 0.4);
    opacity: 0; transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 200; pointer-events: none;
}
#toast.translate-y-0 { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.translate-y-24 { transform: translateX(-50%) translateY(100px); opacity: 0; }

/* --- MODAL --- */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); z-index: 100;
    transition: 0.3s;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-content {
    background: var(--bg-card); width: 100%; max-width: 340px;
    border-radius: 24px; padding: 24px;
    transform: scale(0.9); opacity: 0; transition: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
}
.modal-overlay.open .modal-content, .modal-content.scale-100 {
    transform: scale(1); opacity: 1;
}

.modal-close {
    position: absolute; top: 16px; right: 16px;
    background: transparent; border: none; color: var(--text-muted);
    cursor: pointer; padding: 5px;
}

.modal-logo-box {
    width: 48px; height: 48px; background: var(--bg-icon-modal);
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.modal-logo-box img { width: 30px; height: 30px; object-fit: contain; }

.qr-container {
    width: 100%; aspect-ratio: 1/1; background: white;
    border-radius: 16px; padding: 16px; margin: 16px 0;
    position: relative; overflow: hidden; border: 1px solid #eee;
}

.scan-line {
    position: absolute; top: -100%; left: 0; width: 100%; height: 50%;
    background: linear-gradient(to bottom, transparent, rgba(0, 158, 227, 0.4));
    border-bottom: 2px solid var(--primary);
    animation: scan 2.5s infinite linear;
}

.btn-copy-big {
    width: 100%; padding: 16px; border-radius: 50px; border: none;
    background: var(--primary); color: white; font-weight: 700;
    font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: 0.2s;
}
.btn-copy-big:active { transform: scale(0.98); background: var(--primary-dark); }

/* --- ÍCONES --- */
.icon-swap svg { display: none; }
.icon-swap svg.active { display: block; }

/* --- RODAPÉ PROFISSIONAL --- */
footer {
    margin-top: auto; padding: 30px 0;
    font-size: 0.75rem; letter-spacing: 0.5px;
    color: var(--text-muted); text-align: center;
}

.footer-wrapper {
    display: inline-flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.5); padding: 8px 16px;
    border-radius: 50px;
}

.brand-link {
    color: var(--text-main); font-weight: 700; text-decoration: none;
    transition: color 0.2s;
}
.brand-link:hover { color: var(--primary); }
.divider { color: var(--border); margin: 0 4px; }

/* --- ANIMAÇÕES --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scan { 0% { top: -100%; } 100% { top: 150%; } }