/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-gradient: linear-gradient(135deg, #6A5ACD 0%, #8A2BE2 50%, #663399 100%);
    --primary-color: #6A5ACD;
    --primary-dark: #483D8B;
    --primary-light: #9370DB;
    
    /* Accent Colors */
    --accent-gradient: linear-gradient(135deg, #3CB371 0%, #2E8B57 50%, #228B22 100%);
    --accent-color: #3CB371;
    --accent-dark: #2E8B57;
    --accent-light: #90EE90;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --light-gray: #F8F9FA;
    --medium-gray: #6C757D;
    --dark-gray: #343A40;
    --black: #212529;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
    
    /* Spacing */
    --section-padding: 100px 0;
    --container-padding: 0 15px;
    
    /* Shadows */
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 20px 60px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
    --transition-slow: 0.8s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
}

/* ===== PRELOADER ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6A5ACD 0%, #8A2BE2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-content {
    text-align: center;
    color: white;
}

.vfa-logo-loader {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    animation: logoFloat 2s ease-in-out infinite;
}

.vfa-text {
    color: var(--white);
}

.jorge-text {
    color: var(--accent-color);
    margin-left: 0.5rem;
}

.elearning-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ===== AUTH CONTAINER (LOGIN/REGISTER) ===== */
.auth-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--light-gray);
}

.auth-visual {
    flex: 1;
    background: linear-gradient(135deg, #6A5ACD 0%, #8A2BE2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
}

.visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatShape 10s ease-in-out infinite;
}

.shape-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.shape-2 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 5%;
    animation-delay: 4s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 20%;
    animation-delay: 6s;
}

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

.brand-logo {
    margin-bottom: 3rem;
}

.brand-logo .brand-vfa {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
}

.brand-logo .brand-jorge {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-left: 0.3rem;
}

.brand-subtitle {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.visual-text h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.visual-text p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.visual-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.visual-stats .stat-item {
    text-align: center;
}

.visual-stats .stat-number {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1;
}

.visual-stats .stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-top: 0.5rem;
}

.auth-forms {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.forms-container {
    width: 100%;
    max-width: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    position: relative;
}

.auth-form {
    padding: 3rem;
    transition: all 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
}

.auth-form.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    position: relative;
}

.auth-form.login-form {
    transform: translateX(0);
}

.auth-form.register-form {
    transform: translateX(100%);
}

.auth-form.register-form.active {
    transform: translateX(0);
}

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

.form-header h3 {
    font-family: var(--font-primary);
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--medium-gray);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control,
.form-select {
    border: 2px solid #E9ECEF;
    border-radius: 10px;
    padding: 1rem;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(106, 90, 205, 0.25);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    font-size: 1rem;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.form-check-input {
    margin-right: 0.5rem;
}

.forgot-password,
.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.btn-auth {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    width: 100%;
    margin-top: 1.5rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-medium);
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    color: white;
}

.social-login {
    margin-top: 2rem;
    text-align: center;
}

.divider {
    position: relative;
    margin: 2rem 0;
    color: var(--medium-gray);
}

.divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #E9ECEF;
    z-index: 0;
}

.divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-social {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid #E9ECEF;
    background: white;
    color: var(--dark-gray);
    transition: all var(--transition-fast);
}

.btn-social:hover {
    box-shadow: var(--shadow-light);
    transform: translateY(-2px);
}

.btn-google {
    color: #DB4437;
    border-color: #DB4437;
}

.btn-google:hover {
    background: #DB4437;
    color: white;
}

.btn-microsoft {
    color: #00A4EF;
    border-color: #00A4EF;
}

.btn-microsoft:hover {
    background: #00A4EF;
    color: white;
}

.form-footer {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 5px;
    background: #E9ECEF;
    border-radius: 5px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: gray;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.strength-text {
    font-size: 0.8rem;
    color: var(--medium-gray);
    margin-top: 0.5rem;
    display: block;
}

/* ===== MODAL (SUCCESS) ===== */
#successModal .modal-content {
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-heavy);
}

#successModal .success-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    animation: bounceIn 0.8s ease-out;
}

#successModal h4 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

#successModal p {
    color: var(--medium-gray);
    margin-bottom: 2rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: dotPulse 1.5s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); opacity: 1; }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); }
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.7); opacity: 0.5; }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 992px) {
    .auth-container {
        flex-direction: column;
    }
    
    .auth-visual {
        min-height: 300px;
        padding: 3rem 1rem;
    }
    
    .auth-forms {
        padding: 2rem 1rem;
    }
    
    .forms-container {
        box-shadow: none;
    }
}

@media (max-width: 768px) {
    .auth-form {
        padding: 2rem 1.5rem;
    }
    
    .form-header h3 {
        font-size: 1.8rem;
    }
    
    .visual-text h2 {
        font-size: 2rem;
    }
    
    .visual-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-social {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .auth-form {
        padding: 1.5rem;
    }
    
    .form-header h3 {
        font-size: 1.5rem;
    }
    
    .visual-text h2 {
        font-size: 1.8rem;
    }
    
    .brand-logo .brand-vfa,
    .brand-logo .brand-jorge {
        font-size: 2rem;
    }
    
    .brand-subtitle {
        font-size: 1rem;
    }
}

