/* Auth CSS for MarketAlgoBot */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 1000px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ff6b35, var(--primary-color));
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border-color: var(--primary-color);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    width: 100%;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input {
    padding: 1.2rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-weight: 500;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(249, 201, 36, 0.15);
    transform: translateY(-2px);
    background-color: var(--card-bg);
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-color);
    opacity: 0.6;
    z-index: 1;
}

.input-group input {
    padding-left: 3rem;
}

/* Password field with show/hide toggle */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.6;
    transition: opacity 0.3s;
    font-size: 1.2rem;
}

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

.password-field input {
    padding-right: 3rem;
}

.auth-form .btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1.2rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.auth-form .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.auth-form .btn:hover::before {
    left: 100%;
}

.auth-form .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.auth-form .btn:active {
    transform: translateY(-1px);
}

.auth-info {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 8px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    border: 1px solid var(--border-color);
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

.auth-links .btn {
    margin: 0 0.5rem;
}

/* Error styling */
.form-group input.error {
    border-color: var(--error-color);
    animation: shake 0.5s ease-in-out;
}

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

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Success styling */
.form-group input.success {
    border-color: var(--success-color);
}

/* Readonly inputs */
.readonly-input {
    background-color: var(--card-bg);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.8;
}

.readonly-input:focus {
    box-shadow: none;
    border-color: var(--border-color);
    transform: none;
}

/* Profile sections */
.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 1rem;
    width: 100%;
}

.profile-section {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.profile-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #ff6b35);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.profile-section:hover::before {
    opacity: 1;
}

.profile-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    border-color: var(--primary-color);
}

.profile-section h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-section h3 i {
    font-size: 1.2rem;
    background: linear-gradient(45deg, var(--primary-color), #ff6b35);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Password strength indicator */
.password-strength {
    margin-top: 0.5rem;
    height: 4px;
    border-radius: 2px;
    background-color: var(--border-color);
    overflow: hidden;
}

.password-strength::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.weak::before {
    width: 25%;
    background-color: var(--error-color);
}

.password-strength.fair::before {
    width: 50%;
    background-color: var(--warning-color);
}

.password-strength.good::before {
    width: 75%;
    background-color: var(--primary-color);
}

.password-strength.strong::before {
    width: 100%;
    background-color: var(--success-color);
}

/* Responsive profile layout */
@media (min-width: 768px) {
    .auth-container {
        padding: 2rem;
    }
    
    .auth-card {
        max-width: 1200px;
    }
}

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

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

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

/* Responsive */
/* Mobile Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: 1rem 0.5rem;
        min-height: calc(100vh - 120px);
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 0.5rem;
        border-radius: 16px;
        max-width: 100%;
    }
    
    .auth-card h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
    
    .auth-form {
        gap: 1.25rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group input {
        padding: 1rem 0.875rem;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .auth-form .btn {
        padding: 1rem;
        font-size: 1rem;
        border-radius: 10px;
    }
    
    /* Profile sections mobile */
    .profile-sections {
        gap: 1.5rem;
    }
    
    .profile-section {
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .profile-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    
    /* Form rows mobile */
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Password toggle mobile */
    .password-toggle {
        right: 0.75rem;
        font-size: 1.1rem;
    }
    
    .password-field input {
        padding-right: 2.5rem;
    }
    
    /* Auth links mobile */
    .auth-links {
        margin-top: 1.25rem;
    }
    
    .auth-links .btn {
        margin: 0.25rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile-specific improvements */
    .auth-card::before {
        height: 3px;
    }
    
    .auth-card:hover {
        transform: none;
    }
    
    .auth-card:active {
        transform: scale(0.99);
    }
    
    /* Better touch targets */
    .password-toggle {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve form validation on mobile */
    .form-text {
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }
    
    /* Better password strength indicator on mobile */
    .password-strength {
        height: 4px;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1rem;
        margin: 0.25rem;
    }
    
    .auth-card h2 {
        font-size: 1.4rem;
    }
    
    .form-group input {
        padding: 0.875rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .auth-form .btn {
        padding: 0.875rem;
        font-size: 0.95rem;
    }
}
