/**
 * Página de Cadastro - CSS Profissional
 * Design Moderno, Responsivo e Mobile-First
 */

:root {
    --cor-vermelho: #E31E24;
    --cor-amarelo: #FFC107;
    --cor-amarelo-claro: #FFD54F;
    --cor-preto: #1a1a1a;
    --cor-cinza: #6c757d;
    --cor-branco: #ffffff;
    --cor-fundo: #f5f5f5;
    --cor-verde: #28a745;
    --fonte: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--fonte);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f5f5f5 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    color: var(--cor-preto);
    line-height: 1.6;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================ */
/* HEADER / MENU TOPO */
/* ============================================ */

.header-cadastro {
    background: var(--cor-branco);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo-cadastro {
    height: 70px;
    max-width: 250px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.logo-cadastro:hover {
    transform: scale(1.05);
}

.btn-voltar {
    background: linear-gradient(135deg, var(--cor-cinza) 0%, #5a6268 100%);
    color: var(--cor-branco);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-voltar:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    color: var(--cor-branco);
}

/* ============================================ */
/* CONTAINER PRINCIPAL */
/* ============================================ */

.container-cadastro {
    max-width: 800px;
    margin: 50px auto;
    padding: 0 20px;
}

/* ============================================ */
/* CARD DO FORMULÁRIO */
/* ============================================ */

.card-form {
    background: var(--cor-branco);
    border-radius: 30px;
    padding: 50px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.1),
        0 0 0 1px rgba(0,0,0,0.05);
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* HEADER DO FORMULÁRIO */
/* ============================================ */

.form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 3px solid var(--cor-fundo);
}

.form-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.form-titulo {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 900;
    color: var(--cor-vermelho);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-subtitulo {
    font-size: 1.15rem;
    color: var(--cor-cinza);
    line-height: 1.6;
}

/* ============================================ */
/* CAMPOS DO FORMULÁRIO */
/* ============================================ */

.form-group {
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease;
    animation-fill-mode: both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.form-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--cor-preto);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.label-icon {
    font-size: 1.5rem;
}

.obrigatorio {
    color: var(--cor-vermelho);
    font-weight: 900;
    font-size: 1.2rem;
}

.form-control {
    width: 100%;
    padding: 18px 25px;
    border: 3px solid #e0e0e0;
    border-radius: 15px;
    font-size: 1.05rem;
    font-family: var(--fonte);
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--cor-branco);
    color: var(--cor-preto);
}

.form-control:focus {
    outline: none;
    border-color: var(--cor-vermelho);
    box-shadow: 
        0 0 0 4px rgba(227,30,36,0.1),
        0 4px 20px rgba(227,30,36,0.2);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: #999;
    font-weight: 400;
}

.form-text {
    display: block;
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--cor-cinza);
    font-style: italic;
    padding-left: 10px;
}

/* ============================================ */
/* BOX DE BÔNUS */
/* ============================================ */

.bonus-box {
    background: linear-gradient(135deg, #fff3cd 0%, #fffaed 100%);
    border: 3px solid var(--cor-amarelo);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(255,193,7,0.2);
    animation: pulseBonus 2s infinite;
}

@keyframes pulseBonus {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(255,193,7,0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 15px 40px rgba(255,193,7,0.3);
    }
}

.bonus-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.bonus-icon {
    font-size: 3.5rem;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bonus-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--cor-vermelho);
    text-transform: uppercase;
}

.bonus-content {
    font-size: 1.1rem;
    color: #856404;
    line-height: 1.8;
}

.bonus-content strong {
    color: var(--cor-vermelho);
    font-size: 1.3rem;
}

.bonus-lista {
    list-style: none;
    margin-top: 20px;
    padding: 0;
}

.bonus-lista li {
    padding: 10px 0;
    padding-left: 35px;
    position: relative;
    font-size: 1.05rem;
    font-weight: 600;
}

.bonus-lista li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--cor-verde);
    font-size: 1.5rem;
    font-weight: 900;
}

/* ============================================ */
/* BOTÃO DE SUBMIT */
/* ============================================ */

.btn-submit {
    background: linear-gradient(135deg, var(--cor-vermelho) 0%, #b71c21 100%);
    color: var(--cor-branco);
    padding: 22px 50px;
    border: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 15px 40px rgba(227,30,36,0.3),
        inset 0 2px 10px rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 500px;
    height: 500px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 20px 50px rgba(227,30,36,0.4),
        inset 0 2px 15px rgba(255,255,255,0.3);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-texto {
    position: relative;
    z-index: 1;
}

.btn-icon {
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
}

/* ============================================ */
/* FOOTER DO FORMULÁRIO */
/* ============================================ */

.form-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 3px solid var(--cor-fundo);
    text-align: center;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-size: 1.05rem;
    color: var(--cor-cinza);
    line-height: 1.8;
}

.footer-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-icon {
    font-size: 1.5rem;
}

/* ============================================ */
/* LOADING */
/* ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    text-align: center;
    color: var(--cor-branco);
}

.spinner {
    width: 80px;
    height: 80px;
    border: 8px solid rgba(255,255,255,0.2);
    border-top-color: var(--cor-amarelo);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============================================ */
/* MODAL DE SUCESSO */
/* ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--cor-branco);
    border-radius: 30px;
    padding: 50px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: modalZoom 0.5s ease;
}

@keyframes modalZoom {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    font-size: 6rem;
    margin-bottom: 25px;
    animation: successPulse 1s ease infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modal-titulo {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--cor-verde);
    margin-bottom: 20px;
}

.modal-texto {
    font-size: 1.15rem;
    color: var(--cor-cinza);
    line-height: 1.8;
    margin-bottom: 25px;
}

.modal-protocolo {
    background: var(--cor-fundo);
    padding: 25px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--cor-preto);
    margin: 30px 0;
    border: 3px solid var(--cor-amarelo);
}

.modal-afiliado-box {
    background: linear-gradient(135deg, #fff3cd 0%, #fffaed 100%);
    border: 3px solid var(--cor-amarelo);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
}

.modal-afiliado-box h4 {
    color: var(--cor-vermelho);
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.modal-afiliado-box p {
    color: #856404;
    font-size: 1.05rem;
    line-height: 1.8;
}

.btn-fechar {
    background: linear-gradient(135deg, var(--cor-verde) 0%, #1e7e34 100%);
    color: var(--cor-branco);
    padding: 18px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(40,167,69,0.3);
}

.btn-fechar:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(40,167,69,0.4);
}

/* ============================================ */
/* ALERTAS */
/* ============================================ */

.alert {
    padding: 20px 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 1.05rem;
    border: 3px solid;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* ============================================ */
/* RESPONSIVO */
/* ============================================ */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo-cadastro {
        height: 60px;
    }
    
    .btn-voltar {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .card-form {
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .form-titulo {
        font-size: 1.8rem;
    }
    
    .form-subtitulo {
        font-size: 1rem;
    }
    
    .form-control {
        padding: 15px 20px;
        font-size: 1rem;
    }
    
    .bonus-box {
        padding: 20px;
    }
    
    .bonus-header {
        flex-direction: column;
        text-align: center;
    }
    
    .bonus-title {
        font-size: 1.4rem;
    }
    
    .btn-submit {
        padding: 18px 30px;
        font-size: 1.1rem;
    }
    
    /* MODAL COMPACTO NO MOBILE */
    .modal-content {
        padding: 25px 15px;
        max-width: 90%;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .modal-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
    
    .modal-titulo {
        font-size: 1.5rem;
        margin: 15px 0 10px;
    }
    
    .modal-texto {
        font-size: 0.95rem;
        margin: 10px 0;
    }
    
    .modal-protocolo {
        padding: 12px 20px;
        font-size: 0.85rem;
        margin: 15px 0;
    }
    
    .modal-protocolo span {
        font-size: 1rem;
    }
    
    .modal-info {
        font-size: 0.85rem;
        padding: 10px;
        margin: 15px 0;
    }
    
    .modal-afiliado-box {
        padding: 15px;
        margin: 15px 0;
    }
    
    .modal-afiliado-box h4 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .modal-afiliado-box p {
        font-size: 0.9rem;
    }
    
    .btn-fechar {
        padding: 14px 30px;
        font-size: 1rem;
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .container-cadastro {
        margin: 30px auto;
    }
    
    .card-form {
        padding: 25px 15px;
    }
    
    /* MODAL AINDA MAIS COMPACTO NO MOBILE PEQUENO */
    .modal-content {
        padding: 20px 12px;
        max-width: 95%;
    }
    
    .modal-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .modal-titulo {
        font-size: 1.3rem;
    }
    
    .modal-texto {
        font-size: 0.9rem;
    }
    
    .modal-afiliado-box h4 {
        font-size: 1.1rem;
    }
    
    .modal-afiliado-box p {
        font-size: 0.85rem;
    }
    
    .btn-fechar {
        padding: 12px 25px;
        font-size: 0.95rem;
    }
    
    .form-icon {
        font-size: 3rem;
    }
    
    .form-titulo {
        font-size: 1.5rem;
    }
    
    .bonus-icon {
        font-size: 2.5rem;
    }
    
    .btn-submit {
        padding: 15px 25px;
        font-size: 1rem;
    }
}

/* ============================================ */
/* ANIMAÇÕES DE ENTRADA */
/* ============================================ */

.fade-in {
    animation: fadeInUp 0.6s ease;
}

.slide-in {
    animation: slideIn 0.6s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
