/* css/auth.css - Estilos para sistema de autenticación */

/* Variables CSS consistentes con el sitio */
:root {
    --primary-color: #5e4b8b;
    --secondary-color: #d1a35f;
    --accent-color: #467b8a;
    --background-color: #fdfaf6;
    --text-color: #2c2c2c;
    --light-accent: #ede8e1;
    --gold-accent: #e4bf7c;
    --dark-color: #2a243b;
    --gradient-bg: linear-gradient(135deg, rgba(94, 75, 139, 0.9) 0%, rgba(209, 163, 95, 0.9) 100%);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08), 0 6px 12px rgba(0, 0, 0, 0.04);
}

/* Reset específico para páginas de auth */
.auth-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.auth-page body {
    font-family: 'Poppins', sans-serif;
    background: var(--background-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Fondo animado con partículas */
.auth-page body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg);
    opacity: 0.05;
    z-index: 1;
}

/* Contenedor principal de autenticación */
.auth-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    padding: 20px;
}

/* Tarjeta de autenticación */
.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 50px 40px;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.8s ease-out forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Efecto de brillo sutil en la tarjeta */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(209, 163, 95, 0.1), transparent);
    transition: left 0.5s;
    z-index: 1;
}

.auth-card:hover::before {
    left: 100%;
}

/* Header de autenticación */
.auth-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

/* Logo del ministerio */
.ministry-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(94, 75, 139, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(94, 75, 139, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 35px rgba(94, 75, 139, 0.4);
    }
}

.ministry-logo i {
    font-size: 2.5rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Títulos */
.auth-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-weight: 700;
    background: var(--gradient-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header .subtitle {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.auth-header p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

/* Sección de beneficios */
.benefits {
    margin-bottom: 35px;
    position: relative;
    z-index: 2;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin-bottom: 12px;
    background: rgba(94, 75, 139, 0.03);
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
    transform: translateX(-20px);
    opacity: 0;
    animation: slideInLeft 0.6s ease-out forwards;
}

.benefit:nth-child(1) { animation-delay: 0.2s; }
.benefit:nth-child(2) { animation-delay: 0.4s; }
.benefit:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideInLeft {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.benefit:hover {
    background: rgba(94, 75, 139, 0.08);
    transform: translateX(5px);
}

.benefit .icon {
    width: 45px;
    height: 45px;
    background: var(--gradient-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    box-shadow: 0 4px 12px rgba(94, 75, 139, 0.2);
}

.benefit .text {
    flex: 1;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Botón de Google */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 16px 24px;
    background: white;
    color: var(--text-color);
    border: 2px solid var(--light-accent);
    border-radius: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.btn-google::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-bg);
    transition: var(--transition);
    z-index: -1;
}

.btn-google:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(94, 75, 139, 0.15);
    border-color: var(--secondary-color);
    color: white;
}

.btn-google:hover::before {
    left: 0;
}

.btn-google:active {
    transform: translateY(-1px);
}

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

.btn-google img {
    width: 24px;
    height: 24px;
    transition: var(--transition);
}

.btn-google:hover img {
    transform: scale(1.1);
}

/* Sección de versículo */
.verse-section {
    background: rgba(94, 75, 139, 0.05);
    padding: 25px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid rgba(94, 75, 139, 0.1);
    position: relative;
    z-index: 2;
}

.verse-section::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--secondary-color);
    opacity: 0.3;
    font-family: Georgia, serif;
}

.verse-text {
    font-style: italic;
    color: var(--primary-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
    text-align: center;
}

.verse-ref {
    text-align: right;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Footer de autenticación */
.auth-footer {
    text-align: center;
    position: relative;
    z-index: 2;
}

.auth-footer p {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 8px;
}

.back-link:hover {
    background: rgba(94, 75, 139, 0.05);
    transform: translateX(-3px);
    color: var(--secondary-color);
}

/* Indicador de carga */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 36, 59, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Partículas animadas de fondo */
.particle {
    position: absolute;
    background: var(--secondary-color);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) {
    width: 10px;
    height: 10px;
    top: 20%;
    left: 20%;
    animation-delay: 0s;
}

.particle:nth-child(2) {
    width: 6px;
    height: 6px;
    top: 60%;
    left: 80%;
    animation-delay: 2s;
}

.particle:nth-child(3) {
    width: 8px;
    height: 8px;
    top: 80%;
    left: 10%;
    animation-delay: 4s;
}

.particle:nth-child(4) {
    width: 12px;
    height: 12px;
    top: 30%;
    left: 90%;
    animation-delay: 1s;
}

.particle:nth-child(5) {
    width: 5px;
    height: 5px;
    top: 70%;
    left: 30%;
    animation-delay: 3s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .auth-card {
        padding: 40px 30px;
        margin: 20px;
        border-radius: 20px;
    }

    .auth-header h1 {
        font-size: 1.8rem;
    }

    .ministry-logo {
        width: 70px;
        height: 70px;
    }

    .ministry-logo i {
        font-size: 2rem;
    }

    .benefit {
        padding: 12px 15px;
        gap: 12px;
    }

    .benefit .icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .benefit .text {
        font-size: 0.9rem;
    }

    .btn-google {
        padding: 14px 20px;
    }
}

/* Estados especiales para formularios */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--light-accent);
    border-radius: 12px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(94, 75, 139, 0.1);
}

.form-input:invalid {
    border-color: #ef4444;
}

/* Mensajes de estado */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #1d4ed8;
}