/* Authentication Pages Base Styles */
.auth-page {
    background: var(--gradient-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

.auth-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--accent-gold), transparent),
        radial-gradient(2px 2px at 40px 70px, white, transparent),
        radial-gradient(1px 1px at 90px 40px, var(--accent-teal), transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 160px 30px, var(--accent-gold), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: sparkle 20s linear infinite;
}

.constellation {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url('../images/constellation.svg');
    background-size: cover;
    opacity: 0.3;
    animation: rotate 60s linear infinite;
}

.bagua-pattern {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    background-image: url('../images/bagua.png');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    animation: rotate 120s linear infinite reverse;
}

@keyframes sparkle {
    from { transform: translateY(0px); }
    to { transform: translateY(-100px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Authentication Navigation */
.auth-nav {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
}

.back-home {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.back-home:hover {
    color: var(--accent-gold);
}

/* Authentication Hero */
.auth-hero {
    padding: 120px 0 60px;
    color: white;
    text-align: center;
    position: relative;
}

.auth-hero .hero-content {
    position: relative;
    z-index: 2;
}

.auth-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.auth-hero p {
    font-size: 1.3rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

/* Authentication Main Content */
.auth-main {
    padding: 60px 0;
    position: relative;
    z-index: 2;
}

.auth-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
    max-width: 1400px;
    margin: 0 auto;
}

/* Auth Box */
.auth-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 50px;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-header img {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.auth-header h2 {
    color: var(--primary-dark);
    margin-bottom: 10px;
    font-size: 2rem;
}

.auth-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Social Authentication */
.social-auth {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--primary-dark);
}

.social-btn:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.social-btn img {
    width: 24px;
    height: 24px;
}

.divider {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.divider span {
    background: white;
    padding: 0 20px;
    color: #999;
    font-size: 0.9rem;
    position: relative;
}

/* Multi-step Form */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.form-step h3 {
    color: var(--primary-dark);
    margin-bottom: 25px;
    font-size: 1.5rem;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    color: var(--primary-dark);
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input, .form-group select {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.form-group small {
    color: #666;
    font-size: 0.9rem;
    margin-top: 5px;
}

.error-message {
    color: var(--accent-red);
    font-size: 0.9rem;
    margin-top: 5px;
    display: none;
}

.form-group.error input {
    border-color: var(--accent-red);
}

.form-group.error .error-message {
    display: block;
}

/* Password Input */
.password-input {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input input {
    flex: 1;
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.3s ease;
}

.toggle-password:hover {
    opacity: 0.7;
}

/* Password Strength */
.password-strength {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}

.password-strength.weak {
    display: block;
    background: var(--accent-red);
}

.password-strength.medium {
    display: block;
    background: #FFD700;
}

.password-strength.strong {
    display: block;
    background: #4CAF50;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.prev-step, .next-step {
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prev-step {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid #ddd;
}

.prev-step:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.next-step, .auth-form button[type="submit"] {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    font-weight: 700;
}

.next-step:hover, .auth-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(233, 69, 96, 0.3);
}

/* Step Indicator */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s ease;
}

.step-dot.active {
    background: var(--accent-gold);
    transform: scale(1.2);
}

/* Checkbox Options */
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--warm-beige);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.checkbox-option:hover {
    background: rgba(255, 215, 0, 0.1);
}

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

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-option input:checked ~ .checkmark {
    background: var(--accent-teal);
    border-color: var(--accent-teal);
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-option input:checked ~ .checkmark::after {
    display: block;
}

.preference-group h4 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.terms-group {
    margin: 25px 0;
}

.terms-group a {
    color: var(--accent-gold);
    text-decoration: none;
}

.terms-group a:hover {
    text-decoration: underline;
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.success-message h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.success-message p {
    color: #666;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

/* Auth Sidebar */
.auth-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.benefits-card, .testimonial-card, .login-prompt {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
}

.benefits-card h3, .testimonial-card h3, .login-prompt h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.benefit-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.benefit-text h4 {
    color: white;
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.benefit-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

.testimonial-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.testimonial-content p {
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}

.testimonial-author {
    text-align: right;
}

.testimonial-author strong {
    color: white;
    display: block;
}

.testimonial-author span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.login-prompt {
    text-align: center;
}

.login-prompt p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.login-prompt .btn-secondary {
    width: 100%;
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

.login-prompt .btn-secondary:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
}

.welcome-modal .welcome-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.welcome-modal h2 {
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.welcome-modal p {
    color: #666;
    margin-bottom: 25px;
}

.welcome-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Register Page Specific */
.register-page .auth-box {
    max-width: 600px;
}

.register-box {
    background: rgba(255, 255, 255, 0.98);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .auth-sidebar {
        order: -1;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .auth-hero h1 {
        font-size: 2.5rem;
    }
    
    .auth-box {
        padding: 30px 20px;
    }
    
    .hero-stats {
        gap: 40px;
    }
}