/* Authentication Pages Styles */

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.auth-card:hover {
    transform: translateY(-5px);
}

.signup-card {
    max-width: 500px;
    margin: 0 auto;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
}

.auth-header p {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.alert-error {
    background-color: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.alert-success {
    background-color: #c6f6d5;
    color: #2f855a;
    border: 1px solid #9ae6b4;
}

/* Form Styles */
.auth-form {
    margin-bottom: 30px;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #6a7c99;
    margin-bottom: 6px;
    margin-top: 6px;
    font-size: 15px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #a0aec0;
    font-size: 16px;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    color: #2d3748;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-wrapper input::placeholder {
    color: #a0aec0;
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: #a0aec0;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    background: #e53e3e;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-text {
    font-size: 12px;
    color: #718096;
    min-width: 100px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
    gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-checkbox {
    margin-bottom: 20px;
}

.terms-checkbox a {
    color: #667eea;
    text-decoration: none;
}

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

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-full {
    width: 100%;
}

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

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

.divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    color: #718096;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

.social-login {
    margin-top: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.btn-social {
    background: white;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-social:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    border-color: #4285f4;
    color: #4285f4;
}

.btn-apple:hover {
    border-color: #000;
    color: #000;
}

.social-icon {
    width: 20px;
    height: 20px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
}

.auth-footer p {
    color: #718096;
    font-size: 14px;
    margin: 0;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-page {
        padding: 10px;
    }
    
    .auth-card {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .social-login {
        gap: 10px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .auth-header h2 {
        font-size: 24px;
    }
    
    .auth-header p {
        font-size: 14px;
    }
    
    .input-wrapper input {
        padding: 12px 16px 12px 44px;
        font-size: 15px;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Animation for form validation */
.input-error {
    border-color: #e53e3e !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Loading state */
.btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}

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

/* Transform Lab Modal Styles */
.transform-modal {
    max-width: 480px;
    text-align: center;
}

.transform-modal .modal-header {
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.transform-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3);
}

.transform-icon i {
    font-size: 32px;
    color: white;
}

.transform-modal h2 {
    font-size: 28px;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 10px;
}

.transform-modal .modal-header p {
    color: #a0a0a0;
    font-size: 16px;
    line-height: 1.5;
}

.transform-features {
    display: flex;
    justify-content: space-around;
    margin-bottom: 30px;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.feature-item i {
    font-size: 24px;
    color: #8b5cf6;
    margin-bottom: 4px;
}

.feature-item span {
    font-size: 12px;
    color: #b0b0b0;
    font-weight: 500;
    text-align: center;
}

.auth-actions {
    margin-bottom: 20px;
}

.auth-actions .btn {
    margin-bottom: 15px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.transform-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.transform-footer p {
    color: #8b5cf6;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.transform-footer i {
    color: #10b981;
}

/* Mobile responsiveness for transform modal */
@media (max-width: 480px) {
    .transform-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    
    .feature-item span {
        text-align: left;
        font-size: 14px;
    }
}

/* Multi-view Modal Styles */
.auth-initial-view,
.auth-form-view {
    width: 100%;
}

/* Back Button Styles */
.btn-back {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    width: 40px;
    height: 40px;
}

.btn-back:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #8b5cf6;
}

.btn-back i {
    font-size: 18px;
}

/* Form View Header with Back Button */
.auth-form-view .modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.auth-form-view .modal-header > div {
    flex: 1;
    text-align: left;
}

.auth-form-view .modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.auth-form-view .modal-header p {
    margin: 5px 0 0 0;
    font-size: 14px;
}