/**
 * ELITE LOGIN ENHANCED - CSS para Login Multi-Perfil
 * Mantém 100% da estética, cores e animações originais
 * Elite Financial System v10.0 - Multi-Profile Design
 */

/* ============================================
   CAMPOS DE LOGIN - ESTILO ELITE
   ============================================ */

.elite-login-fields {
    max-width: 480px;
    margin: 2.5rem auto;
    padding: 0 1rem;
}

.elite-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.elite-input-label {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.75rem;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

.elite-input-field {
    width: 100%;
    padding: 1rem 1.25rem;
    padding-left: 3.5rem; /* Espaço para ícone */
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.6), rgba(10, 10, 30, 0.8));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(34, 211, 238, 0.2);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: white;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.elite-input-field::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

.elite-input-field:focus {
    border-color: rgba(34, 211, 238, 1);
    box-shadow:
        0 0 30px rgba(34, 211, 238, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.elite-input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #22d3ee;
    filter: drop-shadow(0 0 8px rgba(34, 211, 238, 0.5));
    pointer-events: none;
    transition: all 0.3s ease;
}

.elite-input-field:focus + .elite-input-icon {
    color: #67e8f9;
    filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.8));
    transform: translateY(-50%) scale(1.1);
}

/* ============================================
   ANIMAÇÃO DE DIGITAÇÃO - EFEITO ELEGANTE
   ============================================ */

@keyframes elite-typing-glow {
    0%, 100% {
        box-shadow:
            0 0 20px rgba(34, 211, 238, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 0 35px rgba(34, 211, 238, 0.6),
            0 0 50px rgba(34, 211, 238, 0.3),
            0 4px 12px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

/* Aplicar animação quando usuário está digitando */
.elite-input-field.typing {
    animation: elite-typing-glow 1.5s ease-in-out infinite;
    border-color: rgba(34, 211, 238, 0.8);
}

.elite-input-field.typing + .elite-input-icon {
    animation: elite-icon-pulse 1.5s ease-in-out infinite;
}

@keyframes elite-icon-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(34, 211, 238, 0.9));
    }
}

/* ============================================
   ANIMAÇÃO DE FEEDBACK (ERRO E FOCO) - NÍVEL ELITE
   ============================================ */

/* Animação de "vibrato" sutil para erros */
@keyframes elite-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

/* Animação de "pulso" para chamar atenção */
@keyframes elite-focus-pulse {
    0% {
        border-color: rgba(34, 211, 238, 1);
        box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
    }
    50% {
        border-color: rgba(99, 102, 241, 1);
        box-shadow: 0 0 45px rgba(99, 102, 241, 0.7);
    }
    100% {
        border-color: rgba(34, 211, 238, 1);
        box-shadow: 0 0 30px rgba(34, 211, 238, 0.4);
    }
}

/* Classe para erro no input */
.input-error {
    animation: elite-shake 0.4s ease-in-out;
    border-color: #ef4444 !important; /* Vermelho vivo */
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6) !important;
}

.input-error:focus {
    border-color: #ef4444 !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.6) !important;
}

/* Mudar a cor do ícone quando o input adjacente está com erro */
.input-error + .elite-input-icon {
    color: #ef4444 !important; /* Vermelho vivo */
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.7)) !important; /* Brilho vermelho */
}

/* Classe para chamar atenção ao focar */
.input-focus-attention {
    animation: elite-focus-pulse 0.8s ease-in-out;
}

/* Validação de Username */
.elite-username-status {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.elite-username-status.checking {
    color: #f59e0b;
    opacity: 1;
    animation: pulse 1.5s infinite;
}

.elite-username-status.available {
    color: #10b981;
    opacity: 1;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.elite-username-status.taken {
    color: #ef4444;
    opacity: 1;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

/* ============================================
   BOTÕES DE LOGIN - MANTÉM ESTILO ORIGINAL
   ============================================ */

.elite-login-btn {
    width: 100%;
    padding: 1.25rem 2rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.8), rgba(6, 182, 212, 0.9));
    border: 2px solid rgba(34, 211, 238, 0.5);
    border-radius: 12px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #0a0a1a;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow:
        0 8px 24px rgba(34, 211, 238, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.elite-login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.elite-login-btn:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 1);
    box-shadow:
        0 12px 40px rgba(34, 211, 238, 0.5),
        0 0 60px rgba(34, 211, 238, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.elite-login-btn:hover::before {
    opacity: 1;
}

.elite-login-btn:active {
    transform: translateY(0) scale(0.98);
}

.elite-login-btn i {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* ============================================
   OAUTH BUTTONS - GOOGLE & APPLE
   ============================================ */

.elite-oauth-section {
    max-width: 480px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.elite-oauth-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0 1.5rem;
    opacity: 0.5;
}

.elite-oauth-divider::before,
.elite-oauth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.3), transparent);
}

.elite-oauth-divider span {
    padding: 0 1rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.elite-oauth-btn {
    width: 100%;
    padding: 1.1rem 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(30, 30, 60, 0.6), rgba(20, 20, 40, 0.8));
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.elite-oauth-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.elite-oauth-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Google Button */
.elite-oauth-btn.google {
    border-color: rgba(219, 68, 55, 0.3);
}

.elite-oauth-btn.google:hover {
    border-color: rgba(219, 68, 55, 0.8);
    background: linear-gradient(135deg, rgba(219, 68, 55, 0.1), rgba(20, 20, 40, 0.8));
}

.elite-oauth-btn.google i {
    color: #db4437;
    font-size: 1.2rem;
}

/* Apple Button */
.elite-oauth-btn.apple {
    border-color: rgba(255, 255, 255, 0.2);
}

.elite-oauth-btn.apple:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(20, 20, 40, 0.8));
}

.elite-oauth-btn.apple i {
    color: #ffffff;
    font-size: 1.3rem;
}

/* ============================================
   CRIAR CONTA LINK
   ============================================ */

.elite-create-account-link {
    text-align: center;
    margin-top: 2rem;
    padding: 0 1rem;
}

.elite-create-account-btn {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(34, 211, 238, 0.9);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.elite-create-account-btn:hover {
    color: #67e8f9;
    border-bottom-color: #67e8f9;
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

/* ============================================
   MODAL DE CRIAÇÃO DE CONTA - APPLE/ELITE STYLE
   ============================================ */

.elite-signup-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    z-index: 10200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.elite-signup-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(60px) brightness(1.1);
    -webkit-backdrop-filter: blur(60px) brightness(1.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 40px 100px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    animation: modalFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.elite-signup-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(34, 211, 238, 0.3);
}

.elite-signup-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 400;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

/* Form Grid - 2 Colunas Compacto */
.elite-signup-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.25rem;
}

.elite-signup-form .elite-input-group {
    margin-bottom: 0;
}

/* Campos que ocupam largura total */
.elite-signup-form .elite-input-group.full-width {
    grid-column: 1 / -1;
}

/* Ajuste de campos no signup */
.elite-signup-form .elite-input-field {
    padding: 0.85rem 1rem;
    padding-left: 3rem;
    font-size: 0.9rem;
}

.elite-signup-form .elite-input-label {
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
}

.elite-signup-form .elite-input-icon {
    font-size: 1rem;
    left: 1rem;
}

/* Close Button */
.elite-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #ef4444;
    font-size: 1.2rem;
}

.elite-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
    transform: rotate(90deg);
}

/* Checkbox de Termos */
.elite-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
    padding: 0.85rem;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 8px;
}

.elite-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #22d3ee;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.elite-checkbox-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    cursor: pointer;
}

.elite-terms-link {
    color: #22d3ee;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.elite-terms-link:hover {
    color: #67e8f9;
}

/* ============================================
   MODAL DE TERMOS E CONDIÇÕES
   ============================================ */

.elite-terms-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.elite-terms-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    background: linear-gradient(135deg, rgba(20, 20, 40, 0.95), rgba(10, 10, 30, 0.98));
    backdrop-filter: blur(30px);
    border: 2px solid rgba(34, 211, 238, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    overflow-y: auto;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.elite-terms-content {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.elite-terms-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    color: #22d3ee;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
}

.elite-terms-content h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: #67e8f9;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.elite-terms-content h3 {
    font-size: 1.1rem;
    color: #a0aec0;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.elite-terms-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.elite-terms-content li {
    margin-bottom: 0.5rem;
}

.elite-terms-content strong {
    color: #22d3ee;
}

/* Scrollbar personalizada */
.elite-terms-container::-webkit-scrollbar {
    width: 8px;
}

.elite-terms-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.elite-terms-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #22d3ee, #06b6d4);
    border-radius: 10px;
}

.elite-terms-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #67e8f9, #22d3ee);
}

/* ============================================
   LOADING STATE
   ============================================ */

.elite-input-field:disabled,
.elite-login-btn:disabled,
.elite-oauth-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.elite-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    /* Grid vira 1 coluna em tablets */
    .elite-signup-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .elite-signup-form .elite-input-group.full-width {
        grid-column: 1;
    }
}

@media (max-width: 640px) {
    .elite-signup-modal {
        padding: 0.75rem;
        align-items: flex-start;
        padding-top: 3rem;
    }

    .elite-signup-container {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
        max-width: 100%;
    }

    .elite-signup-title {
        font-size: 1.35rem;
    }

    .elite-signup-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.25rem;
    }

    .elite-signup-form {
        gap: 0.85rem;
    }

    .elite-signup-form .elite-input-field {
        font-size: 0.9rem;
        padding: 0.8rem 0.9rem;
        padding-left: 2.75rem;
    }

    .elite-signup-form .elite-input-label {
        font-size: 0.65rem;
        margin-bottom: 0.4rem;
    }

    .elite-signup-form .elite-input-icon {
        font-size: 0.95rem;
        left: 0.9rem;
    }

    .elite-checkbox-group {
        padding: 0.75rem;
        margin: 1rem 0 0.75rem;
    }

    .elite-checkbox-label {
        font-size: 0.8rem;
    }

    .elite-login-btn,
    .elite-oauth-btn {
        padding: 1rem 1.5rem;
        font-size: 0.85rem;
    }

    .elite-modal-close {
        width: 36px;
        height: 36px;
        top: 1rem;
        right: 1rem;
        font-size: 1rem;
    }
}

/* ============================================
   SCROLL VERTICAL - TELA ETAPA 01/01
   Adiciona rolagem apenas no modal de login
   ============================================ */

#user-modal {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Estilização da barra de scroll */
#user-modal::-webkit-scrollbar {
    width: 8px;
}

#user-modal::-webkit-scrollbar-track {
    background: rgba(20, 20, 40, 0.3);
    border-radius: 10px;
}

#user-modal::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.6), rgba(99, 102, 241, 0.6));
    border-radius: 10px;
    transition: all 0.3s ease;
}

#user-modal::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(34, 211, 238, 0.9), rgba(99, 102, 241, 0.9));
}
