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

/* Variables CSS consistentes con el sitio */
:root {
    --primary-color: #1a1410;
    --secondary-color: #b89a5f;
    --accent-color: #6b4f2a;
    --background-color: #f7f4ed;
    --text-color: #2d2010;
    --light-accent: #ede5d8;
    --gold-accent: #c9aa6a;
    --dark-color: #0e0c0a;
    --gradient-bg: linear-gradient(160deg, #0e0c0a 0%, #1f1a14 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: 'Lato', sans-serif;
    font-weight: 300;
    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: var(--background-color);
    border-radius: 4px;
    padding: 50px 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(184, 154, 95, 0.18);
    position: relative;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 0.8s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

/* Línea dorada superior */
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

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

/* Logo del ministerio */
.ministry-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border: 1px solid rgba(184, 154, 95, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ministry-logo i {
    font-size: 1.7rem;
    color: var(--secondary-color);
}

/* Títulos */
.auth-header h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.1rem;
    font-weight: 600;
    font-style: italic;
    color: var(--primary-color);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}

.auth-header .subtitle {
    font-family: 'Lato', sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 16px;
}

.auth-header p {
    color: #6b5a48;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
    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: 14px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(184, 154, 95, 0.12);
    transition: var(--transition);
    opacity: 0;
    animation: fadeUp 0.6s ease-out forwards;
}

.benefit:last-child { border-bottom: none; }
.benefit:nth-child(1) { animation-delay: 0.2s; }
.benefit:nth-child(2) { animation-delay: 0.35s; }
.benefit:nth-child(3) { animation-delay: 0.5s; }

@keyframes fadeUp {
    from { transform: translateY(12px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.benefit .icon {
    width: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

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

/* Botón de Google */
.btn-google {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--primary-color);
    color: var(--secondary-color);
    border: 1px solid var(--primary-color);
    border-radius: 2px;
    font-family: 'Lato', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
    z-index: 2;
}

.btn-google:hover {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-google:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-google img {
    width: 18px;
    height: 18px;
    filter: invert(1) sepia(1) saturate(2) hue-rotate(5deg) brightness(0.85);
}

/* Sección de versículo */
.verse-section {
    background: transparent;
    padding: 24px 0;
    margin-bottom: 24px;
    border-top: 1px solid rgba(184, 154, 95, 0.22);
    border-bottom: 1px solid rgba(184, 154, 95, 0.22);
    position: relative;
    z-index: 2;
}

.verse-text {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 8px;
    text-align: center;
}

.verse-ref {
    text-align: right;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--secondary-color);
}

/* 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: #a0917e;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--secondary-color);
    transform: translateX(-3px);
}

/* Indicador de carga */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 12, 10, 0.96);
    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: 1px solid rgba(184, 154, 95, 0.3);
    border-radius: 2px;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    font-weight: 300;
    transition: var(--transition);
    background: white;
    color: var(--text-color);
}

.form-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(184, 154, 95, 0.12);
}

.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;
}