/* =====================================================
   TCG BÍBLIA - Estilos de Autenticação
   Dedicado à <Next-Aid/>
   ===================================================== */

:root {
    --primary-gold: #ffd700;
    --secondary-gold: #ffed4e;
    --dark-blue: #1a237e;
    --light-blue: #3f51b5;
    --divine-white: #ffffff;
    --holy-gray: #f5f5f5;
    --shadow-dark: #000000;
    --success-green: #4caf50;
    --error-red: #f44336;
    --warning-orange: #ff9800;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--divine-white);
    overflow-x: hidden;
}

/* Página de Autenticação */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-blue) 0%, #283593 50%, var(--light-blue) 100%);
    z-index: -2;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: -1;
}

/* Partículas flutuantes */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-gold);
    border-radius: 50%;
    opacity: 0.7;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Luz divina */
.divine-light {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200vh;
    background: linear-gradient(to bottom, 
        rgba(255, 215, 0, 0.3) 0%, 
        rgba(255, 215, 0, 0.1) 30%, 
        transparent 70%);
    animation: divine-pulse 8s ease-in-out infinite;
}

@keyframes divine-pulse {
    0%, 100% { 
        opacity: 0.3; 
        transform: translateX(-50%) scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: translateX(-50%) scale(1.1);
    }
}

/* Container Principal */
.auth-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: appear 1s ease-out;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Cabeçalho */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.dedication {
    font-size: 0.85rem;
    color: var(--secondary-gold);
    font-style: italic;
}

/* Formulários */
.form-container {
    margin-bottom: 1.5rem;
}

.form-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.form-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Grupos de Input */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--divine-white);
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.input-group small {
    display: block;
    margin-top: 0.3rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Checkbox de Termos */
.terms-checkbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.terms-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.terms-checkbox label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Botões */
.btn-primary {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, #ffed4e 100%);
    color: var(--dark-blue);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.btn-primary.loading .btn-text {
    display: none;
}

.btn-primary.loading .btn-loading {
    display: inline;
}

/* Footer dos Formulários */
.form-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.form-footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--secondary-gold);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-gold);
    text-decoration: underline;
}

/* Versículo Bíblico */
.bible-verse {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.bible-verse blockquote {
    font-style: italic;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

.bible-verse cite {
    display: block;
    margin-top: 0.5rem;
    color: var(--secondary-gold);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--divine-white);
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--light-blue);
    color: var(--divine-white);
}

.modal-icon {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

.modal-header h3 {
    flex: 1;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
}

.modal-close {
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
    color: var(--dark-blue);
}

.modal-footer {
    padding: 1rem 1.5rem;
    text-align: right;
    background: var(--holy-gray);
}

.btn-secondary {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    background: var(--light-blue);
    color: var(--divine-white);
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: var(--dark-blue);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 35, 126, 0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    text-align: center;
    color: var(--divine-white);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top: 4px solid var(--primary-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Estilos Adicionais para Formulários e Notificações */
.hidden {
    display: none !important;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color, #d4af37);
    font-size: 14px;
}

.form-group input {
    padding: 12px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color, #d4af37);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.form-toggle {
    text-align: center;
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.form-toggle a {
    color: var(--primary-color, #d4af37);
    text-decoration: none;
    font-weight: 600;
}

.form-toggle a:hover {
    text-decoration: underline;
}

.user-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color, #d4af37);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .auth-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .form-header h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .input-group input {
        padding: 10px 12px;
    }
    
    .btn-primary {
        padding: 12px;
    }
}

/* Estados de Validação */
.input-group.error input {
    border-color: var(--error-red);
    background: rgba(244, 67, 54, 0.1);
}

.input-group.success input {
    border-color: var(--success-green);
    background: rgba(76, 175, 80, 0.1);
}

.input-group .error-message {
    color: var(--error-red);
    font-size: 0.8rem;
    margin-top: 0.3rem;
    display: block;
}

/* Animações de transição entre formulários */
.form-container {
    transition: all 0.5s ease;
}

.form-container.fade-out {
    opacity: 0;
    transform: translateX(-20px);
}

.form-container.fade-in {
    opacity: 1;
    transform: translateX(0);
}